Home / Programming Questions / C Programming MCQs / Page 5

C Programming MCQs with answers Page - 5

Dear candidates you will find MCQ questions of C Programming here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question

Q. What is right way to Initialization array?

(A) int num[6] = { 2, 4, 12, 5, 45, 5 } ;
(B) int n{} = { 2, 4, 12, 5, 45, 5 } ;
(C) int n{6} = { 2, 4, 12 } ;
(D) int n(6) = { 2, 4, 12, 5, 45, 5 } ;

Q. An array elements are always stored in _________ memory locations.

(A) sequential
(B) random
(C) sequential and random
(D) none of the above

Q. What is the right way to access value of structure variable book{ price, page }?

(A) printf("%d%d", book.price, book.page);
(B) printf("%d%d", price.book, page.book);
(C) printf("%d%d", price::book, page::book);
(D) printf("%d%d", price->book, page->book);

Q. perror( ) function used to ?

(A) work same as printf()
(B) prints the error message specified by the compiler
(C) prints the garbage value assigned by the compiler
(D) none of the above

Q. Bitwise operators can operate upon?

(A) double and chars
(B) floats and doubles
(C) ints and floats
(D) ints and chars

Q. What is C Tokens?

(A) the smallest individual units of c program
(B) the basic element recognized by the compiler
(C) the largest individual units of program
(D) a & b both

Q. What is Keywords?

(A) keywords have some predefine meanings and these meanings can be changed.
(B) keywords have some unknown meanings and these meanings cannot be changed.
(C) keywords have some predefine meanings and these meanings cannot be changed.
(D) none of the above

Q. What is constant?

(A) constants have fixed values that do not change during the execution of a program
(B) constants have fixed values that change during the execution of a program
(C) constants have unknown values that may be change during the execution of a program
(D) none of the above

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.