Home
Current Affairs January 2024

What is the correct answer?

4

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

A. 35

B. 45

C. 55

D. 40

Correct Answer :

B. 45


Related Questions

What is the correct answer?

4

C programming language was developed by

A. Dennis Ritchie

B. Ken Thompson

C. Bill Gates

D. Peter Norton

What is the correct answer?

4

Which of the following is not recommended in a header file?

A. Type definitions (typedefs)

B. Class definitions

C. Function definitions

D. Template definitions

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

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

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

Which of the following keyword supports dynamic method resolution?

A. abstract

B. Virtual

C. Dynamic

D. Typeid

What is the correct answer?

4

perror( ) function used to ?

A. Work same as printf()

B. prints the error message specified by the compiler

C. prints the garbage value assigned by the compiler

D. None of the above

What is the correct answer?

4

Which classes allow primitive types to be accessed as objects?

A. Storage

B. Virtual

C. Friend

D. Wrapper

What is the correct answer?

4

Every if statement can be converted into an equivalent switch statement.

A. True

B. False

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

When is std::bad_alloc exception thrown?

A. When new operator cannot allocate memory

B. When alloc function fails

C. When type requested for new operation is considered bad<  thisexception is thrown

D. When delete operator cannot delete teh allocated (corrupted) object

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

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

printf("%d", sizeof('2')); will print 2.

A. True

B. False

What is the correct answer?

4

------ is the ternary operator

A. ?,-

B. ?,:

C. ++<--

D. none of the above

What is the correct answer?

4

p++ executes faster than p + 1.

A. True

B. False

What is the correct answer?

4

Nested macros are allowed.

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

A multidimensional array A[10][9] can store-------- number of elements

A. 91

B. 88

C. 90

D. 89

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

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

&& and & operators have the same meaning.

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

All elements of a structure are allocated contiguous memory locations.

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

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 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

Which of the following is invalid?

A. ''

B. " "

C. 'a'

D. abc'

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

Single operations involving entire arrays are permitted in C.

A. True

B. False