Wipro Previous Years Solved Sample Placement Papers
-
Advantages of digital over analog signal:
A. noise immunity
B. data security and integrity
C. efficient transmission
D. all of the above Answer: Option D
-
Where Myprog is an exe file. What will be the output of the following program?
main(argc, argv) { printf("%c", ++**argv); }
A. m
B. n
C. none
D. myprogram
-
In 1.5 fixed format, how is -1 represented?
A. 0xFFFF Answer: Option A
B. 0xF000
C. 0x8000
D. 0x0001
-
main() { i = 2; printf("i=%d i=%d", ++i, ++i); }
Ans: varies compiler to compiler
-
main() { unsigned char i = 0x80; printf("i=%d", i << 1); }
Ans: 256
-
main() { B = 0xFFFF; ~B; printf("%d", B); }
Ans: 0xFFFF
-
Func(int a, int b) { int a; a = 10; return a; }
Will there be any error and some other options are there.
Ans: No error.
-
Determine network ID of classful IP address 192.42.14.1
A. 192
B. 192.42
C. 192.42.14 Answer: Option C
D. 192.42.14.1
-
If m people take d days to complete, then m + r people take how many days?
Ans: m * d / (m + r)
-
Three questions were on Analogies. One was:
12. Square:___ :: Quadreplet:couplet
options were a) parallelogram b) triangle c) ___ d) ______
Ans: do not remember
-
Gazzle:swift :: Earth
options: a) life b) zoology
-
If DISTANCE is written as IDTUBECN and DOCUMENT is written as ODDVNTNE, then THURSDAY will be written as:
A. HTVSTYAD Answer: Option A
-
A is 10 km from B and C is 17 km from B. Then which option is true:
A. A is in between B and C.
B. B is in between A and C.
C. C is in between A and B.
D. a and b Answer: Option D
-
If the length of a rectangle increases by 20% and the breadth decreases by 20%, then the area:
A. decreases by 4% Answer: Option A
B. ----
C. same
D. none
-
If it costs x dollars for making a certain item if the quantity is 1000 and if the quantity increases, then the item is made using y dollars. If z number of items are made which are greater than 1000, then what is the total cost?
Ans: 1000(x - y) + yz
-
If the distance between two trains is 110KMs and two trains travel in opposite directions. If one starts at 7 AM and the other at 8 AM and their velocities are 20 and 25 KMPH, then they meet at:
Ans: 10 AM
-
A person is to go up a tree 60ft high. In every second, he climbs 5ft but slips 4ft. After how many seconds will he be able to touch the top of the tree?
1) 60
2) 59
3) 56
4) 58
-
enum day { saturday, sunday = 3, monday, tuesday };
Value of saturday, tuesday.
-
enum day { saturday, sunday = -1, monday, tuesday };
int x = monday; Value of x?
-
What is the output of the program:
void main() { int j[10] = {9, 7, 5, 3, 1, 2, 4, 6, 9}; int i = 1; clrscr(); for(; i < 9; i++) printf("%d ", --j[i++]); getch(); }
A. 6,2,1,5
B. 6,2,1,5,7
C. Error Message
D. core dump Answer: Option A
- Solution: The loop iterates and decrements the values in the array based on the given logic, producing the sequence 6, 2, 1, 5.
-
What is the output of the program:
void main() { int i, j, k, n = 5; clrscr(); for(i = 5; i > 0; i--) { j = 1 < i; k = n & j; k == 0 ? printf("0") : printf("1"); } getch(); }
A. 00011
B. 11110 Answer: Option B
C. 11001
D. 11100
- Solution: The program outputs binary based on the bitwise AND operation and the loop conditions.
-
Which of the following storage class(es) became the global variable for the entire program:
A. Extern Answer: Option A
B. Static
C. Auto
D. Register
- Solution: The `extern` keyword makes a variable global and accessible across different files.
-
What is the output of the program, if integer occupies 2 bytes memory:
union { int a; char b; char c[10]; } u1; void main() { int l = sizeof(u1); printf("%d", l); getch(); }
A. 13
B. 10 Answer: Option B
C. 16
D. None of the above
- Solution: The union size is determined by the largest member, which is the char array of size 10.
-
What is the output of the program:
void main() { fork(); printf(" Hello World"); getch(); }
A. Hello World
B. Hello World Hello World Answer: Option B
C. Error Message
D. None of these
- Solution: The `fork()` system call creates a new process, resulting in the message being printed twice.
-
What is the output of the program:
void main() { struct a { int i; char *st1; }; typedef struct a ST; ST *str1; str1 = (ST*)malloc(100); str1->i = 100; strcpy(str1->st1, "Welcome to Oracle"); printf(" %d%s\n", str1->i, str1->st1); getch(); }
A. core dump
B. will not compile
C. 100, Welcome to Oracle Answer: Option C
D. None of these
- Solution: Memory is allocated, and the values are printed as expected.
-
What is the output of the program:
void main() { int i, j, k; i = 2; j = 4; k = i++ > j & 2; printf("%d\n", k); if(++k && ++i < --j || i++) { j = ++k; } printf(" %d %d %d", i, -j--, k); getch(); }
A. 4, -3, 2
B. 5, -3, 2
C. 4, -2, 2
D. 5, -2, 2 Answer: Option D
- Solution: The operations and precedence rules determine the final output.
-
Which of the following is not true in case of Command line arguments:
A. The argc parameter is used to hold the number of arguments in the command line and is an integer
B. The argv parameter is a pointer to an array of character pointers and each one points to command line arguments
C. The argv[1] always points to program name Answer: Option C
D. None of the above
- Solution: The program name is always `argv[0]`, not `argv[1]`.
-
What is the output of the program:
#include
#include #define sqr(a) a*a void main() { int a = 10, b = 1, c; c = sqr(10+1); printf("Sqr Root of (10+1) is %d", c); getch(); } A. 121
B. 21 Answer: Option B
C. 13
D. Syntax Error
- Solution: Macro substitution leads to incorrect evaluation of the expression.
-
What is the output of the program:
#include
#include void main() { int i, j = 20; clrscr(); for(i = 1; i < 3; i++) { printf("%d,", i); continue; printf("%d", j); break; } getch(); } A. 1,20
B. 1,20,1,20
C. 1,2 Answer: Option C
D. 1,2,20,20
- Solution: The `continue` statement skips the rest of the loop body, so only `i` is printed.