Basic C Programming MCQ Questions and Answers

Practice Mode
Showing 10 of 198 questions
Q101
Forward declaration is absolutely necessary
  • A if a function returns a non-integer quantity
  • B if the function call precedes its definition
  • C if the function call precedes its definition and the function returns a non integer quantity
  • D none of the above
Answer: Option C
Q102
void can be used
  • A as a data-type of a function that returns nothing to its calling environment
  • B inside the brackets of a function that does not need any argument
  • C in an expression
  • D in a printf statement
Answer: Option
Q103
Any C program
  • A must contain at least one function
  • B need not contain any function
  • C needs input data
  • D none of the above
Answer: Option A
Q104
Choose the best answer. storage class definesd
  • A the datatype
  • B the scope
  • C the scope and permanence
  • D the scope, permanence and data type
Answer: Option C
Q105
Which of the following is true of external variables ?
  • A They provide a way for two way communication between function
  • B Their scope extends from the point of definition brough the remainder of the program.
  • C If they are not initialized, they will have garbage value.
  • D None of the above.
Answer: Option
Q106
puts (argv [0]);
  • A prints the name of the source code file
  • B prints argv
  • C prints the number of command line arguments
  • D prints the name of the executable code file
Answer: Option D
Q107
The possible output of printf ("%d %d", ptr ptr+1); is
  • A 262 262
  • B 262 266
  • C 262 263
  • D 262 265
Answer: Option B
Q108
The possible out put of printf ("%d %d"), wer [1], wer [1]+1; is
  • A 162 163
  • B 162 162
  • C 162 166
  • D 162 165
Answer: Option A
Q109
The possible output of printf ("%d %d, wer, wer+1); is
  • A 262 262
  • B 262 266
  • C 262 263
  • D 262 265
Answer: Option B
Q110
putchar (* (wer [1]+1));
  • A print e
  • B prints a
  • C prints 1
  • D prints b
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test