Home
Current Affairs January 2024

What is the correct answer?

4

&& and & operators have the same meaning.

A. True

B. False

Correct Answer :

B. False


Related Questions

What is the correct answer?

4

If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?

A. const X* const

B. X* const

C. X*

D. X&

What is the correct answer?

4

The output of the following code is:
void main() 
{
int a;
int &b = a;
a=100;
printf("b=%d\ta=%d
", b,a);
}

A. b=100 a=100

B. b=100 a=0

C. b=0 a=100

D. Error

What is the correct answer?

4

The contents of a file opened in 'r+' mode cannot be changed.

A. True

B. False

What is the correct answer?

4

Which among the following is a unconditional control structure

A. do-while

B. if-else

C. goto

D. for

What is the correct answer?

4

p++ executes faster than p + 1.

A. True

B. False

What is the correct answer?

4

unsigned' is a valid variable name.

A. True

B. False

What is the correct answer?

4

What's wrong? for (int k = 2, k <=12, k++)

A. the increment should always be ++k

B. the variable must always be the letter i when using a for loop

C. there should be a semicolon at the end of the statement

D. the commas should be semicolons

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

The main() function can call itself recursively.

A. True

B. False

What is the correct answer?

4

&& and & operators have the same meaning.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
main() 
{
int a = 0;
for (; i = 0; i++)
printf("%d", a);
}

A. 0

B. Nothing will be displayed

C. Infinite loop

D. None of the above

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

What is the correct answer?

4

Which one of the following is not a fundamental data type in C++

A. float

B. string

C. int

D. wchar_t

What is the correct answer?

4

Structures within structures cannot be created.

A. True

B. False

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

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

The expression (i + j)++ is illegal.

A. True

B. False

What is the correct answer?

4

The-------------------- statement helps immediate exit from any part of the loop

A. break

B. continue

C. exit

D. All of the above

What is the correct answer?

4

A C variable cannot start with

A. An alphabet

B. A number

C. A special symbol other than underscore

D. both (b) and (c)

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

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

Expression 4**3 evaluates to 64.

A. True

B. False

What is the correct answer?

4

The printf() function retunes which value when an error occurs?

A. Positive value

B. Zero

C. Negative value

D. None of these

What is the correct answer?

4

The output of the following code is:
void main()
{
int a = 20;
printf("%d\t%d
", ++a, a);
}

A. 21 21

B. 20 21

C. 21 20

D. 20 20

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

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

Only one break can be used in one loop.

A. True

B. False

What is the correct answer?

4

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


#include 
int main(){
char c=125;
c=c+10;
printf("%d",c);
return 0;
}

 

A. 135

B. +INF

C. -121

D. -135

What is the correct answer?

4

The expression "b = 3 ^ 2;" will evaluate b = 9.

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