
C++ and Python Syntax MCQs

Quiz
•
Computers
•
12th Grade
•
Hard
Joyslin Jenifer
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
File Handling in Python -Revision test

Quiz
•
12th Grade
32 questions
Test próbny EE.09 (PHP C++)

Quiz
•
9th - 12th Grade
25 questions
Algorithms - python (GCSE)

Quiz
•
10th - 12th Grade
29 questions
TIN HỌC KTRA 15P

Quiz
•
10th Grade - University
30 questions
BCHS Y9 Python Topic 6 Quiz

Quiz
•
9th - 12th Grade
25 questions
TECH IQ CLASH

Quiz
•
9th - 12th Grade
30 questions
2nd year ch#5 arrays

Quiz
•
12th Grade
30 questions
MYSQL Test-1

Quiz
•
11th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade