Home
Current Affairs January 2024

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

Correct Answer :

B. Error


Related Questions

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

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 output of the following code is:
void main() 
{
char a = 'B';
switch (a)
{
case 'A' : printf("a");
case 'B' : printf("b");
default : printf("c");
}

A. B

B. b

C. bca

D. bc

What is the correct answer?

4

= and = = have the same operation.

A. True

B. False

What is the correct answer?

4

What is C Tokens?

A. The smallest individual units of c program

B. The basic element recognized by the compiler

C. The largest individual units of program

D. A & B Both

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

A. True

B. False

What is the correct answer?

4

Expression 4**3 evaluates to 64.

A. True

B. False

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

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

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

What is Keywords?

A. Keywords have some predefine meanings and these meanings can be changed.

B. Keywords have some unknown meanings and these meanings cannot be changed.

C. Keywords have some predefine meanings and these meanings cannot be changed.

D. None of the above

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

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

A. True

B. False

What is the correct answer?

4

emp name' is a valid variable name.

A. True

B. False

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

------ is the ternary operator

A. ?,-

B. ?,:

C. ++<--

D. none of the above

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

All elements of a structure are allocated contiguous memory locations.

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

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

If 'str' is a string of 7 characters, the statement printf("%4s", str); will display ------characters.

A. 4

B. 7

C. 6

D. 0

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

Identify the wrong statement

A. putchar(65)

B. putchar('x')

C. putchar("x")

D. putchar('
')

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

Each pass through a loop is called a/an

A. enumeration

B. iteration

C. culmination

D. pass through

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

Single operations involving entire arrays are permitted in C.

A. True

B. False