Basic C Programming MCQ

Basic C Programming MCQ
111. In which of the following cases will the character 't' be printed
  • putchar (* ( *(ptr + 1) + 2));
  • putchar ( *(wer[1] + 2));
  • putchar (* (ptr+1) + 2)
  • none of the above
Show Answer
112. Choose the correct statement.
  • Address is the numeric value associated with a memory location.
  • Two variables can have the same address.
  • Address is bound to a variable by the compilier.
  • Value of a variable can be an address.
Show Answer
113. Feature of accessing a variable through its address is desirable beccause
  • call by reference can be simulated
  • call by value can be simulated
  • a function can return more than one value
  • excessive use of global variables can be avoided
Show Answer
114. int i = 5; is a statement in a C program. Which of the following are true ?
  • During execution, value of i may change but not its address
  • During execution bothh the address and value may change
  • repeated execution may result in different addresses for i
  • I may not have an associated address
Show Answer
115. Choose the correct statements.
  • Address operator cannot be applied to register variables.
  • Address operator can be applied to register variables.
  • Misuse of register declaration will increase the execution time.
  • None of the above
Show Answer
116. Choose the best answer.
  • it should be declared
  • it should be initialized
  • it shouldd be both declared and initialized
  • none of the above
Show Answer
117. The operators > and < meaningful when used with pointers, if
  • the pointers point to data of similar type
  • the pointers point to structure of similar data type
  • the pointers point to elements of the same array
  • none of these
Show Answer
118. A set of names can be represented as a
  • two-dimensional array of charcters
  • one-dimensional array of strings
  • one-dimensional array of pointers to charcter
  • none of the these
Show Answer
119. If arr is a two dimensional array of 10 rows and 12 columns, then arr [5] logically points to the
  • sixth row
  • fifth row
  • fifth column
  • sixth column
Show Answer
120. While sorting a set of names, representing the names as an array of pointers is preferable to representing the names as a two dimensional array of characters, because
  • storage needed will be proportional to the size of the data
  • execution will be faster
  • swapping process becomes easier and faster
  • none of the above
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test