Search Header Logo

AQ Quiz 5

Authored by Mandeep Singh

Computers

University

Used 1+ times

AQ Quiz 5
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?