Reviewer
Quiz yourself by thinking what should be in
each of the black spaces below before clicking
on it to display the answer.
Help!
|
|
||||
---|---|---|---|---|---|
show | 2
🗑
|
||||
Which of the following is NOT included in a function declaration? | show 🗑
|
||||
Library functions are also known as _______ function: | show 🗑
|
||||
show | abs
🗑
|
||||
show | abs
🗑
|
||||
show | int functCall (int x) {return x = x+1;}
🗑
|
||||
show | Function
🗑
|
||||
In C++, arguments to functions always appear within ______________. | show 🗑
|
||||
show | 1
🗑
|
||||
The function that returns no value is known as | show 🗑
|
||||
show | All of the mentioned
🗑
|
||||
If we start our function call with default arguments, then what will be the proceeding arguments? | show 🗑
|
||||
show | 20
🗑
|
||||
Overloaded functions are: | show 🗑
|
||||
What is the output of the program? #include <iostream> using namespace std; int fun(int=0, int = 0); int main() { cout << fun(5); return 0; } int fun(int x, int y) { return (x+y); } | show 🗑
|
||||
What is the value that is returned in the following function? int getVolume() { int v; v = 23; if (v < 50) { return 50; } return v; } | show 🗑
|
||||
show | 10
🗑
|
||||
show | Error
🗑
|
||||
show | char myGrade(int x)
🗑
|
||||
show | double myGrade (double p, double q)
🗑
|
||||
show | void
🗑
|
||||
show | 1
🗑
|
||||
A function can be called from another function using its ____________ | show 🗑
|
||||
The return type of the function float divide (float a, float b)) is : | show 🗑
|
||||
show | Function name
🗑
|
||||
show | Return type and function name
🗑
|
||||
show | semicolon
🗑
|
||||
A function can return a value by calling using the keyword _____________ | show 🗑
|
||||
Which of the following doesn’t return a value? | show 🗑
|
||||
show | overloaded function
🗑
|
||||
Output?? #include <iostream> using namespace std; int factorial(int); int main() { int n = 4; cout << "Factorial is = " << factorial(4); return 0; } int factorial(int n) { if (n > 1) { return n*factorial(n-1); } else { return 1; } } | show 🗑
|
||||
show | =
🗑
|
||||
show | Type and number of Arguments
🗑
|
||||
In C++, variables can be passed to a function by: | show 🗑
|
||||
show | return
🗑
|
||||
Where should default parameters appear in a function prototype? | show 🗑
|
||||
show | ceil
🗑
|
||||
show | Functions
🗑
|
||||
show | Return Type
🗑
|
||||
A type of variable inside a function | show 🗑
|
||||
Where does the execution of the program starts? | show 🗑
|
||||
Check the given code: int add(int a,int b) { int add; add = a + b; return add; } What would be the returning value data type? | show 🗑
|
||||
show | func(int x)
🗑
|
||||
show | getScore()
🗑
|
||||
In C++, which of the following is important in a function? | show 🗑
|
||||
What is the output of the program? #include < iostream > using namespace std; void fun(int x, int y) { x = 20; y = 10; } int main() { int x = 10; fun(x, x); cout << x; return 0; } | show 🗑
|
||||
show | int
🗑
|
||||
show | int
🗑
|
||||
show | Overloaded
🗑
|
||||
What are the mandatory parts of a function declaration? | show 🗑
|
||||
A placeholder of values passed into a function. | show 🗑
|
||||
show | Void function
🗑
|
||||
show | Declaration
🗑
|
||||
show | invoked
🗑
|
||||
show | int
🗑
|
||||
show | cmath
🗑
|
||||
Where does the default parameter can be placed by the user? | show 🗑
|
||||
A function that calls itself is a __________ function | show 🗑
|
||||
show | int foo(int x, int y =5, int z=10)
🗑
|
||||
show | All of the mentioned
🗑
|
||||
show | error
🗑
|
||||
show | pow
🗑
|
||||
Which of the following function is used to accept user inputs? | show 🗑
|
||||
It states that the function is a non-returning value function | show 🗑
|
||||
The main function in C++ is __________________. | show 🗑
|
||||
show | Functions are overloaded
🗑
|
||||
Which value will it take when both user and default values are given? | show 🗑
|
||||
show | function declaration
🗑
|
||||
show | Call by Value and Call by Reference
🗑
|
||||
show | All of the mentioned
🗑
|
||||
Which of the following computes for the square root of a number? | show 🗑
|
||||
show | floor
🗑
|
||||
show | Error
🗑
|
||||
show | default value
🗑
|
||||
In the following declaration, what is the return type? int myMethod(int count, double value) { return 4; } | show 🗑
|
||||
Which of the following is NOT a proper function prototype (definition)? | show 🗑
|
||||
show | double
🗑
|
||||
What will happen when we use a void in argument passing? | show 🗑
|
||||
In order to use the round function, we must include the _________ library | show 🗑
|
||||
show | 1hi
🗑
|
||||
show | Same function name but different number of arguments
🗑
|
||||
show | When a function is declared
🗑
|
||||
show | TheSum
🗑
|
||||
In C++, from which function the execution of a C++programs starts? | show 🗑
|
||||
show | 12
🗑
|
||||
show | void
🗑
|
||||
Where does the “return statement” return the execution of the program? | show 🗑
|
||||
It refers to the information that can be passed to a function | show 🗑
|
||||
In C++, the block of code begins and ends with: | show 🗑
|
||||
show | 3
🗑
|
||||
show | int myRoundedGrade(int x)
🗑
|
||||
show | startCall(4432, 3);
🗑
|
||||
show | double
🗑
|
||||
When a parameter is passed to a function, it is called ______________. | show 🗑
|
||||
Which of the following is a valid function call (assuming the function exists)? | show 🗑
|
Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.
Normal Size Small Size show me how
Normal Size Small Size show me how
Created by:
PipoyKuraku