Search Header Logo

C++ 40Questions

Authored by Thanuja V

Computers

8th Grade

Used 1+ times

C++ 40Questions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is used to add single line comments in C++?

// This is a comment

/* This is a comment */

<!-- This is a comment -->

// This is a comment //

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you input data from the user in C++?

cin

cout

endl

scanf

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you output data to the console/output in C++?

cin

cout

endl

printf

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which manipulator is used to insert a new line in the output stream?

cin

cout

endl

printf

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a valid variable name in C++?

myVariable

123abc

_variable

variable2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you concatenate two strings in C++?

str1 + str2

str1 . str2

str1 & str2

str1 : str2

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used for logical AND 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?