VIRTUSA Previous Years Solved Sample Placement Papers
-
Point out error, if any, in the following program:
main() { int i = 1; switch (i) { case 1: printf("\nRadioactive cats have 18 half-lives"); break; case 1 * 2 + 4: printf("\nBottle for rent - inquire within"); break; } }
Ans. No error. Constant expressions like 1*2+4 are acceptable in cases of a switch.
-
Point out the error, if any, in the following program:
main() { int a = 10, b; a >= 5 ? b = 100 : b = 200; printf("\n%d", b); }
Ans. lvalue required in function main(). The second assignment should be written in parentheses as follows:
a >= 5 ? b = 100 : (b = 200);
- Frequency at which VOICE is sampled is:
(a) 4 kHz (Ans)
(b) 8 kHz
(c) 16 kHz
(d) 64 kHz - Line of Sight is:
(a) Straight Line
(b) Parabolic
(c) Tx & Rx should be visible to each other (Ans)
(d) none - Purpose of PC (Program Counter) in a MicroProcessor is:
(a) To store address of TOS (Top Of Stack)
(b) To store address of next instruction to be executed (Ans)
(c) count the number of instructions
(d) to store base address of the stack - What action is taken when the processor under execution is interrupted by a non-maskable interrupt?
(a) Processor serves the interrupt request after completing the execution of the current instruction (Ans)
(b) Processor serves the interrupt request after completing the current task
(c) Processor serves the interrupt request immediately
(d) Processor serving the interrupt request depends upon the priority of the current task under execution - The status of the Kernel is:
(a) task
(b) process (Ans)
(c) not defined
(d) none of the above - To send a data packet using datagram, connection will be established:
(a) before data transmission
(b) connection is not established before data transmission
(c) no connection is required (Ans)
(d) none of the above - Word alignment is:
(a) aligning the address to the next word boundary of the machine (Ans)
(b) aligning to even boundary
(c) aligning to word boundary
(d) none of the above -
When an operand is read, which of the following is done?
a) It is placed on to the output
b) It is placed in operator stack
c) It is ignored
d) Operator stack is emptied
Answer: a
Explanation: While converting an infix expression to a postfix expression, when an operand is read, it is placed on to the output. When an operator is read, it is placed in the operator stack.
- A can complete a project in 20 days, and B can complete the same project in 30 days. If A and B start working on the project together and A quits 10 days before the project is completed, in how many days will the project be completed?
(a) 18 days
(b) 27 days
(c) 26.67 days
(d) 16 days (Ans: A)
- If log 2 = 0.3010, find how many digits are contained in the number 256.
(a) 15
(b) 16
(c) 17
(d) Cannot be determined (Ans: C)
- Directions for Questions 41-45: Follow the directions given below to answer the questions that follow.
Your answer for each question below would be:
- (A) if ALL THREE items given in the question are exactly ALIKE.
- (B) if only the FIRST and SECOND items are exactly ALIKE.
- (C) if only the FIRST and THIRD items are exactly ALIKE.
- (D) if only the SECOND and THIRD items are exactly ALIKE.
- (E) if ALL THREE items are DIFFERENT.
- If in the word CALIBRE, the previous letter in the English alphabet replaces each consonant and each vowel is replaced by the next letter and then the order of letters is reversed, which letter will be third from the right end?
(A) A
(B) C
(C) B
(D) K
Ans: (D) - Which word cannot be made from the letters of following word: 'OBSTETRICIAN'
a) SIREN
b) TERMITE
c) RETAIN
d) SOBER
Ans: b) TERMITE - Which one of the numbers is wrong in the following series?
4, 8, 7, 14, 12, 24, 19, 36, 28
a) 12
b) 24
c) 28
d) 36
Ans: b) 24 -
'The hexadecimal number 4B16 is transmitted as an 8-bit word in parallel. What is the time required for this transmission if the clock frequency is 2.25 MHz?'
a) 444 ns
b) 444 s
c) 3.55 s
d) 3.55 ms
Ans: a) 444 ns -
'List which pins need to be connected together on a 7493 to make a MOD-12 counter.'
a) 12 to 1, 11 to 3, 9 to 2
b) 12 to 1, 11 to 3, 12 to 2
c) 12 to 1, 11 to 3, 8 to 2
d) 12 to 1, 11 to 3, 1 to 2
Ans: c) 12 to 1, 11 to 3, 8 to 2 -
'In a TTL circuit, if an excessive number of load gate inputs are connected, ________.'
a) VOH(min) drops below VOH
b) VOH drops below VOH(min)
c) VOH exceeds VOH(min)
d) VOH and VOH(min) are unaffected
Ans: b) VOH drops below VOH(min) -
'The internal RAM memory of the 8051 is:'
a) 32 bytes
b) 64 bytes
c) 128 bytes
d) 256 bytes
Ans: c) 128 bytes -
'Which of the following commands will move the number 27H into the accumulator? (8051)'
a) MOV A, P27
b) MOV A, #27H
c) MOV A, 27H
d) MOV A, @27
Ans: b) MOV A, #27H -
'An alternate function of port pin P3.0 (RXD) in the 8051 is:'
a) serial port input
b) serial port output
c) memory write strobe
d) memory read strobe
Ans: a) serial port input -
'In an 8051 program, DA A adjusts the value in the accumulator resulting from an addition into two BCDs.'
a) True
b) False
Ans: a) True -
QUESTION: Which of the following is not an extension associated during the creation of a C++ program?
A: .cpp
B: .exe
C: .jpg
D: .bak
Ans: C -
QUESTION: Why every program begins with
main()
in C++?A: As this is from the compiler knows that program execution actually starts.
B: Because its name is main
C: Both A and B
D: None of above
Ans: A