Previous Years Solved Placement Papers
- 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
(D) None of these
(Ans: C) - 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
(Ans: D) - Find \( \frac{7x + 4y}{x - 2y} \) if \( \frac{x}{2y} = \frac{3}{2} \):
(A) 6
(B) 8
(C) 7
(D) Data insufficient
(Ans: C) - If \( 2x - y = 4 \), then \( 6x - 3y \) = ?
(A) 15
(B) 12
(C) 18
(D) 10
(Ans: B) - If \( x = y = 2z \) and \( xyz = 256 \), then what is the value of \( x \)?
(A) 12
(B) 8
(C) 16
(D) 6
(Ans: B) - \( (1/10)^{18} - (1/10)^{20} = ? \)
(A) 99/1020
(B) 99/10
(C) 0.9
(D) None of these
(Ans: A) - Pipe A can fill in 20 minutes, Pipe B in 30 minutes, and Pipe C can empty in 40 minutes. If all work together, find the time taken to fill the tank:
(A) 17 1/7 minutes
(B) 20 minutes
(C) 8 minutes
(D) None of these
(Ans: A) - Thirty men take 20 days to complete a job working 9 hours a day. How many hours a day should 40 men work to complete the job?
(A) 8 hours
(B) 7 1/2 hours
(C) 7 hours
(D) 9 hours
(Ans: B) - Find the smallest number in a GP whose sum is 38 and product is 1728:
(A) 12
(B) 20
(C) 8
(D) None of these
(Ans: C) - How many squares with sides 1/2 inch long are needed to cover a rectangle that is 4 ft long and 6 ft wide?
(A) 24
(B) 96
(C) 3456
(D) 13824
(E) 14266
(Ans: C)