Home
Current Affairs January 2024

What is the correct answer?

4

Only one break can be used in one loop.

A. True

B. False

Correct Answer :

B. False


Related Questions

What is the correct answer?

4

do-while loop is useful when we want the statements within the loop must be executed

A. Only once

B. At least once

C. More than Once

D. Any one of the above

What is the correct answer?

4

Which of the following is not a standard exception built in C++.

A. std::bad_creat

B. std::bad_alloc

C. std::bad_cast

D. std::bad_typeid

What is the correct answer?

4

Union is used to hold different data at different time.

A. True

B. False

What is the correct answer?

4

Variables declared as register storage type gets stored in CPU registers.

A. True

B. False

What is the correct answer?

4

What is right way to Initialization array?

A. int num[6] = { 2, 4, 12, 5, 45, 5 } ;

B. int n{} = { 2, 4, 12, 5, 45, 5 } ;

C. int n{6} = { 2< 4< 12 } ;

D. int n(6) = { 2, 4, 12, 5, 45, 5 } ;

What is the correct answer?

4

In the expression - 'x + y + 3z =20'

A. x + y' is a keyword

B. 3 and 20 are constants

C. 3z is a constant

D. y is a variable and z is a constant

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

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

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

/* The C language.
/* is a procedural language .*/*/
The above statement is valid.

A. True

B. False

What is the correct answer?

4

Which one of the following is not a valid reserved keyword in C++

A. Explicit

B. Public

C. Implicit

D. Private

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

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

A. True

B. False

What is the correct answer?

4

# define PI = 8;' is the correct declaration of macros.

A. True

B. False

What is the correct answer?

4

What does STL stand for?

A. Simple Template Library

B. Standard Template Library

C. Static Type Library

D. Single Type-based Library

What is the correct answer?

4

Which escape character can be used to beep from speaker in C?

A. \a

B. \b

C. \m

D.

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

All elements of a structure are allocated contiguous memory locations.

A. True

B. False

What is the correct answer?

4

fopen() function returns a pointer to the open file.

A. True

B. False

What is the correct answer?

4

The array 'char name[10] can consist of a maximum of 9 characters.

A. True

B. False

What is the correct answer?

4

What is an array?

A. An array is a collection of variables that are of the dissimilar data type.

B. An array is a collection of variables that are of the same data type.

C. An array is not a collection of variables that are of the same data type.

D. None of the above.

What is the correct answer?

4

Which of the following expressions is wrong

A. float a =123.56;

B. char ch ='T' * 'A';

C. char ch ='T' *20;

D. 3 +a = b;

What is the correct answer?

4

What will be output if you will compile and execute the following c code?
#include 
int main()
{
float a=5.2;
if(a==5.2)
printf("Equal");
else if(a<5.2)
printf("Less than");
else
printf("Greater than");
return 0;
}

A. Less than

B. Equal

C.

Greater than

D. None of above

What is the correct answer?

4

A function to be called must be ended with a----------------

A. .

B. ?

C. ;

D. none of the above

What is the correct answer?

4

What would be the output of the following program?
int x=40;
main(){
int x=20;
printf("
%d",x);
}

A. 40

B. 20

C. Compilation Error

D. Garbeg Value

What is the correct answer?

4

Right shifting an operand 1bit is equivalent to multiplying it by 2.

A. True

B. False

What is the correct answer?

4

There are total ------ numbers of operators in 'C'.

A. 35

B. 45

C. 55

D. 40

What is the correct answer?

4

The expression "int i = j = k = 0;" is invalid.

A. True

B. False

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 statement "for (i = 0, j = 2; j <= 10; j++)" is a valid statement in 'C'.

A. True

B. False