C++ Basics (1)

Quiz
•
Computers
•
University
•
Medium
Long Trần
Used 2+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a variable in C++?
A keyword that holds a constant value
A memory location that stores a value and can change during program execution
A function that performs a task
A literal that cannot be modified
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid way to declare a constant in C++?
int const PI = 3.14;
constant int PI = 3.14;
const int PI = 3.14;
double PI = 3.14;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an integer data type in C++?
float
char
int
bool
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? bool x = true; cout in a C++ program?
To include standard input/output functions
To define constants
To declare variables
To create a new library
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of x after the following code? int x = 5; x += 3;
5
8
3
10
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to read input from the console in C++?
cin >> variable;
get(input);
input(variable);
scanf("%d", &variable);
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following symbols is used for comments that span multiple lines in C++?
//
/* */
#
{}
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Java Quiz based on array

Quiz
•
University
15 questions
module3

Quiz
•
University
10 questions
Initiation à la programmation 5 : les tableaux

Quiz
•
University
10 questions
Java Programming Basics

Quiz
•
University
15 questions
BASIC C QUIZ

Quiz
•
University
10 questions
C++ Array

Quiz
•
University
15 questions
C++ Quiz-1

Quiz
•
University
16 questions
Think it through

Quiz
•
University - Professi...
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University