Geometrics Previous Years Solved Sample Placement Papers
-
The library function
exit()
causes an exit from:A: The loop in which it occurs
B: The block in which it occurs
C: The function in which it occurs
D: The program in which it occurs
Ans: D -
The
getche()
library function:A: Returns a character when any key is pressed
B: Returns a character when ENTER is pressed
C: Displays a character on the screen when any key is pressed
D: Does not display a character on the screen
Ans: A -
When an argument is passed by reference:
A: A variable is created in the function to hold the argument value
B: The function cannot access the argument value
C: A temporary variable is created in the calling program to hold the argument's value
D: None of these
Ans: A -
Overloaded functions:
A: Are a group of functions with the same value
B: All have the same number and types of arguments
C: Make life simpler for programmers
D: May fail unexpectedly due to stress
Ans: C -
A static function:
A: Should be called when an object is destroyed
B: Is closely connected with an individual object of a class
C: Can be called using the class name and function
D: Is used when a dummy object must be created
Ans: C -
Dividing a program into functions:
A: Is the key to object-oriented programming
B: Makes the program easier to conceptualize
C: Makes the program run faster
D: Both B and C
Ans: C -
Static member function:
A: Can access any other member function & member variables
B: Can access only static member variables & member functions
C: Can be called only through the object of the class
D: Returns only static data
Ans: B -
Which of the following statements is correct?
A: C++ enables defining functions that take constants as an argument.
B: We cannot change the argument of functions that are declared as constant.
C: Both A and B.
D: We cannot use the constant while defining the function.
Ans: C