Top 150+ Solved Programming for Problem Solving MCQ Questions Answer
Q. Consider the 32 bit compiler. We need to store address of integer variable to integer pointer. What will be the size of integer pointer?
a. 10 Bytes
b. 4 Bytes
c. 2 Bytes
d. 6 Bytes
Q. In order to fetch the address of the variable we write preceding _________ sign before variable name.
a. Asteriks
b. Percent
c. Comma
d. Ampersand
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. 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 -->
Q. What is true about fputs function
a. write to a file
b. takes two parameters
c. requires a file pointer
d. all of above
Q. Wild pointer in C
a. if pointer is pointing to a memory location from where variable has been deleted
b. if pointer has not been initialized
c. if pointer has not defined properly
d. if pointer pointing to more than one variable
Q. Any type of modification on the parameter inside the function will reflect in actual variable value can be related to..
a. call by value
b. call by reference
c. both of above
d. none of above
Q. To print a single character in ouptut,which function is used?
a. getchar()
b. gets()
c. putchar()
d. puts()
Q. #define t 10void main(){printf("%d",t);}
a. 10
b. Error:Unfined symbol 't'
c. Error:Improper placement of preprocessor
d. none of the above
Q. If 'a' is the integer which is not statically initialized then what is the value of 'a'?
a. zero
b. garbage
c. none of these
d. One
Q. C is a ____________________ language
a. Platform independent programming
b. Platform dependent programming
c. Object oriented programming
d. None of the above.
Q. In a function call, _____________ is passed as arguments.
a. variables
b. constants
c. Expressions
d. All the above