Description : What is the output when following code is executed ? >>> str1 = 'hello' >>> str2 = ',' >>> str3 = 'world' >>> str1[-1:] a) olleh b) hello c) h d) o
Last Answer : b) hello
Description : hat is the output when following code is executed ? >>>print r"\nhello" The output is a) a new line and hello b) \nhello c) the letter r and then hello d) error
Last Answer : d) error
Description : What is the output of the following piece of code when executed in Python shell? >>> a=("Check")*3 >>> a a) (‘Check’,’Check’,’Check’) b) * Operator not valid for tuples c) (‘CheckCheckCheck’) d) Syntax erro
Last Answer : c) (‘CheckCheckCheck’)
Description : What is the output when following code is executed ? >>>list1 = [11, 2, 23] >>>list2 = [11, 2, 2] >>>list1 < list2 is a) True b) False c) Error d) None
Last Answer : b) False
Description : What is the output when following code is executed ? names1 = ['Amir', 'Bear', 'Charlton', 'Daman'] names2 = names1 names3 = names1[:] names2[0] = 'Alice' names3[1] = 'Bob' sum = 0 for ls in (names1, names2, names3): ... if ls[1] == 'Bob': sum += 10 print sum a) 11 b) 12 c) 21 d) 22
Last Answer : d) 22
Description : What is the output when following code is executed ? >>>names = ['Amir', 'Bear', 'Charlton', 'Daman'] >>>print(names[-1][-1]) a) A b) Daman c) Error d) n
Last Answer : b) Daman
Description : What is the output when following statement is executed ? >>> print(‘x\97\x98’) a) Error b) 97 98 c) x\97 d) \x97\x98
Last Answer : c) x\97
Description : What is the output when following statement is executed ? >>>print('new' 'line') a) Error b) Output equivalent to print ‘new\nline’ Page No 22 c) newline d) new line
Last Answer : c) newline
Description : What is the output when following statement is executed ? >>>"abcd"[2:] a) a b) ab c) cd d) dc
Last Answer : c) cd
Description : What will be the output at PORT1 if the following program is executed? MVI B, 82H MOV A, B MOV C, A MVI D, 37H OUT PORT1 HLT (A) 37H (B) 82H (C) B9H (D) 00H
Last Answer : Answer: B Explanation: In 8085 programming, the result of an operation is stored in the accumulator. So output is 82H.
Description : What will be the output of the following segment of the program? main( ) { char *s = “hello world”; int i = 7; printf(“%, *s”, i, s); } (A) Syntax error (B) hello w (C) hello (D) o world
Last Answer : Answer: Marks given to all
Description : When the following code is executed what will be the value of x and y? int x = 1, y=0; y = x++; (A) 2, 1 (B) 2, 2 (C) 1, 1 (D) 1, 2
Last Answer : (A) 2, 1
Description : What is the output when we execute list(“hello”)? a) [‘h’, ‘e’, ‘l’, ‘l’, ‘o’]. b) [‘hello’]. c) [‘llo’]. d) [‘olleh’].
Last Answer : a) [‘h’, ‘e’, ‘l’, ‘l’, ‘o’].
Description : A ………………… attaches itself to executable files and replicates, when the infected program is executed, by finding other executable files to infect. A) Stealth virus B) Polymorphic Virus C) Parasitic Virus
Last Answer : C) Parasitic Virus
Description : In process scheduling, ………………… determines which ready process will be executed next by processor. A) long term scheduling B) medium term scheduling C) short term scheduling D) none of the above
Last Answer : C) short term scheduling
Description : Process is ........................ A) A program in execution B) An instance of a program running on a computer. C) The entity that can be assigned to and executed D) All of the above.
Last Answer : D) All of the above.
Description : Suppose d = { john :40, peter :45}, what happens when we try to retrieve a value using the expression d[ susan ]? a) Since susan is not a value in the set, Python raises a KeyError ... Python raises a KeyError exception d) Since susan is not a key in the set, Python raises a syntax error
Last Answer : c) Since “susan” is not a key in the set, Python raises a KeyError exception
Description : Suppose that the number of instructions executed between page faults is directly proportional to the number of page frames allocated to a program. If the available memory is doubled, the mean interval between page faults is also ... memory were available? (A) 60 sec (B) 30 sec (C) 45 sec (D) 10 sec
Last Answer : Answer: C Explanation: T = Ninstr x 1µs + 15,000 x 2,000 µs = 60s Ninstr x 1µs = 60,000,000 µs - 30,000,000 µs = 30,000,000 µs Ninstr = 30,000,000 The number of instruction ... doesn't mean that the program runs twice as fast as on the first system. Here, the performance increase is of 25%.
Description : What is the output of the following code? a={1:"A",2:"B",3:"C"} a.clear() print(a) a) None b) { None:None, None:None, None:None} c) {1:None, 2:None, 3:None} d) { }
Last Answer : d) { }
Description : What is the output of the following code? a={1:"A",2:"B",3:"C"} b={4:"D",5:"E"} a.update(b) print(a) a) {1: ‘A’, 2: ‘B’, 3: ‘C’} b) Method update() doesn’t exist for dictionaries c) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’, 5: ‘E’} d) {4: ‘D’, 5: ‘E’}
Last Answer : c) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’, 5: ‘E’}
Description : What is the output of the following code? a={1:"A",2:"B",3:"C"} a.setdefault(4,"D") print(a) a) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’}. b) None. c) Error.
Last Answer : a) {1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’}.
Description : What is the output of the following code? a={1:"A",2:"B",3:"C"} print(a.setdefault(3)) a) {1: ‘A’, 2: ‘B’, 3: ‘C’} b) C c) {1: 3, 2: 3, 3: 3} d) No method called setdefault() exists for dictionary
Last Answer : b) C
Description : What is the output of the following code? a={1:"A",2:"B",3:"C"} print(a.get(5,4)) a) Error, invalid syntax b) A c) 5 d) 4
Last Answer : d) 4
Description : What is the output of the following piece of code? a={1:"A",2:"B",3:"C"} print(a.get(1,4)) a) 1 b) A c) 4
Last Answer : b) A
Description : What is the output of the following code? a={1:"A",2:"B",3:"C"} for i,j in a.items(): print(i,j,end=" ") a) 1 A 2 B 3 C b) 1 2 3 c) A B C d) 1:”A” 2:”B” 3:”C”
Last Answer : a) 1 A 2 B 3 C
Description : What is the output of the following piece of code? >>> a=(0,1,2,3,4) >>> b=slice(0,2) >>> a[b] a) Invalid syntax for slicing b) [0,2]. c) (0,1) d) (0,2)
Last Answer : c) (0,1)
Description : What is the output of the following code? >>> a=(2,3,4) >>> sum(a,3) a) Too many arguments for sum() method b) The method sum() doesn’t exist for tuples c) 12 d) 9
Last Answer : c) 12
Description : What is the output of the following code? >>> a=(1,2,3,4) >>> del(a[2]) a) Now, a=(1,2,4) b) Now, a=(1,3,4) c) Now a=(3,4) d) Error as tuple is immutable
Last Answer : d) Error as tuple is immutable
Description : What is the output of the following code? >>> a=(1,2,(4,5)) >>> b=(1,2,(3,4)) >>> a
Last Answer : a) False
Description : What will be the output of the following ‘C’ code ? main ( ) { int x = 128; printf (“\n%d”, 1 + x++); } (A) 128 (B) 129 (C) 130 (D) 131
Last Answer : (B) 129
Description : To remove string “hello” from list1, we use which command ? a) list1.remove(“hello”) b) list1.remove(hello) c) list1.removeAll(“hello”) d) list1.removeOne(“hello”)
Last Answer : d) list1.removeOne(“hello”)
Description : What is the output when following statement is executed ? >>>"a"+"bc" a) a b) bc c) bca d) abc
Last Answer : b) bc
Description : What will be the final value of variable x after the following code is executed: -Technology
Last Answer : The value is:1
Description : What values will be displayed in JOptionPane when the following code is executed? -Technology
Last Answer : No value will be displayed in JOptionPane because it will give exception in thread ‘main’ due to null.
Description : What will be the values of i and z after the following code is executed : -Technology
Last Answer : Value of i = 10Value of z = 5
Description : What will be displayed in jTextFieldl and jTextField2 after the following code is executed : -Technology
Last Answer : OutputjTextFieldl will contain value = 12jTextField2 will contain value = 13
Description : ……………. are not machine instructions and therefore, Java interpreter generates machine code that can be directly executed by the machine that is running the Java program. A) Compiled Instructions B) Compiled code C) byte code D) Java mid code
Last Answer : C) byte code
Description : A compiler is used to convert the following to object code which can be executed (A) High-level language (B) Low-level language (C) Assembly language (D) Natural language
Last Answer : (A) High-level language
Description : The command which transcribes the standard input to the standard output and also makes a copy of the same in a file is A. tee B. tr C. sort D. grep E. None of the above
Last Answer : A. tee
Description : The out object is an object encapsulated inside the ................. class, and represents the standard output device. A) standard B) local C) globlal D) system
Last Answer : D) system
Description : Which of the following are the functions of operating system? i) recovering from errors ii) facilitating input/output iii) facilitating parallel operation iv) sharing hardware among users v) implementing user interface A) i, ii, ... only C) ii, iii, iv and v only D) All i, ii, iii, iv and v
Last Answer : D) All i, ii, iii, iv and v
Description : State True or False. i) In spooling high speed device like a disk is interposed between running program and low-speed device in Input/output. ii) By using spooling for example instead of writing directly to a printer, ... ii-False B) i-True, ii-True C) i-False, ii-True D) i-False, ii-False
Last Answer : B) i-True, ii-True
Description : State True or False. 1. Term of reference is the final output of Feasibility Study 2. Design specification report is the final output of System Analysis A) 1-true, 2-true B) 1-false, 2-true C) 1-true, 2-false D) 1-false, 2-false
Last Answer : A) 1-true, 2-true
Description : Based on the identification of objectives, input, output and file content, the vital document is called … A) System Definition B) System Document C) System Requirement Document D) System Subject
Last Answer : B) System Document
Description : The output of problem definition stage is …………….. A) Master Development Plan B) Terms of reference C) Feasibility report D) Final product
Last Answer : B) Terms of reference
Description : HIPO stand for A) Hierarchy input process output B) Hierarchy input plus output C) Hierarchy plus input process output D) Hierarchy input output Process
Last Answer : A) Hierarchy input process output
Description : Design Phase consists of ……………………. 1. Identity the functions to be performed 2. Design the input/output and file design 3. Defining basic parameters for system design A) 1 & 2 B) 2 & 3 C) 1 & 3 D) 1, 2 & 3
Last Answer : D) 1, 2 & 3
Description : MICR reader is an ............... device. A) Input B) Output C) Electric D) Storage
Last Answer : A) Input
Description : What will be the output? d = {"john":40, "peter":45} print(list(d.keys())) a) [“john”, “peter”]. b) [“john”:40, “peter”:45]. c) (“john”, “peter”) d) (“john”:40, “peter”:45)
Last Answer : a) [“john”, “peter”].
Description : What is the output? d = {"john":40, "peter":45} d["john"] a) 40 b) 45 c) “john” d) “peter”
Last Answer : a) 40