C++ Syntax and Concepts Quiz

C++ Syntax and Concepts Quiz

University

15 Qs

quiz-placeholder

Similar activities

Chapter 1-4

Chapter 1-4

University

15 Qs

Josue Cap 10-15

Josue Cap 10-15

University

16 Qs

Statistics Using R

Statistics Using R

University

10 Qs

Instruction Set Architecture Quiz

Instruction Set Architecture Quiz

University

10 Qs

Python dictionary

Python dictionary

University

11 Qs

Signal and System

Signal and System

University

15 Qs

C Programming

C Programming

University

17 Qs

Sjmit-Q1-[Workshop-MAR-25]

Sjmit-Q1-[Workshop-MAR-25]

12th Grade - University

20 Qs

C++ Syntax and Concepts Quiz

C++ Syntax and Concepts Quiz

Assessment

Quiz

Others

University

Hard

Created by

MO7MD Waled

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a correct syntax to output "Hello World" in C++?

print ("Hello World");

cout << "Hello World";

System.out.println("Hello World");

Console.WriteLine("Hello World");

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used for comments in C++?

/* comment */

// comment

// comment

both // comment or /* comment */

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct identifier in C++?

VAR_1234

$var_name

7VARNAME

7var_name

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is used to terminate the function declaration in C++?

;

]

[

:

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type is used to create a variable that should store text?

String

string

sting

None

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a variable with the floating number 2.8?

byte num=2.8;

int num = 2.8;

num =2.8;

double num=2.8;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator can be used to compare two values?

<>

==

=

><

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?