Top 150+ Solved Programming for Problem Solving MCQ Questions Answer

From 91 to 105 of 105

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 }

  • a. int num[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 -->

  • a. printf("%d%d", book.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

  • 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

  • b. if pointer has not been initialized

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

  • b. call by reference

Q. Size of void pointer is

a. 1 byte

b. 2 byte

c. 3 byte

d. 4 byte

  • b. 2 byte

Q. To print a single character in ouptut,which function is used?

a. getchar()

b. gets()

c. putchar()

d. puts()

  • c. putchar()

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

  • a. 10

Q. Explicit data type conversion is called

a. Type casting

b. conversion

c. separation

d. none

  • a. Type casting

Q. which of these is not a valid character constant

a. “A”

b. ‘A’

c. “*”

d. “+”

  • a. “A”

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

  • b. garbage

Q. C is a ____________________ language

a. Platform independent programming

b. Platform dependent programming

c. Object oriented programming

d. None of the above.

  • b. Platform dependent programming

Q. In a function call, _____________ is passed as arguments.

a. variables

b. constants

c. Expressions

d. All the above

  • d. All the above
Subscribe Now

Get All Updates & News