
W11: CP07 Quiz (BECC0302)
Quiz by Bryan N. Manalaotao
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
15 questions
Show answers
- Q1What is a function in C++?A group of statements performing a taskA code declarationA data typeA loop structure30s
- Q2Which function is mandatory in every C++ program?execute()main()begin()start()30s
- Q3What does a function declaration in C++ consist of?Function parameters onlyFunction body and parametersFunction name and return typeFunction name and body30s
- Q4What keyword is used for functions that do not return a value in C++?doubleintcharvoid30s
- Q5Which of the following is NOT a part of a function definition in C++?Return typeFunction callParametersFunction name30s
- Q6How are function parameters passed in C++ by default?Call by referenceCall by nameCall by valueCall by pointer30s
- Q7What is the purpose of a function declaration in C++?To define the return bodyTo tell the compiler about the function name and how to call itTo call the functionTo declare variables30s
- Q8Which function is used to concatenate two strings in C++?memcpy()strcat()strcpy()strcat_s()30s
- Q9What is the correct syntax for defining a function in C++?function_name {function body}function_name return_type(parameter list) {function body}return_type function_name {function body}return_type function_name(parameter list) {function body}30s
- Q10How are changes made to parameters inside a function affected when using call by value?They create a new argumentThey generate a compilation errorThey have no effect on the argument passed to the functionThey affect the argument passed to the function30s
- Q11What is the purpose of a function body in C++?To define what the function doesTo define function parametersTo declare variablesTo define the return type30s
- Q12Which method of copies the reference in C++ allows changes made to parameters inside a function to affect the argument?Call by referenceCall by pointerCall by nameCall by value30s
- Q13What is the function signature in C++?Function bodyReturn typeFunction nameFunction name and parameter list30s
- Q14What happens when a function is called in C++?The function is defined and executedThe program stops executionThe main function is invokedProgram control is transferred to the called function30s
- Q15What does a function declaration include in C++?Function nameFunction name, parameter list, and return typeFunction body and parametersFunction parameters only30s