Variables and cin

Variables and cin

University

10 Qs

quiz-placeholder

Similar activities

OCN TQA - 101

OCN TQA - 101

University

12 Qs

Transformação Digital

Transformação Digital

University

12 Qs

PPL 223 - (QUIZ 3) Data Types and Structures

PPL 223 - (QUIZ 3) Data Types and Structures

University

15 Qs

Borders and Shades in Word 2010 Quiz

Borders and Shades in Word 2010 Quiz

10th Grade - University

12 Qs

Forum Activity Tech quiz

Forum Activity Tech quiz

University

15 Qs

1ro B Preguntas sobre IA y Prompts

1ro B Preguntas sobre IA y Prompts

1st Grade - University

10 Qs

ASSESSING HARDWARE

ASSESSING HARDWARE

University

10 Qs

MAD Unit 5 T1

MAD Unit 5 T1

University

10 Qs

Variables and cin

Variables and cin

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Fatma Metwally

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Media Image

Predict the Output

  1. 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++?

-=

+=

=

==

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?