C Programming Quiz Questions and Answers - 3

Question: 11

File opening is a process of

(A) Writing data to a file

(B) Connecting program to a file

(C) Reading data from a file

(D) None of above

Ans: B

Connecting program to a file

Question: 12

Which of the following statements are true about break statement?

(A) The break statement terminates current iteration of the loop.

(B) The break statement can be used with if statement to terminate the execution of its block.

(C) The break statement can only be used with loop statements and switch statement.

(D) None of above

Ans: c

The break statement can only be used with loop statements and switch statement.

Question: 13

Which of the following statement is a correct statement about typedef statement?

(A) It is used to define a function.

(B) It is used to re-define a existing or user defined data type.

(C) It is primitive data type.

(D) None of above

Ans: B

It is used to re-define a existing or user defined data type.

Question: 14

Which of the following function will you use in case you want to provide the password facility in your program for security purposes?

(A) gets()

(B) scanf()

(C) getch()

(D) getchar()

Ans: C

getch()

Question: 15

Which of the following function can be used to write only integer numbers

(A) putw()

(B) fwrite()

(C) putint()

(D) fprintf()

Ans: A

putw()

Related Questions