Worksheetsdebug quiz part 2
Total questions: 25
Worksheet time: 15mins
What is the output
l=1,M=1
l=6 M=5
l=4,M=5
l=5,M=6
What is the output?
720
5040
830
none of these
What is the output?
#0#1#1#2#3#4#5#
0#1#1#2#3#4#5#6##
#0#1#2#3#4#5#6
#0#1#1#2#3#4#5#6#7#8#9#10
This program will print the
soft limit of the size of the file in bytes that can be created by the process
hard limit of the size of the file in bytes that can be created by the process
soft 7 hard limit of the size of the file in bytes that can be created by the process
none of the mentioned
What is the output of this program?
maximum numbers of the file that can store in this directory
maximum length of a filename in this directory that the process is allowed to create
none of the mentioned
segmentation fault
What is the output?
Error
-1
1
0
Given a string example=”hello” what is the output of example.count(‘l’)?
1
2
3
0
What is the output
30
error
40
870
What is the output?
17
20
21
18
What is meant by a polymorphism in C++?
class having only single form
class having four forms
class having many forms
class having two forms
To concatenate two strings to a third what statements are applicable?
s3 = s1 . s2
s3 = s1.add(s2)
s3 = s1.__add__(s2)
s3 = s1 * s2
i = 0
while i < 5:
print(i)
i+= 1
if i == 3:
break
else:
print(0)
0 1 2 0
0 1 1
0 1 2
Error
What will print?
nothing will print
“sanfoundry” will print 5 times
program will generate syntax error
none of the mentioned
Pick the incorrect statement about inline functions in C++?
Saves overhead of a return call from a function
They are generally very large and complicated function
These functions are inserted/substituted at the point of call
They reduce function call overheads
What is the output?
5
6
syntax error
Value error
What are the two main types of functions in Python?
Built in function
System function
Built in function and user defined function
Both a and b
What is the output?
success
fail
compilation error
logical error
Which concept allows you to reuse the written code in C++?
Abstraction
Interface
Inheritance
Polymorphism
apple = mango
What is the error?
Syntax error
Value error
Name error
Type error
What is the output?
72
56
88
75
Which of the following is true
a is assigned a value of 1
b is assigned a value of [2,3]
b is assigned a value of (2,3)
b is assigned a value of 2
What is the output of the code above ?
1 4
1
1 None
1 [2,3,4]
1 (2,3,4)
What does the picture represent?
Byte
Code
Switche
Bit
What is the output of the code above
[3.6, 3.7, 3.8, 4]
[101, 102, 103, 104]
[100,200,300,400]
[3.7,3.9,103,455]
Result of the program above is
('1', '2', '3', '4', '5')
(1, 2, 3, 4, 5)
12345
"12345"
