Home
Current Affairs January 2024

What is the correct answer?

4

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

A. True

B. False

Correct Answer :

B. False


Related Questions

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

Union is used to hold different data at different time.

A. True

B. False

What is the correct answer?

4

What is the right way to access value of structure variable book{ price, page }?

A. printf("%d%d", book.price, book.page);

B. printf("%d%d", price.book, page.book);

C. printf("%d%d"< price::book< page::book);

D. printf("%d%d", price>book, page>book);

What is the correct answer?

4

For 16bit compiler allowable range for integer constants is ______ ?

A. 3.4e38 to 3.4e38

B. 32767 to 32768

C. 32768 to 32767

D. 32668 to 32667

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

Bitwise operators can operate upon?

A. double and chars

B. floats and doubles

C. ints and floats

D. ints and chars

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

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

A. True

B. False

What is the correct answer?

4

The main() function can be called from any other function.

A. True

B. False

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

The output of the following code is:
#define sqr(x= x*x) 
main()
{
int a = 10, b = 5;
printf("%d, %d", sqr(a+b),sqr(++a));
}

A. 77, 121

B. 225, 121

C. 77< 144

D. Compilation error

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

A pointer is an indication of the variable to be accessed next.

A. True

B. False

What is the correct answer?

4

Each pass through a loop is called a/an

A. enumeration

B. iteration

C. culmination

D. pass through

What is the correct answer?

4

The expression 'int j = 6 + 3 % -9;' evaluates to -1.

A. True

B. False

What is the correct answer?

4

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

A. True

B. False

What is the correct answer?

4

The output of the following code is:
main() 
{
void msg()
{
printf("HELLO WORLD");
}
}

A. HELLO WORLD

B. Error

C. None of the above

D. Null

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

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 value *(&i) is same as printing the value of address of i.

A. True

B. False

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

printf() is not a library function.

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

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

A. True

B. False

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

The output of the following code is:
int f(int a, int b); 
void main()
{
int a = 12, b=154;
printf("%d", f(a, b));
}
int f(int a, int b)
{
if (a<b) return(f(b, a));
if(b==0) return(a);
return (f(b, a % b));
}

A. 2

B. 1

C. Compilation error

D. Runtime error

What is the correct answer?

4

p++ executes faster than p + 1.

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

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

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