
Test Your Python and C Knowledge
Quiz
•
Engineering
•
University
•
Practice Problem
•
Hard
Vinay Vadaparthi
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to define a function in Python?
define function_name(parameters):
function_name(parameters) = def
def function_name(parameters):
function function_name(parameters)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In C, how do you declare a variable of type integer?
int myVariable;
var myVariable;
integer myVariable;
float myVariable;
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'self' keyword in Python?
The 'self' keyword is a built-in function for string manipulation.
The 'self' keyword is used to create static methods in a class.
The 'self' keyword is used to refer to the instance of the class.
The 'self' keyword is used to define a class in Python.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the difference between 'malloc' and 'calloc' in C.
'malloc' and 'calloc' are the same function
'malloc' allocates memory without initialization, while 'calloc' allocates memory and initializes it to zero.
'malloc' allocates memory and initializes it to a random value
'calloc' allocates memory without any parameters
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a pointer in C and how is it declared?
A pointer in C is declared using the syntax 'type *pointerName;'. For example, 'int *ptr;' declares a pointer to an integer.
A pointer in C is a variable that holds a string value.
A pointer in C is declared using 'type pointerName;'.
A pointer in C is declared with the syntax 'pointerName *type;'.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you create a list in Python?
You create a list in Python using curly braces, e.g., my_list = {1, 2, 3}.
You create a list in Python using parentheses, e.g., my_list = (1, 2, 3).
You create a list in Python by using the list() function, e.g., my_list = list(1, 2, 3).
You create a list in Python using square brackets, e.g., my_list = [1, 2, 3].
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following Python code: print(2 ** 3)?
4
8
6
9
Create a free account and access millions of resources
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
10 questions
TOPIC 3: STEEL
Quiz
•
University
15 questions
Simple and Compound Machines
Quiz
•
7th Grade - University
15 questions
Quiz Manajemen Operasi
Quiz
•
University
10 questions
Aircraft Structure Chapter 3
Quiz
•
University
11 questions
Metal forming processes
Quiz
•
University
14 questions
Quality Management Practices in the Industry 4.0 Era
Quiz
•
12th Grade - University
15 questions
English for Engineering Part 2
Quiz
•
University
10 questions
Ignite Your Engine: A Spark Plug Tune-Up
Quiz
•
10th Grade - University
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Engineering
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
7 questions
Different Types of Energy
Interactive video
•
4th Grade - University
7 questions
Transition Words and Phrases
Interactive video
•
4th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Biomolecules (Updated)
Interactive video
•
11th Grade - University
34 questions
Unit 5 Review - The Middle Ages in Europe-B
Quiz
•
9th Grade - University
26 questions
Day2 classwork: Permutation and combination
Quiz
•
2nd Grade - University
5 questions
Using Context Clues
Interactive video
•
4th Grade - University
