Declarations and Initializations – Find Output of Program

1. What is the output of the program given below?

Screenshot 1

A. 0, 1, 2
B. 1, 2, 3
C. 0, 2, 1
D. 1, 3, 2

Correct Answer: C. 0, 2, 1
Advertisement

2. What will be the output of the program in the 16-bit platform (Turbo C under DOS)?

Screenshot 1

A. 2
B. 4
C. vary from compiler
D. Linker Error : Undefined symbol ‘i’

Correct Answer: D. Linker Error : Undefined symbol ‘i’
Advertisement

3. What is the output of the program?

Screenshot 1

A. 20
B. 0
C. Garbage Value
D. Error

Correct Answer: A. 20
Advertisement

4. What is the output of the program in Turbo C (in DOS 16-bit OS)?

Screenshot 1

A. 2, 4, 6
B. 4, 4, 2
C. 2, 4, 4
D. 2, 2, 2

Correct Answer: A. 20
Advertisement

5. What is the output of the program

What is the output of the program

A. 0, 0.000000
B. Garbage values
C. Error
D. None of above

Correct Answer: A. 0, 0.000000
Advertisement

Leave A Comment?