Function Overloading in C++ - Quizizz
Function Overloading in C++ - Quizizz
Function Overloading in C++ - Quizizz
Multiple Choice
a) loops b) Types
c) Braces d) Arguments/Parameters
Multiple Choice
a) int b) Braces
c) Arguments d) void
Multiple Choice
a) string b) int
c) void d) { }
Multiple Choice
_____ function ( ) {
return greeting;
a) variable b) void
c) string d) int
Multiple Choice
_____ function ( ) {
int a;
cin >> a;
a) variable b) int
c) string d) void
Multiple Choice
a) False b) True
Multiple Choice
7. True or False. A function that returns a string starts with the word void.
a) False b) True
Multiple Choice
a) variable b) bool
c) string d) int
e) void
Multiple Choice
double function ( ) {
int a;
cin >> a;
return ____ ;
a) a * 3.14 b) "a"
c) cin d) a
Multiple Choice
11. A function __________ contains the statements that make up the function.
a) prototype b) call
c) expression d) definition
Multiple Choice
a) called b) prototyped
c) declared d) defined
Multiple Choice
13. This type of variable is defined inside a function and is not accessible outside
the function.
a) counter b) local
c) global d) reference
Multiple Choice
a) global b) reference
c) default d) local
Multiple Choice
a) create b) retrieve
c) document d) execute
Multiple Choice
a) global b) floating-point
c) local d) counter
Multiple Choice
Multiple Choice
Multiple Choice
19. What is the return type of the function with prototype: "int func(char x, float v,
double t);"?
a) float b) char
c) double d) int
Multiple Choice
20.
What will the above code display?
a) 4 b) 4
4 2
c) 2 d) 2
4 2
Multiple Choice
21. When a class becomes a friend of another class they are additionally getting
access to:
Multiple Choice
a) Protected b) Public
c) Private
Multiple Choice
23. What does the word const do when placed at the end of a member function in a
class?
Multiple Choice
24.
25.
Multiple Choice
26. When overloading a function, the signature of the function is determined by:
a) The return type, name and number b) The name of the function and
of arguments and types. number of argument and types
c) The name of the function
Multiple Choice
27. What happens if the word static is placed in front of a member function in C++?
28. What does the word virtual do when placed in front of a member function in
C++?
a) Does not place the function in text b) Forces derived classes to define the
segment if it is not called. function to compile.
c) None of the above. d) Allows derived classes, not required,
to define the function.
Multiple Choice
1. d) Arguments/Parameters
2. d) void 3. b) int