AQ Quiz 5

AQ Quiz 5

University

100 Qs

quiz-placeholder

Similar activities

Programming in Java

Programming in Java

University

101 Qs

CODOPHILE QUIZ-25

CODOPHILE QUIZ-25

University

100 Qs

C Unit 1

C Unit 1

University

100 Qs

Internet and Mobile Programming Final Review

Internet and Mobile Programming Final Review

University

96 Qs

CS1101 Python Final Exam practice

CS1101 Python Final Exam practice

University

103 Qs

CS322 FINAL EXAMINATIONS

CS322 FINAL EXAMINATIONS

12th Grade - University

100 Qs

IG2quiz

IG2quiz

University

103 Qs

 ສອບເສັງກາງພາກ C programming 1CEEE

ສອບເສັງກາງພາກ C programming 1CEEE

University

99 Qs

AQ Quiz 5

AQ Quiz 5

Assessment

Quiz

Computers

University

Hard

Created by

Mandeep Singh

Used 1+ times

FREE Resource

100 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

/* C program to check palindrome and check the input and output*/

#include <stdio.h>

int main()

{ int n, reverse = 0, temp;

printf("Enter a number you want to check\n");

scanf("%d",&n);

temp = n;

while( temp != 0 )

{ reverse = reverse * 10;

reverse = reverse + temp%10;

temp = temp/10;

} if ( n == reverse )

printf("%d is a palindrome number.\n", n);

else

printf("%d is not a palindrome number.\n", n);

return 0;

}

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

SYNTAX ERROR

LOGICAL ERROR

RUNTIME ERROR

ALL OF THE ABOVE

3.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Media Image

ERROR EXCEPTED COLON IN LINE11

ERROR EXCEPTED SEMICOLON IN LINE11

ERROR EXCEPTED COLON IN LINE12

ERROR EXCEPTED SEMICOLON IN LINE12

4.

MULTIPLE SELECT QUESTION

1 min • 1 pt

In which of the following cases the minimum no of insertions to form palindrome is maximum?

string with all same characters

string of length 1

palindromic string

non palindromic string

5.

MULTIPLE SELECT QUESTION

1 min • Ungraded

In the worst case, the minimum no of insertions to be made to convert the string into a palindrome is equal to the length of the string

TRUE

FALSE

NEITHER TRUE NOR FALSE

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does the following function print for n = 25?

void fun(int n)

{

if (n == 0)

return;

printf("%d", n%2);

fun(n/2);

}

11001

10011

11111

00000

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What’s happen if base condition is not defined in recursion ?

Stack underflow

Stack Overflow

None of these

Both a and b

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?