Basic C Programming MCQ
Basic C Programming MCQ
101. Forward declaration is absolutely necessary
- if a function returns a non-integer quantity
- if the function call precedes its definition
- if the function call precedes its definition and the function returns a non integer quantity
- none of the above
102. void can be used
- as a data-type of a function that returns nothing to its calling environment
- inside the brackets of a function that does not need any argument
- in an expression
- in a printf statement
103. Any C program
- must contain at least one function
- need not contain any function
- needs input data
- none of the above
104. Choose the best answer.
storage class definesd
- the datatype
- the scope
- the scope and permanence
- the scope, permanence and data type
105. Which of the following is true of external variables ?
- They provide a way for two way communication between function
- Their scope extends from the point of definition brough the remainder of the program.
- If they are not initialized, they will have garbage value.
- None of the above.
106. puts (argv [0]);
- prints the name of the source code file
- prints argv
- prints the number of command line arguments
- prints the name of the executable code file
107. The possible output of printf ("%d %d", ptr ptr+1); is
- 262 262
- 262 266
- 262 263
- 262 265
108. The possible out put of printf ("%d %d"), wer [1], wer [1]+1; is
- 162 163
- 162 162
- 162 166
- 162 165
109. The possible output of printf ("%d %d, wer, wer+1); is
- 262 262
- 262 266
- 262 263
- 262 265