Introduction to C++ 2024/25

Introduction to C++ 2024/25

12th Grade

10 Qs

quiz-placeholder

Similar activities

GCSE Computer Science - Programming Keywords

GCSE Computer Science - Programming Keywords

9th - 12th Grade

15 Qs

Praca klasowa C++

Praca klasowa C++

12th Grade

12 Qs

Quiz Bahasa C++ 1

Quiz Bahasa C++ 1

9th - 12th Grade

10 Qs

basics of javascript

basics of javascript

9th - 12th Grade

11 Qs

L.5 . PYTHON - VARIABLES AND OPERATORS - 2

L.5 . PYTHON - VARIABLES AND OPERATORS - 2

12th Grade

10 Qs

TIK KELAS IX

TIK KELAS IX

12th Grade

13 Qs

C++ dasar

C++ dasar

10th - 12th Grade

9 Qs

cs1300-F17-Week8

cs1300-F17-Week8

12th Grade - University

15 Qs

Introduction to C++ 2024/25

Introduction to C++ 2024/25

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Dzurejdz Crnkic

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 3 pts

What is the correct syntax for an if statement in C++?

if x > 5 {}

if (x > 5) {}

if x > 5 then {}

if {x > 5}

2.

MULTIPLE CHOICE QUESTION

1 min • 3 pts

Which of the following is a valid declaration of an integer variable in C++?

int 1 number;

number int;

int number;

number : int;

3.

MULTIPLE CHOICE QUESTION

1 min • 3 pts

Which of the following is the correct way to read an integer from user input using cin?

cin >> int userInput;

int userInput;

cin << userInput;

int userInput;

cin >> userInput;

userInput = cin;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What data type would you use to store a single character in C++?

string

char

int

double

5.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Media Image

What will the following code display?

"x is greater than 5"

"x is not greater than 5"

"x is greater than 10"

None of the above

6.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which C++ logical operator is used for logical AND?

&&

||

!

&

7.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What is the purpose of the "else if" statement in C++?

To declare variables

To create a nested if

To specify an alternative condition to be tested

To end a program

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?