Programming with C++

Programming with C++

University

40 Qs

quiz-placeholder

Similar activities

AP CS A unit 1

AP CS A unit 1

11th Grade - University

36 Qs

JS Lesson 31-72

JS Lesson 31-72

12th Grade - University

40 Qs

Decision and Case Control Statements in C

Decision and Case Control Statements in C

University

35 Qs

[AP CSP] Programming with Conditionals [If, Elif, Else]

[AP CSP] Programming with Conditionals [If, Elif, Else]

9th Grade - University

35 Qs

standard input output

standard input output

University

41 Qs

Java Programming

Java Programming

University

40 Qs

GCSE Computer Science - 2.1-2.2

GCSE Computer Science - 2.1-2.2

University

43 Qs

CPP Midterm

CPP Midterm

University

35 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?