Basic C Programming MCQ Questions and Answers

Practice Mode
Showing 10 of 198 questions
Q111
In which of the following cases will the character 't' be printed
  • A putchar (* ( *(ptr + 1) + 2));
  • B putchar ( *(wer[1] + 2));
  • C putchar (* (ptr+1) + 2)
  • D none of the above
Answer: Option
Q112
Choose the correct statement.
  • A Address is the numeric value associated with a memory location.
  • B Two variables can have the same address.
  • C Address is bound to a variable by the compilier.
  • D Value of a variable can be an address.
Answer: Option
Q113
Feature of accessing a variable through its address is desirable beccause
  • A call by reference can be simulated
  • B call by value can be simulated
  • C a function can return more than one value
  • D excessive use of global variables can be avoided
Answer: Option
Q114
int i = 5; is a statement in a C program. Which of the following are true ?
  • A During execution, value of i may change but not its address
  • B During execution bothh the address and value may change
  • C repeated execution may result in different addresses for i
  • D I may not have an associated address
Answer: Option C
Q115
Choose the correct statements.
  • A Address operator cannot be applied to register variables.
  • B Address operator can be applied to register variables.
  • C Misuse of register declaration will increase the execution time.
  • D None of the above
Answer: Option
Q116
Choose the best answer.
  • A it should be declared
  • B it should be initialized
  • C it shouldd be both declared and initialized
  • D none of the above
Answer: Option C
Q117
The operators > and < meaningful when used with pointers, if
  • A the pointers point to data of similar type
  • B the pointers point to structure of similar data type
  • C the pointers point to elements of the same array
  • D none of these
Answer: Option C
Q118
A set of names can be represented as a
  • A two-dimensional array of charcters
  • B one-dimensional array of strings
  • C one-dimensional array of pointers to charcter
  • D none of the these
Answer: Option
Q119
If arr is a two dimensional array of 10 rows and 12 columns, then arr [5] logically points to the
  • A sixth row
  • B fifth row
  • C fifth column
  • D sixth column
Answer: Option A
Q120
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
  • A storage needed will be proportional to the size of the data
  • B execution will be faster
  • C swapping process becomes easier and faster
  • D none of the above
Answer: Option
Questions and Answers for Competitive Exams Various Entrance Test