II-224 Programming Concepts
Multiple-choice Questions
1. The arguments of caller function are called by .
(a) Actual arguments (b) Formal arguments (c) Memory variable
2. Which keyword is used for a function not returning any value?
(a) void (b) int (c) auto
3. Function prototype is not compulsory when function definition given .
(a) Before caller function (b) After caller function (c) At the end of program
4. The limitation of return statement .
(a) Can return only one value (b) Is critical to use (c) Consumes more memory space
5. The recursion of the function can be stopped .
(a) Using conditional statement (b) By pressing Ctrl + Break (c) Using keyword return
6. In C functions, return statement is not compulsory because return address is .
(a) Stored on the stack
(b) Stored into the pointer
(c) Stored in register variable of the CPU
7. The use of return statement is to .
(a) Return value
(b) Inform compiler end of program
(c) To push back the control of the program
8. When a user-defined function is invoked, values are passed .
(a) On the stack (b) Into ROM (c) To memory variables
9. When a function returns value 0 (zero), it indicates .
(a) Normal termination (b) Erroneous termination (c) None of the above
10. Arrays are passed to function by .
(a) Value (b) Address (c) None of the above
11. It is necessary to declare void type in the function definition when a function does not return
.
(a) Any value (b) Integer (c) Float
12. By default function returns .
(a) Integer (b) Float (c) Null
13. The main is a .
(a) Keyword (b) User-defined function (c) Library function
14. Which is the correct statement for finding the cube of 5?
(a) pow(5,3); (b) pow(3,5);
(c) pow(3); (d) None of the above
15. The floor() function returns .
(a) Round down value (b) Round up value
(c) Absolute value (d) Zero value
M10_ITL-ESL4791_02_SE_C10.indd 224 12/22/2012 5:01:42 PM