
C++ Function Quiz
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Medium
Ahmed Yaseen
Used 6+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to declare a function that returns an integer in C++?
ايه الطريقة اللي بعرف بيها فانكشن بترجعلي رقم صحيح ؟
int funcName();
void funcName();
float funcName(int x, int y);
double funcName(int x);
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the keyword return do in a C++ function?
كلمة ريتيرن فايدتها ايه في الفانكشن؟
Terminates the program
Returns control to the operating system
Returns a value from the function
Prints the output of the function
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default return type of a C++ function if not specified?
لو انا محددتش نوع الريتين تايب بتاعي اوتوماتيك بيكون ايه
int
void
float
double
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statements is correct about the scope of variables in C++?
انهي جملة من الجمل اللي ف الاختيارت صح بخصوص الاسكوب في المتغيرات
Global variables can only be used inside the main() function.
Local variables can be used outside the function where they are defined.
Global variables are accessible throughout the entire program.
Variables declared inside a function are accessible from anywhere in the program.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which built-in function in C++ is used to calculate the square root of a number?
انهي بيلت ان فانشكن مسؤول عن اني اجيب بيه الجذر التربيعي؟
power()
sqrt()
log()
rand()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you declare two local variables with the same name in two different functions?
هيحصل ايه لو انا عندي اتنين فانكشن مختلفيم مسمي في كل واحدة فيهم متغير بنفس الاسم
Compiler error
The variables share the same value
Each function will have its own version of the variable
The first variable is overwritten by the second one
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to call a function named myFunction that takes two integers as arguments?
انهي الطريقة الصح اللي بستدعي بيها الفانكشن اسمها ماي فانكشن بتاخد متغيرين من النوع انتيجر؟
myFunction();
myFunction(a, b);
myFunction(int a, int b);
myFunction(int, int);
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Chapter 3: Storage devices and media (Part 2):
Quiz
•
10th - 11th Grade
15 questions
11° Evaluación bimestral de informática
Quiz
•
11th Grade
10 questions
Server Administration- Quiz 1
Quiz
•
12th Grade - University
10 questions
Quiz 9 (15.09.2021)
Quiz
•
1st - 12th Grade
10 questions
Windows 10 Basics
Quiz
•
9th - 12th Grade
15 questions
Databases
Quiz
•
11th Grade
10 questions
Data Engineering y BigQuery V1
Quiz
•
12th Grade
15 questions
Начала программирования на языке Паскаль
Quiz
•
8th - 11th Grade
Popular Resources on Wayground
10 questions
Forest Self-Management
Lesson
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
30 questions
Thanksgiving Trivia
Quiz
•
6th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
48 questions
The Eagle Way
Quiz
•
6th Grade
10 questions
Identifying equations
Quiz
•
KG - University
10 questions
Thanksgiving
Lesson
•
5th - 7th Grade
Discover more resources for Computers
30 questions
Thanksgiving Trivia
Quiz
•
9th - 12th Grade
11 questions
Would You Rather - Thanksgiving
Lesson
•
KG - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University
18 questions
Thanksgiving Trivia
Quiz
•
4th - 12th Grade
20 questions
Thanksgiving
Quiz
•
KG - 12th Grade
20 questions
Pythagorean Theorem and Their Converse
Quiz
•
8th - 9th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
10 questions
Thanksgiving Trivia Challenge: Test Your Knowledge!
Interactive video
•
6th - 10th Grade
