functions Interview Questions and Answers
Ques:- The scope of any variable used in the entire program is ___
A. Class
B. Function
C. File
D. Local
Ques:- Which function executes faster but requires more memory space?
A. Inline function
B. Regular function
C. Void function
D. Normal function
Ques:- A variable declared above all blocks and functions has the ___
A. Class scope
B. Function scope
C. Local scope
D. Scope of a file
Ques:- The starting point for the execution of a program is ___
A. Class
B. Public
C. Void ()
D. Main()
Ques:- The return type of the function prototype float power (float,.int) is ___
A. Int
B. Float
C. Double
D. Char
Ques:- The lifetime of a ___ variable is the life time of a program.
A. Global scope
B. Local scope
C. File scope
D. Function scope
Ques:- In call by value method, the flow of data is always from the ___ statement to the function definition.
A. Call
B. Return
C. Function
D. Go to
Ques:- In ___ a local variable is defined within a block.
A. Class scope
B. Local scope
C. Function scope
D. File scope
Ques:- The calling function parameters are called as ___
A. Actual parameters
B. Dummy parameters
C. Duplicate parameters
D. Formal parameters
Ques:- In ___ method any change in the formal parameters is not reflected back to the actual parameter.
A. Call by value
B. Call by reference
C. Call
D. Return
Ques:- The main purpose of function prototype is to help the ____ to check the data requirement of the function.
A. Object
B. Linker
C. Interpreter
D. Compiler
Ques:- An ___ looks like a normal function in the source file but inserts the function’s code directly into the calling program.
A. Inline
B. Online
C. Mainline
D. Line
Ques:- The lifetime of a ___ variable, is the life time of the function block.
A. Function scope
B. File scope
C. Local scope
D. Global scope
Ques:- A function can be invoked from another function using its ___
A. Value
B. Return
C. Name
D. Variables