C Questions and Answers
C Questions and Answers
a) break
b) continue
c) terminate
d) exit
Q26. Functions with the same name and different parameters represents :
a) function overloading
b) function overriding
c) recursion
d) None of the mentioned
Q27 Can we declare a function inside the structure of C?
a) YES
b) NO
c) Both of them
d) None of them
28.What will happen if in a C program you assign a value to an array element whose
subscript exceeds the size of array?
A. The element will be set to 0.
B. The compiler would report an error.
C. The program may crash if some important data gets overwritten.
D. The array size would appropriately grow.
29. long int factorial (long x)
{
????
return x * factorial(x – 1);
}
With what do you replace the ???? to make the function shown above return the correct
answer?
A. if (x == 0) return 0;
B. return 1;
C. if (x >= 2) return 2;
D. if (x <= 1) return 1;
30. C programs are converted into machine language with the help of
A. An Editor
B. A compiler
C. An operating system
D. None of the above
31. In switch statement, each case instance value must be _______?
A. Constant
B. Variable
C. Special Symbol
D. None of the avobe
};
return 0;
}
40. Out of the following operations, which one is not possible in the case of a register
variable?
a. Global declaration of the register variable
b. Copying the value from the memory variable
c. Reading any value into the register variable
d. All of the above