Top 50+ Solved C Programming Basic MCQ Questions Answer
Q. Who is father of C Language?
a. bjarne stroustrup
b. dennis ritchie
c. james a. gosling
d. dr. e.f. codd
Q. C Language developed at _____?
a. at & t's bell laboratories of usa in 1972
b. at & t's bell laboratories of usa in 1970
c. sun microsystems in 1973
d. cambridge university in 1972
Q. For 16-bit compiler allowable range for integer constants is ______ ?
a. -3.4e38 to 3.4e38
b. -32767 to 32768
c. -32768 to 32767
d. -32668 to 32667
Q. C programs are converted into machine language with the help of
a. an editor
b. a compiler
c. an operating system
d. none of the above
Q. A C variable cannot start with
a. an alphabet
b. a number
c. a special symbol other than underscore
d. both (b) and (c)
Q. Which of the following is allowed in a C Arithmetic instruction
a. []
b. {}
c. ()
d. none of the above
Q. Which of the following shows the correct hierarchy of arithmetic operations in C
a. / + * -
b. * - / +
c. + - / *
d. * / + -
Q. What is an array?
a. an array is a collection of variables that are of the dissimilar data type.
b. an array is a collection of variables that are of the same data type.
c. an array is not a collection of variables that are of the same data type.
d. none of the above.
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