MCQOPTIONS
 Saved Bookmarks
				This section includes 477 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science Engineering (CSE) knowledge and support exam preparation. Choose a topic below to get started.
| 351. | 
                                    Say s=â€hello†what will be the return value of type(s)? | 
                            
| A. | int | 
| B. | bool | 
| C. | str | 
| D. | string | 
| Answer» D. string | |
| 352. | 
                                    What will be displayed by print(ord(‘b’) – ord(‘a’))? | 
                            
| A. | 0 | 
| B. | 1 | 
| C. | -1 | 
| D. | 2 | 
| Answer» C. -1 | |
| 353. | 
                                    >>>print("A", end = ' ') | 
                            
| A. | dcba | 
| B. | a, b, c, d | 
| C. | d c b a | 
| D. | d, c, b, a will be displayed on four lines | 
| Answer» D. d, c, b, a will be displayed on four lines | |
| 354. | 
                                    +2+3? | 
                            
| A. | hello123 | 
| B. | hello | 
| C. | error | 
| D. | hello6 | 
| Answer» D. hello6 | |
| 355. | 
                                    The format function, when applied on a string returns | 
                            
| A. | error | 
| B. | int | 
| C. | bool | 
| D. | str | 
| Answer» E. | |
| 356. | 
                                    Which of the following statement prints hello\example\test.txt? | 
                            
| A. | print(“hello\\example\\test.txtâ€) | 
| B. | print(“hello\\example\\test.txtâ€) | 
| C. | print(“hello\\â€example\\â€test.txtâ€) | 
| D. | print(“helloâ€\\exampleâ€\\test.txtâ€) | 
| Answer» C. print(“hello\\â€example\\â€test.txtâ€) | |
| 357. | 
                                    >>>print(chr(ord('b')+1)) | 
                            
| A. | a | 
| B. | b | 
| C. | c | 
| D. | a | 
| Answer» D. a | |
| 358. | 
                                    Suppose s is “\t\tWorld\nâ€, what is s.strip()? | 
                            
| A. | \\t\\tworld\\n | 
| B. | \\t\\tworld\\n | 
| C. | \\t\\tworld\\n | 
| D. | world | 
| Answer» E. | |
| 359. | 
                                    >>>chr(ord('A')) | 
                            
| A. | a | 
| B. | b | 
| C. | a | 
| D. | error | 
| Answer» B. b | |
| 360. | 
                                    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 | 
| Answer» D. s3 = s1 * s2 | |
| 361. | 
                                    >>>example[::-1].startswith("d") | 
                            
| A. | dlrowolleh | 
| B. | true | 
| C. | -1 | 
| D. | none | 
| Answer» C. -1 | |
| 362. | 
                                    >>>example.rfind("e") | 
                            
| A. | -1 | 
| B. | 4 | 
| C. | 3 | 
| D. | 1 | 
| Answer» C. 3 | |
| 363. | 
                                    >>>example.find("e") | 
                            
| A. | error | 
| B. | -1 | 
| C. | 1 | 
| Answer» D. | |
| 364. | 
                                    Given a string example=â€hello†what is the output of example.count(‘l’)? | 
                            
| A. | 2 | 
| B. | 1 | 
| C. | none | 
| Answer» B. 1 | |
| 365. | 
                                    >>>max("what are you") | 
                            
| A. | error | 
| B. | u | 
| C. | t | 
| D. | y | 
| Answer» E. | |
| 366. | 
                                    >>>print example | 
                            
| A. | snow | 
| B. | snow world | 
| C. | error | 
| D. | snos world | 
| Answer» D. snos world | |
| 367. | 
                                    >>>print(temp.id) | 
                            
| A. | 224 | 
| B. | error | 
| C. | 12 | 
| D. | none | 
| Answer» D. none | |
| 368. | 
                                    >>>print "%d %d" % (obj.o1, obj.o2) | 
                            
| A. | none none | 
| B. | none 22 | 
| C. | 22 none | 
| D. | error is generated | 
| Answer» E. | |
| 369. | 
                                    >>>print("%s" % example[4:7]) | 
                            
| A. | wo | 
| B. | world | 
| C. | sn | 
| D. | rl | 
| Answer» B. world | |
| 370. | 
                                    >>>str1[::-1] | 
                            
| A. | dlrowolleh | 
| B. | hello | 
| C. | world | 
| D. | helloworld | 
| Answer» B. hello | |
| 371. | 
                                    >>>print (r"\nhello") | 
                            
| A. | a new line and hello | 
| B. | \\nhello | 
| C. | the letter r and then hello | 
| D. | error | 
| Answer» C. the letter r and then hello | |
| 372. | 
                                    xA + 0xB + 0xC) | 
                            
| A. | 0xa0xb0xc | 
| B. | error | 
| C. | 0x22 | 
| D. | 33 | 
| Answer» E. | |
| 373. | 
                                    What arithmetic operators cannot be used with strings? | 
                            
| A. | + | 
| B. | * | 
| C. | – | 
| D. | all of the mentioned | 
| Answer» D. all of the mentioned | |
| 374. | 
                                    >>>print('new' 'line') | 
                            
| A. | error | 
| B. | output equivalent to print ‘new\\nline’ | 
| C. | newline | 
| D. | new line | 
| Answer» D. new line | |
| 375. | 
                                    >>>"abcd"[2:] | 
                            
| A. | a | 
| B. | ab | 
| C. | cd | 
| D. | dc | 
| Answer» D. dc | |
| 376. | 
                                    >>> str1[-1:] | 
                            
| A. | olleh | 
| B. | hello | 
| C. | h | 
| D. | o | 
| Answer» E. | |
| 377. | 
                                    >>>"a"+"bc" | 
                            
| A. | a | 
| B. | bc | 
| C. | bca | 
| D. | abc | 
| Answer» E. | |
| 378. | 
                                    ] in a: print(a[0]) | 
                            
| A. | 0 1 2 3 | 
| B. | 0 1 2 2 | 
| C. | 3 3 3 3 | 
| D. | error | 
| Answer» B. 0 1 2 2 | |
| 379. | 
                                    0)): print(i) | 
                            
| A. | 0.0 1.0 | 
| B. | 0 1 | 
| C. | error | 
| D. | none of the mentioned | 
| Answer» C. error | |
| 380. | 
                                    0): print(i) | 
                            
| A. | 0.0 1.0 | 
| B. | 0 1 | 
| C. | error | 
| D. | none of the mentioned | 
| Answer» D. none of the mentioned | |
| 381. | 
                                    30) | 
                            
| A. | true | 
| B. | false | 
| C. | error | 
| D. | no output | 
| Answer» C. error | |
| 382. | 
                                    R operator. Hence the output of the code shown above is: 20 10. | 
                            
| A. | 1011011 | 
| B. | 11010100 | 
| C. | 11101011 | 
| D. | 10110011 | 
| Answer» C. 11101011 | |
| 383. | 
                                    ): print(i) | 
                            
| A. | 0 | 
| B. | no output | 
| C. | error | 
| D. | none of the mentioned | 
| Answer» C. error | |
| 384. | 
                                    -2)+bin(12^4) | 
                            
| A. | 0b10000 | 
| B. | 0b10001000 | 
| C. | 0b1000b1000 | 
| D. | 0b10000b1000 | 
| Answer» E. | |
| 385. | 
                                    Which of the following expressions can be used to multiply a given number ‘a’ by 4? | 
                            
| A. | a<<2 | 
| B. | a<<4 | 
| C. | a>>2 | 
| D. | a>>4 | 
| Answer» B. a<<4 | |
| 386. | 
                                    ^12 | 
                            
| A. | 2 | 
| B. | 4 | 
| C. | 8 | 
| D. | 12 | 
| Answer» D. 12 | |
| 387. | 
                                    Bitwise                    gives 1 if either of the bits is 1 and 0 when both of the bits are 1. | 
                            
| A. | or | 
| B. | and | 
| C. | xor | 
| D. | not | 
| Answer» D. not | |
| 388. | 
                                    00000 is also equal to 10000000. Hence the statement is false. | 
                            
| A. | 001101010 | 
| B. | 110010101 | 
| C. | 001101011 | 
| D. | 110010100 | 
| Answer» B. 110010101 | |
| 389. | 
                                    It is not possible for the two’s complement value to be equal to the original value in any case. | 
                            
| A. | true | 
| B. | false | 
| Answer» C. | |
| 390. | 
                                    x75 | 
                            
| A. | 115 | 
| B. | 116 | 
| C. | 117 | 
| D. | 118 | 
| Answer» D. 118 | |
| 391. | 
                                    x8) | 
                            
| A. | ‘0bx1000’ | 
| B. | 8 | 
| C. | 1000 | 
| D. | ‘0b1000’ | 
| Answer» E. | |
| 392. | 
                                    Which of the following represents the bitwise XOR operator? | 
                            
| A. | & | 
| B. | ^ | 
| C. | ! | 
| Answer» C. ! | |
| 393. | 
                                    Which of the following expressions results in an error? | 
                            
| A. | int(1011) | 
| B. | int(‘1011’,23) | 
| C. | int(1011,2) | 
| D. | int(‘1011’) | 
| Answer» D. int(‘1011’) | |
| 394. | 
                                    1)? | 
                            
| A. | 1011 | 
| B. | 11 | 
| C. | 13 | 
| D. | 1101 | 
| Answer» B. 11 | |
| 395. | 
                                    The expression 2**2**3 is evaluates as: (2**2)**3. | 
                            
| A. | true | 
| B. | false | 
| Answer» C. | |
| 396. | 
                                    +2**5//10 | 
                            
| A. | 3 | 
| B. | 7 | 
| C. | 77 | 
| Answer» C. 77 | |
| 397. | 
                                    //6%3, 24//4//2 | 
                            
| A. | (1,3) | 
| B. | (0,3) | 
| C. | (1,0) | 
| D. | (3,1) | 
| Answer» B. (0,3) | |
| 398. | 
                                    2. Hence the result of this expression is 27.2. | 
                            
| A. | 4.7 – 1.5 | 
| B. | 7.9 * 6.3 | 
| C. | 1.7 % 2 | 
| D. | 3.4 + 4.6 | 
| Answer» D. 3.4 + 4.6 | |
| 399. | 
                                    +int(2.39)%2) | 
                            
| A. | 5.0 | 
| B. | 5 | 
| C. | 4 | 
| D. | 4 | 
| Answer» D. 4 | |
| 400. | 
                                    **(3**2) (2**3)**2 2**3**2 | 
                            
| A. | 64, 512, 64 | 
| B. | 64, 64, 64 | 
| C. | 512, 512, 512 | 
| D. | 512, 64, 512 | 
| Answer» E. | |