Declarations and Initializations – Point Out Errors

1. Point out the error in the following program (if it is compiled with Turbo C compiler).

Screenshot 1

A. No error
B. display() doesn’t get invoked
C. display() is called before it is defined
D. None of these

Correct Answer: C. display() is called before it is defined

2. Point out the error in the following program.

Screenshot 1

A. Error: Declaration syntax error ‘v‘ (or) Size of v is unknown or zero.
B. Program terminates abnormally.
C. No error.
D. None of these

Correct Answer: A. Error: Declaration syntax error ‘v‘ (or) Size of v is unknown or zero.

3. Point out the error in the following program.

Point out the error in the following program

A. Error: in printf
B. Error: in emp int xx;
C. No error.
D. None of these.

Correct Answer: B. Error: in emp int xx;

4. Which of the following is correct about the error used in the declaration given below?

Which of the following is correct about err used in the declaration given below

A. It is a typedef for enum error.
B. It is a variable of type enum error.
C. The statement is erroneous.
D. It is a structure

Correct Answer: A. It is a typedef for enum error.

5. Point out the error in the following program.

Point out the error in the following program

A. Error: in int(*p)() = fun;
B. Error: fun() prototype not defined
C. No error
D. None of these

Correct Answer: B. Error: fun() prototype not defined

Leave A Comment?

13 − eleven =