
C++ - Module 9 Quiz

Quiz
•
Computers
•
4th Grade
•
Hard
Eng. Ahmed Aweis
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is a parameter in a C++ function?
C. A keyword to end the function
B. A variable used within the function
A. A value passed when declaring a function
D. A data type used for calculations
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What does the function printNum(int num) do?
B. Adds num to another variable
A. Prints the value of num
D. Checks if num is even
C. Multiplies num by 2
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the purpose of the return statement in a C++ function?
D. Loops through the code again
C. Initializes a variable
B. Prints a message to the console
A. Ends the function execution
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
In the function displayNum(int n1, float n2), what are n1 and n2?
C. Function parameters
B. Data types
A. Function names
D. Return values
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is the output of the program when num1 is 5 and num2 is 5.5?
C. The int number is 5 The double number is 5.55
B. The int number is 5 The double number is 5
D. The int number is 5 The double number is 5.0
A. The int number is 5 The double number is 5.5
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What does the code return (a + b); do in the add() function?
A. Subtracts a from b
B. Multiplies a by b
C. Divides a by b
D. Returns the sum of a and b
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What data type is used in the function add(int a, int b) to return a value?
D. float
A. void
B. double
C. int
Create a free account and access millions of resources
Similar Resources on Wayground
8 questions
Algorytmika i programowanie - klasa VIII

Quiz
•
1st - 5th Grade
8 questions
Spreadsheet Functions

Quiz
•
3rd - 5th Grade
12 questions
Python - основы

Quiz
•
1st - 12th Grade
15 questions
Spreadsheets

Quiz
•
1st - 12th Grade
12 questions
Текстовий редактор

Quiz
•
1st - 12th Grade
10 questions
Advanced SQL

Quiz
•
KG - University
13 questions
B4PrePSPM Set1

Quiz
•
1st - 5th Grade
8 questions
Interrupt for PIC18F

Quiz
•
1st - 5th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Place Value

Quiz
•
4th Grade
20 questions
Run-On Sentences and Sentence Fragments

Quiz
•
3rd - 6th Grade
20 questions
4 Types of Sentences

Quiz
•
3rd - 5th Grade
20 questions
place value

Quiz
•
4th Grade
20 questions
Place Value and Rounding

Quiz
•
4th Grade
12 questions
Text Structures

Quiz
•
4th Grade
15 questions
Place Value

Quiz
•
4th Grade
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade