πŸ“Š Programming for Problem Solving
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
πŸ’¬ Discuss
βœ… Correct Answer: (C) 2 Bytes
πŸ“Š Programming for Problem Solving
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) Ampersand
πŸ“Š Programming for Problem Solving
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 }
πŸ’¬ Discuss
βœ… Correct Answer: (A) int num[6] = { 2, 4, 12, 5, 45, 5 } ;
πŸ“Š Programming for Problem Solving
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 -->
πŸ’¬ Discuss
βœ… Correct Answer: (A) printf("%d%d", book.price, book.page);
πŸ“Š Programming for Problem Solving
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
πŸ’¬ Discuss
βœ… Correct Answer: (B) if pointer has not been initialized
πŸ“Š Programming for Problem Solving
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
πŸ’¬ Discuss
βœ… Correct Answer: (B) call by reference

Jump to