C++ and Python Syntax MCQs

C++ and Python Syntax MCQs

12th Grade

30 Qs

quiz-placeholder

Similar activities

SciVis 1 Study guide

SciVis 1 Study guide

KG - University

25 Qs

MYSQL

MYSQL

12th Grade

25 Qs

Code HS JavaScript Control Structures

Code HS JavaScript Control Structures

9th - 12th Grade

25 Qs

Quiz Herramientas TIC

Quiz Herramientas TIC

12th Grade

30 Qs

DEWE-04 RetU1

DEWE-04 RetU1

12th Grade

25 Qs

PTS XII - 8

PTS XII - 8

12th Grade - University

25 Qs

Khám Phá Công Cụ Tìm Kiếm

Khám Phá Công Cụ Tìm Kiếm

8th Grade - University

25 Qs

XII RPL BD. Ulangan Harian

XII RPL BD. Ulangan Harian

10th - 12th Grade

25 Qs

C++ and Python Syntax MCQs

C++ and Python Syntax MCQs

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Joyslin Jenifer

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to declare a variable in C++?

int num;

num = int()

int = num;

num := int

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you print a string in Python?

echo "Hello"

cout << "Hello"

print("Hello")

printf("Hello")

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which line defines a function in Python?

function myFunc():

def myFunc():

func myFunc():

void myFunc()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid comment in C++?

// This is a comment

# This is a comment

-- This is a comment

% This is a comment

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is the correct input method in Python?

cin >> x

x = input()

x = gets()

read(x)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print(2 + 3 * 2) in Python?

10

12

8

7

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a valid data type in C++?

int

float

stringy

char

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?