File Handling--C programming

File Handling--C programming

Assessment

Quiz

Computers, Other

University

Practice Problem

Hard

Created by

SACHIN Chennai

Used 71+ times

FREE Resource

Student preview

quiz-placeholder

34 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The first and second arguments of fopen() are

A. A character string containing the name of the file & the second argument is the mode

B. A character string containing the name of the user & the second argument is the mode

C. A character string containing file pointer & the second argument is the mode

D. None of the mentioned

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

FILE is of type ______

A. int type

B. char * type

C. struct type

D. None of the mentioned

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following true about FILE *fp

A. FILE is a keyword in C for representing files and fp is a variable of FILE type.

B. FILE is a stream

C. FILE is a buffered stream

D. FILE is a structure and fp is a pointer to the structure of FILE type

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following fopen statements are illegal?

A. fp = fopen(“abc.txt”, “r”);

B. fp = fopen(“/home/user1/abc.txt”, “w”);

C. fp = fopen(“abc”, “w”);

D. None of the mentioned.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When fopen() is not able to open a file, it returns

A. EOF

B. NULL

C. Run-time Error

D. None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of files can’t be opened using fopen()?

A. .txt

B. .bin

C. .c

D. None of the above

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

It is not possible to combine two or more file opening mode in open () method.

A. True

B. False

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers