
C++ and Python Syntax MCQs
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Joyslin Jenifer
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
25 questions
Ulangan Semester Gasal C++
Quiz
•
12th Grade
25 questions
VOIP (TLJ) KELAS 12
Quiz
•
12th Grade
25 questions
PRETEST BK TIK KELAS 12
Quiz
•
12th Grade
27 questions
Python Fundamentals - II
Quiz
•
11th - 12th Grade
25 questions
Quiz informatica
Quiz
•
8th - 12th Grade
25 questions
CSP Unit 6 Review
Quiz
•
12th Grade
26 questions
ÔN tập
Quiz
•
12th Grade
25 questions
Тестирование ПО №1
Quiz
•
12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
