File Handling--C programming

File Handling--C programming

Assessment

Quiz

Computers, Other

University

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?