Input / Output – Point Out Errors

1. Point out the error in the program.

Screenshot 1

A. Error: in unsigned char statement
B. Error: unknown file pointer
C. No error
D. None of the above

Correct Answer: C. No error

2. Point out the error in the program.

Screenshot 2

A. Error: suspicious char to in conversion in scanf()
B. Error: we may not get input for second scanf() statement
C. No error
D. None of above

Correct Answer: B. Error: we may not get input for second scanf() statement

3. Point out the error in the program?

Screenshot 3

A. Error: unrecognized Keyword SEEK_SET
B. Error: fseek() long offset value
C. No error
D. None of the above

Correct Answer: B. Error: fseek() long offset value

4. Point out the error in the program.

Screenshot 4

A. No error, No output.
B. Program crashes at run time.
C. Output: Unable to open file.
D. None of the above

Correct Answer: C. Output: Unable to open file.

5. Point out the error/warning in the program.

Screenshot 5

A. Error: in unsigned char declaration
B. Error: while statement
C. No error
D. It prints all characters in file “trial”

Correct Answer: A. Error: in unsigned char declaration

Leave A Comment?

eleven − ten =