Wipro Placement Paper 2014
Part-1:
1) What is the output of the program given below
main()
{
signed char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
}
Explanation:
Notice the semicolon at the end of the for loop. THe initial value of the i is set to 0. The inner loop executes to increment the value from 0 to 127 (the positive range of char) and then it rotates to the negative value of -128. The condition in the for loop fails and so comes out of the for loop. It prints the current value of i that is -128.
2) In Ms-Dos what command you will use to display system date?
Explanation:
Ver command displays the version number of Dos. There is no command as Disk. Format command prepares a disk to be used with DOS. Thus Date is the command that lets you to display and/or change the system date.
3) What function should be used to free the memory allocated by calloc() ?
A . dealloc();
B . \(\displaystyle{malloc(variable_name, 0)}\)
C . free();
D . memalloc(variable_name, 0)
ANS: C
4)The difference between linear array and a record is
A . An array is suitable for homogeneous data but hte data items in a record may have different data type
B . In a record, there may not be a natural ordering in opposed to linear array.
C . A record form a hierarchical structure but a lienear array does not
D . All of above
ANS: D
5) Only file names and extensions are to be displayed in wide format, which command you’ll use?
Explanation:
Dir/w only displays the file names and extensions excluding file created date/time, file size. Second option dir a: will list the contents of A drive (floppy drive), third dir/s lists current directory and its subdirectories too, dir/b displays bare format, that means, it just makes a list of files, no more information
6) Which of the following is not the required condition for binary search algorithm?
A . The list must be sorted
B . There should be the direct access to the middle element in any sublist
C. There must be mechanism to delete and/or insert elements in list
D. none of above
ANS: C
7) Which one is the first layer of OSI Protocol
A. Physical Layer
B. Section Layer
C. Application Layer
D. Datalink Layer
ANS: A
8) If 20% of a = b, then b% of 20 is the same as:
A. 4% of a
B. 5% of a
C. 20% of a
D. None of these
ANS: A
9) A is thrice as good as workman as B and therefore is able to finish a job in 60 days less than B. Working together, they can do it in:
A. 20 days
B. 22(1/2) days
C. 25 days
D. 30 days
ANS: B
10) A is two years older than B who is twice as old as C. If the total of the ages of A, B and C be 27, the how old is B?
Explanation:
Let C's age be x years. Then, B's age = 2x years. A's age = (2x + 2) years. (2x + 2) + 2x + x = 27 5x = 25 x = 5. Hence, B's age = 2x = 10 years.
11) Here are some words translated from an artificial language. moolokarn means blue sky, wilkospadi means bicycle race, moolowilko means blue bicycle. Which word could mean "race car"?
Explanation:
From wilkospadi, you can determine that wilko means bicycle and spadi means race. Therefore, the first part of the word that means racecar should begin with spadi. That limits your choices to b and d. Choice b, spadiwilko, is incorrect because we have already determined that wilkomeans bicycle. Therefore, the answer must be" spadivolo".
12)Which of the following directories contain all the files created by a user, including his login directory ?
A. /tmp
B. /usr
C. /etc
D. /dev
ANS: B
13) Using ODL, you can define which of the following?
A . Attribute
B . Structure
C . Operation
D . All of the above
ANS: D
14)Which command is used to list out all the hidden files along with the other files ?
A . Is-1
B . Is-F
C . Is-x
D . Is-a
ANS: D
15)void main() { int i=5; printf("%d",i++ + ++i); }
A . Compiler error
B . 6
C . 5
D . Output Cannot be predicted exactly
ANS: D
16)What is the similarity between a structure, union and enumeration?
A . All of them let you define new values
B . All of them let you define new data types
C . All of them let you define new pointers
D . All of them let you define new structures
ANS: A
17)TCP/IP Protocol is ------------
A. connectionless
B. connection oriented
C. Both A& B
D. None
ANS: B
18)A pointer is
A. A keyword used to create variables
B. A variable that stores address of an instruction
C. A variable that stores address of other variable
D. All of the above
ANS: C
19) An ODBC, a file that can be shared among database users is called a
A. system data source.
B. file data source.
C. user data source.
D. SQL text file.
ANS: B
20) Which is the valid declarations within an interface definition?
A. public double methoda();
B. public final double methoda();
C. static void methoda(double d1);
D. protected void methoda(double d1);
ANS: A
Explanation:
Option A is correct. A public access modifier is acceptable. The method prototypes in an interface are all abstract by virtue of their declaration, and should not be declared abstract. Option B is wrong. The final modifier means that this method cannot be constructed in a subclass. A final method cannot be abstract. Option C is wrong. static is concerned with the class and not an instance. Option D is wrong. protected is not permitted when declaring a method of an interface. See information below. Member declarations in an interface disallow the use of some declaration modifiers; you cannot use transient, volatile, or synchronized in a member declaration in an interface. Also, you may not use the private and protected specifiers when declaring members of an interface.
21)
1. int -> 0
2. String -> "null"
3. Dog -> null
4. char -> '\u0000'
5. float -> 0.0f
boolean -> true Which four options describe the correct default values for array elements of the types indicated?
A. 1, 2, 3, 4
B. 1, 3, 4, 5
C. 2, 4, 5, 6
D. 3, 4, 5, 6
ANS: B
22) Which command displays comma for thousand separating on file size while listing
Explanation:
Using comma for separating thousand in file size is by default on. You can use dir/-c to remove comma from the listing. /C stands for comma.
23) How many buses are connected as part of the 8085 microprocessor?
A. 20
B. 3
C. 5
D. 8
ANS: B
24) If you need to duplicate the entire disk, which command will you use?
Explanation:
Diskcopy is used to perform track-by-track copy of a disk into another. Copy command copies selected files; chkdsk and format commands are not for copying purpose
25) A train 240 m long passes a pole in 24 seconds. How long will it take to pass a platform 650 m long?
A. 65 sec
B. 89 sec
C. 100 sec
D. 150 sec
ANS: B
26) Two students appeared at an examination. One of them secured 9 marks more than the other and his marks was 56% of the sum of their marks. The marks obtained by them are:
Explanation:
Let their marks be (x + 9) and x. Then, x + 9 = 56/100= (x+ 9+ x) =25(x + 9) = 14(2x + 9) =3x = 99 =x = 33 So, their marks are 42 and 33.
27)In the following the questions choose the word which best expresses the meaning of the given word. STRINGENT
A. Dry
B. Strained
C. Rigorous
D. Shrill
ANS: C
28)In the following the questions choose the word which best expresses the meaning of the given word.LAMENT
A.Complain
B.Comment
C.Condone
D.Console
ANS: A
29)In the following questions choose the word which is the exact OPPOSITE of the given words. HYPOCRITICAL
A. Gentle
B. Sincere
C. Amiable
D. Dependable
ANS: B
30)In the following questions choose the word which is the exact OPPOSITE of the given words. QUIESCENT
A. Active
B. Dormant
C. Weak
D. Unconcerned
ANS: A