Home
Current Affairs January 2024

What is the correct answer?

4

continue statement is used

A. to go to the next iteration in a loop

B. come out of a loop

C. exit and return to the main function

D. restarts iterations from beginning of loop

Correct Answer :

D. restarts iterations from beginning of loop


Related Questions

What is the correct answer?

4

The statement "for (i = 0, j = 2; j <= 10; j++)" is a valid statement in 'C'.

A. True

B. False

What is the correct answer?

4

Which header file is essential for using strcmp() function?

A. string.h

B. strings.h

C. text.h

D. strcmp.h

What is the correct answer?

4

The value of an enumerated datatype can be read using scanf() function.

A. True

B. False

What is the correct answer?

4

What's wrong? while( (i < 10) && (i > 24))

A. the logical operator && cannot be used in a test condition

B. the while loop is an exit-condition loop

C. the test condition is always true

D. the test condition is always false

What is the correct answer?

4

Which of the following keyword supports dynamic method resolution?

A. abstract

B. Virtual

C. Dynamic

D. Typeid

What is the correct answer?

4

The identifier argv[] is a pointer to an array of strings.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
main() 
{
int sub[50];
for(i=0; i<=48;i++)
{
sub[i]=i;
printf("
%d", sub[i]);
}
}

A. 0 to 48 will be displayed

B. 48

C. 49

D. Compilation Error

What is the correct answer?

4

When a user defined function is defined in program, then it has to be called at least once from the main().

A. True

B. False

What is the correct answer?

4

What's wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);

A. the question mark should be an equal sign

B. the first semicolon should be a colon

C. there are too many variables in the statement

D. the conditional operator is only used with apstrings

What is the correct answer?

4

The output of the following code is:
void main()
{
int z, a = 5, b = 3; z = a * 2 + 26 % 3;
printf("%d", z); }

A. 10

B. 0

C. 12

D. None of the above

What is the correct answer?

4

Which of the following is invalid?

A. ''

B. " "

C. 'a'

D. abc'

What is the correct answer?

4

the value *(&i) is same as printing the value of address of i.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
main() 
{
unsigned int a = 10;
while (a>=10)
{
int a; a-- ;
}
printf("%i", a);
}

A. Infinite loop

B. 9

C. 0

D. None

What is the correct answer?

4

struct stud
{
int roll;
char name[20];
float marks;
} *p;
What will be the byte size of p?

A. 24

B. 2

C. 26

D. None

What is the correct answer?

4

The size of signed integer is ------ bytes.

A. 4

B. 2

C. 8

D. 10

What is the correct answer?

4

What will be output if you will compile and execute the following c code?


#include 
#define x 5+2
int main(){
int i;
i=x*x*x;
printf("%d",i);
return 0;
}


A. 27

B. 343

C. 233

D. Compiler Error

What is the correct answer?

4

It is necessary to initialize the array at the time of declaration.

A. True

B. False

What is the correct answer?

4

Left shift operator rotates the bits on the left and places them to the right.

A. True

B. False

What is the correct answer?

4

Which of the following is not a preprocessor directive

A. #if

B. #elseif

C. #undef

D. #pragma

What is the correct answer?

4

fprintf()function can be used to write into console.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
void main() 
{
int a = 0;
while (a<=50) for(;;) if(++a % 50==0) break;
printf("a = %d", a);
}

A. a = 100

B. a = 50

C. compilation error

D. runtime error

What is the correct answer?

4

The output of the following code is:
main() 
{
xyz: goto abc;
printf("Hello");
abc: printf("World");
goto xyz;
}

A. Infinite loop

B. Hello World

C. World Hello

D. Compilation error

What is the correct answer?

4

Which of the following correctly describes C++ language?

A. Statically typed language

B. Dynamically typed language

C. Both Statically and dynamically typed language

D. Type-less language

What is the correct answer?

4

The -------------------------- loop executes at least once.

A. for

B. while

C. do-while

D. while & do-while

What is the correct answer?

4

The output of the following code is:
main() 
{
int a = 5, b = 6;
(a == b? printf("%d", a));
}

A. 0

B. 5

C. Error

D. None of the above

What is the correct answer?

4

The same variable names of automatic type can be used in different functions without any conflict.

A. True

B. False

What is the correct answer?

4

An array declared as A[100][100] can hold a maximum of 100 elements.

A. True

B. False

What is the correct answer?

4

Which of the following language is predecessor to C Programming Language?

A. A

B. B

C. BCPL

D. C++

What is the correct answer?

4

How many times the following loop will execute?
for (a = 0; a < 4; a++)
printf("hello
");

A. 3

B. 4

C. 5

D. infinite

What is the correct answer?

4

A continue statement causes execution to skip to

A. the return 0; statement

B. the first statement after the loop

C. the statement following the continue statement

D. the next iteration of the loop