What will be the output of the following Python program?
i = 0 while i < 5: print(i) i += 1 if i == 3: break else: print(0)
i = 0 while i < 5: print(i) i += 1 if i == 3: break else: print(0)
Anonymous Quiz
16%
error
33%
0 1 2 0
39%
0 1 2
13%
none of the mentioned
👍1
Forwarded from Coding Mcq’s
What will be the output of the following code snippet?
print(2**3 + (5 + 6)**(1 + 1))
print(2**3 + (5 + 6)**(1 + 1))
Anonymous Quiz
51%
129
8%
8
18%
121
23%
None of above
Which feature of OOP reduces the use of nested classes?🤔
Anonymous Quiz
54%
Inheritance
17%
Binding
16%
Abstraction
12%
Encapsulation
👍1
Who invented OOP?
Anonymous Quiz
16%
Andrea Ferro
29%
Adele Goldberg
15%
Alan Kay
41%
Dennis Ritchie
Which is not a feature of OOP in general definitions?
Anonymous Quiz
18%
Efficient Code
15%
Code reusability
22%
Modularity
46%
Duplicate/Redundant data
How is the 3rd element in an array accessed based on pointer notation?🤔
Anonymous Quiz
15%
*a + 3
47%
*(a + 3)
19%
*(*a + 3)
19%
&(a + 3)
👍1
Which type of members can’t be accessed in derived classes of a base class?
Anonymous Quiz
22%
All can be accessed
22%
Protected
48%
Private
8%
Public
😁2❤🔥1🤗1
Which is valid C expression?
Anonymous Quiz
9%
int my_num = 100,000;
67%
int my_num = 100000;
19%
int my num = 1000;
5%
int $my_num = 10000;
👏3
🤯2
Which feature can be implemented using encapsulation?
Anonymous Quiz
27%
Polymorphism
29%
Overloading
16%
Inheritance
28%
Abstraction
What do we use to define a block of code in Python language?
Anonymous Quiz
10%
Key
26%
Brackets
55%
Indentation
9%
None of these
👍2
Which concept allows you to reuse the written code in C++?
Anonymous Quiz
63%
Inheritance
19%
Polymorphism
10%
Abstraction
9%
Encapsulation
Which of the following data structures can be used to implement queues?
Anonymous Quiz
21%
Stack
17%
Arrays
17%
LinkedList
45%
All of the Above
👍1
👍3
All keywords in C are in ____________
Anonymous Quiz
71%
LowerCase letters
7%
UpperCase letters
13%
CamelCase letters
9%
None of the mentioned
Which keyword is used to prevent any changes in the variable within a C program?
Anonymous Quiz
22%
immutable
17%
mutable
51%
const
10%
volatile
👍1
Hello My friends, Share this Telegram channel to all your friends so they can increase their skills & increase their knowledge 🧠🧑💻
❤🔥1
In multilevel inheritance, which is the most significant feature of OOP used?
Anonymous Quiz
13%
Code efficiency
16%
Code readability
14%
Flexibility
57%
Code reusability
👍1