Think Crusaders

a) 10
b) 11
c) 0
d) Error
2) What will be the output of the following statement ? printf( 3 + "goodbye");
a) goodbye
b) odbye
c) bye
d) dbye
3) Which of the following data type will throw an error on modulus operation(%)?
a) int
b) float
c) char
d) short
4) Which of the following cannot be a variable?
a) __init__
b) in
c) it
d) on
5) print(chr(ord(‘B’)+1))
a) B
b) C
c) B+1
d) Error
6) What is the type of sys.argv?
a) set
b) list
c) tuple
d) string
7)What is the output of the expression? round(4.5676,2)
a) 4.5
b) 4.6
c) 4.57
d) 4.56
a) no output
b) i i i i i i …
c) a b c d e f
d) Error
9) Which of the following is not a keyword?
a) eval
b) assert
c) nonlocal
d) pass
10) To concatenate two strings to a third what statements are applicable ?
a) s3 = s1 . s2
b) s3 = s1.add(s2)
c) s3 = s1.__add__(s2)
d) s3 = s1 * s2
11) We want to round off x, a float, to an int value, The correct way to do is
a) y = (int)(x + 0.5)
b) y = int(x + 0.5)
c) y = (int)x + 0.5
d) y = (int)((int)x + 0.5)
12) The keyword used to transfer control from a function back to the calling function is
a) Switch
b) Goto
c) go back
d) Return
13) Which of the following cannot be checked in a switch-case statement?
a) Character
b) Integer
c) Float
d) Enum
a) Hello
b) CSE
c) Error
d) None of the above
15) Relational operators cannot be used on:
a) structure
b) long
c) strings
d) float
16) Which of the following is an invalid if-else statement?
a) if (if (a == 1)){}
b) if (func1 (a)){}
c) if (a){}
d) if ((char) a){}
a) 2
b) 1
c) 0.5
d) Undefined behaviour
18) What is the output of “hello”+1+2+3 ?
a) hello123
b) hello
c) Error
d) hello6
19) t=(1,2,3,4), t[2]=10,print(t)
a) 1,2,10,4
b) 1,10,2,4
c) Error
d) 1,10,10,4
20) What is the output of the following? print('Ab!2'.swapcase())
a) AB!@
b) Error
c) aB!2
d) aB1@
Email:
{"name":"Think Crusaders", "url":"https://www.quiz-maker.com/Q2D1D4E","txt":"2) What will be the output of the following statement ? printf( 3 + \"goodbye\");, 3) Which of the following data type will throw an error on modulus operation(%)?","img":"https://cdn.poll-maker.com/44-1471624/1.png?sz=1200"}
Powered by: Quiz Maker