Search Header Logo

12A and C version 1 Final Semester 1 Exam

Authored by Dina Sharawy

Information Technology (IT)

12th Grade

Used 3+ times

12A and C version 1 Final Semester 1 Exam
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to declare an integer variable in C++?

int num;

integer num;

var num;

num int;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output? int x = 5, y = 10; cout << x + y;

10

15

50

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following loops executes at least once, regardless of the condition?

for loop

while loop

do-while loop

None of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code print? int a = 8; if (a % 2 == 0) cout << "Even"; else cout << "Odd";

Even

Odd

8

Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code? for (int i = 0; i < 3; i++) cout << i << " ";

0 1 2

1 2 3

0 1 2 3

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used for multiplication in C++?

/

*

%

#

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of x after the following code executes? int x = 5; x += 10;

5

10

15

50

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?