UNIT – 7
FUNCTIONS IN C
1) ______ are used to encapsulate a set of operations and return information to the main program or calling module.
a)*function b)pointers c)if condition d)None
2) Functions may be reused in multiple programs. (true/false)
a)*true b)False c)none
3) The function prototype is called the _______.
a) Function definition b) *Function declaration
c) Function execution d) None
4) The ______ statement can be used to return a single value from a function to main program.
a)call b)send to c)*return d)None
5) In Function , return statement is ______
a)compulsory b)*optional c)None
6) Any variable declared within the Function is called ________
a)public variables b)global variables c) *local variables d) None
7) The body of the function is bounded by a set of ______
a)*curly brackets b)square brackets c) small brackets d) None
8) If function not return any value to main , then ____ is used.
a)int b)float c)*void d) None
9) ______ type of variables available to any other function which accesses them.
a)static variables b)*global variables c) local variables d) None
10) Global variables are declared ________
a)*above main() b)within main() c) any where in the program d) None
11) When an array is passed into a function, the function receives ______
a)all values b) first values only c) *address of first element d)None
12) Strings are stored in C as _____ terminated character arrays.
a) *null b) blank c)\n d) None
13) In C, all arguments are passed into functions by value popularly called as ______
a)*pass by value b)pass by reference c) pass address d) None
14) A _______ function is a function which call itself.
a) *recursive b)function within function c) nested function d) None
15) ______ key word is used to declare the extern storage class variable.
a)*extern b)external c)exter d) None
UNIT – 7
FUNCTIONS IN C
1 A 2 A 3 B 4 C 5 B
6 C 7 A 8 C 9 B 10 A
11 C 12 A 13 A 14 A 15 A