
Variables and cin

Quiz
•
Information Technology (IT)
•
University
•
Hard
Fatma Metwally
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following is a valid C++ variable name?
my_variable
1var
student name
var1
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid C++ keyword?
int
myvariable
123
hello
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid C++ comment?
a. // This is a comment
b. / This is a multi-line comment /
c. # This is a comment
Both a) and b)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of cin in C++?
The purpose of 'cin' is to display output to the user.
'cin' is used to declare variables in C++.
'cin' is a function that performs calculations.
The purpose of 'cin' in C++ is to read input from the user.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly takes input for two integers a and b?
cin(a, b);
cin >> a >> b;
cin << a, b;
cin >> a, b;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the Output
if input: x=4 y =7
You entered: 7 and 4
You entered: 4 and 7
13
error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used for assignment in C++?
-=
+=
=
==
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
Coding With Python- Introductory Quiz

Quiz
•
University
13 questions
Search questions from Quizizz Library

Quiz
•
University
8 questions
Comandos de Repetição - Parte II

Quiz
•
University
7 questions
C++ Structuri repetitive

Quiz
•
8th Grade - University
15 questions
Adding Interactive Elements in HTML

Quiz
•
12th Grade - University
10 questions
Latsol

Quiz
•
10th Grade - University
10 questions
Understanding User Interfaces and Programming

Quiz
•
9th Grade - University
10 questions
Week2 上周知识点回顾

Quiz
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade