C++ and Python Syntax MCQs

C++ and Python Syntax MCQs

12th Grade

30 Qs

quiz-placeholder

Similar activities

DFD - EVALUACION

DFD - EVALUACION

9th - 12th Grade

25 Qs

Business Letters and MS Word

Business Letters and MS Word

6th - 12th Grade

30 Qs

Bilişim Teknolojileri

Bilişim Teknolojileri

5th Grade - Professional Development

25 Qs

Problem Solving & Game Development

Problem Solving & Game Development

9th - 12th Grade

25 Qs

DESAIN GRAFIS PERCETAKAN LEVEL 3

DESAIN GRAFIS PERCETAKAN LEVEL 3

12th Grade - University

25 Qs

KISI KISI UAS

KISI KISI UAS

6th - 12th Grade

25 Qs

TIK Icon

TIK Icon

12th Grade

25 Qs

Quize SK

Quize SK

12th Grade - University

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?