C++ Basics

C++ Basics

7th Grade

10 Qs

quiz-placeholder

Similar activities

Functions and Variables in MakeCode

Functions and Variables in MakeCode

6th - 8th Grade

10 Qs

Computer Hardware & Software Review

Computer Hardware & Software Review

6th - 8th Grade

14 Qs

Categories of computers

Categories of computers

4th Grade - University

12 Qs

Python Syntax

Python Syntax

6th - 12th Grade

14 Qs

Memory Registers and RAM: Crash Course Computer Science #6

Memory Registers and RAM: Crash Course Computer Science #6

6th - 8th Grade

13 Qs

Internal PC Components

Internal PC Components

KG - 8th Grade

10 Qs

Internal Computer Parts

Internal Computer Parts

7th - 8th Grade

9 Qs

Micro:bit Refresher

Micro:bit Refresher

7th - 8th Grade

14 Qs

C++ Basics

C++ Basics

Assessment

Quiz

Computers

7th Grade

Easy

Created by

Jarosław Stański

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

// This is a single-line comment

/* This is a single-line comment */

/* This is a single-line comment

// This is a multi-line comment

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main function in C++?

The main function is the starting point of the program.

The main function is the main function.

The main function is used for declaring variables.

The main function is responsible for printing output.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between 'int' and 'double' data types in C++?

int stores floating-point numbers, double stores integer values.

int stores double precision numbers, double stores integer values.

int stores integer values, double stores floating-point numbers with double precision.

int stores floating-point numbers with double precision, double stores integer values.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a variable in C++?

int num;

float value;

string name;

bool flag;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the 'cout' statement used for in C++?

It is used to perform mathematical calculations in C++.

It is used to output data to the standard output stream.

It is used to input data from the standard input stream.

It is used to declare variables in C++.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the 'cin' statement used for in C++?

To write output to the standard output stream

To read input from the standard input stream

To perform mathematical operations

To declare a variable

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the 'if' statement used for in C++?

Conditional execution

Used for printing output

For loop execution

Data type declaration

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?