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
10 questions
Basic java

Quiz
•
University
10 questions
Java Arrays

Quiz
•
University
10 questions
PDS - 04225 Pointers & Dynamic Arrays - Chapter 8

Quiz
•
University - Professi...
10 questions
C Programming Lab Quiz

Quiz
•
University
15 questions
ARRAYS AND FUNCTIONS

Quiz
•
University
12 questions
Arrays C++

Quiz
•
University
10 questions
Structure in C

Quiz
•
University
15 questions
Arrays and Pointers in C

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University