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

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’

3. What is the output of the program?

Screenshot 1

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

Correct Answer: A. 20

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

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

Leave A Comment?

12 + fifteen =