Programming with C++

Programming with C++

University

40 Qs

quiz-placeholder

Similar activities

Basic Algorithm in C (Data type, Expression, Branching, Looping)

Basic Algorithm in C (Data type, Expression, Branching, Looping)

University

40 Qs

ASAS SAINS KOMPUTER T2 [ULANGKAJI]

ASAS SAINS KOMPUTER T2 [ULANGKAJI]

1st Grade - University

40 Qs

Arrays in C

Arrays in C

University

40 Qs

Topic 1 Introduction to Computer System

Topic 1 Introduction to Computer System

University

40 Qs

Midterm prep 7th

Midterm prep 7th

7th Grade - University

41 Qs

Unit 9.1 - Textual Programming

Unit 9.1 - Textual Programming

8th Grade - University

35 Qs

Exception Handling

Exception Handling

University

39 Qs

Java Midterm

Java Midterm

University

39 Qs

Programming with C++

Programming with C++

Assessment

Quiz

Computers

University

Hard

Created by

Abdulmalik Ahmad Lawan

Used 12+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax for a C++ single-line comment?

// This is a comment
# This is a comment
/*/ This is a comment */
-- This is a comment

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a C++ keyword?
main
function
output
loop

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is text output to the console in C++?
printthis("Hello");
output("Hello");
cout << "Hello";
display("Hello");

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of comments in C++?
To execute specific code
To make the code readable for humans
To hide code from the compiler
To create syntax errors

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which C++ function is used for user input?
print()
getthis()
input()
cin>>

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a variable in C++?
variable x;
int x;
x = int;
declare x as integer;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to declare an integer variable in C++?
char
float
int
integer

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?