
Mastering C++ Functions

Quiz
•
Information Technology (IT)
•
University
•
Hard
Fatma Metwally
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q1. What is the correct syntax for defining a function in C++?
int func_name(int x);
func_name int(int x);
int func_name(int x) { ... };
void func_name { int x };
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q2. Which of the following statements about function overloading is true?
Function overloading requires all functions to have exactly the same parameters.
Function overloading can only be done with return types.
Function overloading allows multiple functions with the same name but different parameters.
Function overloading is not supported in object-oriented programming.
3.
OPEN ENDED QUESTION
3 mins • 1 pt
Write a function that takes two integers as parameters and returns their product.
Evaluate responses using AI:
OFF
4.
OPEN ENDED QUESTION
3 mins • 1 pt
Write a program with a function that calculates and returns the average of three integers.
Evaluate responses using AI:
OFF
5.
OPEN ENDED QUESTION
3 mins • 1 pt
Write a function that swaps the values of two integer variables. Use this function in main.
Evaluate responses using AI:
OFF
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Q6. What is the return type of a function that does not return a value?
int
float
void
string
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code. What will be the output?
25
15
30
Error: missing argument for y
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Java_MCQ_3

Quiz
•
University
10 questions
AverageRound

Quiz
•
University
15 questions
Test wiedzy: Tablice jednowymiarowe w C++

Quiz
•
10th Grade - University
20 questions
Introduction to C# Programming

Quiz
•
10th Grade - University
13 questions
Python Programming Quiz

Quiz
•
University
20 questions
Python Quiz Girls in ICT Day

Quiz
•
University
12 questions
Web aplikacije - uvodne vježbe

Quiz
•
University
20 questions
Функції у Python

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade