Bitwise Papers
Bitwise Papers
one bottle is half-full of oil and another bottle with twice the capacity is one quarter full of oil. if water is added so
that both the bottles are full and the contents of both are then poured into a third bottle that is empty and large
enough to hold the contents of both, what fractions of the contents in the third bottle is oil?
a)1/4 b)1/3 c)3/8 d)2/3
ans:b)1/3
2. don and his wife each receive an 8 percent annual raise. if don receives a raise rs.800 and his wife receives a
raise of rs. 840, what is the difference between their annual income after their raises?
a)40 b)460 c)500 d)540
ans:d)540
3. Snehs age is 1/6th of her fathers age. Snehs fathers age will be twice of Vimals age after 10 years. If Vimals
eighth birthday was celebrated two years before, what is Snehs present age?
a) 24 years b) 30 years c) 6 2/3 years d) None of these
4. Three years ago the average of A and B was 18 Years. With C joining them now, the average becomes 22 years.
How old is C now?
a) 24 years b) 27 years c) 28 years d) 30 years
5. A train traveling at 42 kms/ hr passes a cyclist going in the same direction in 9 secs. If the cyclist had been going in
the opposite direction, the train would have passed him in 5 secs. Find the length of the train.
a) 75 meters b) 60 meters c) 90 meters d) 80 meters
6. A person walks a distance of 18 kms at a particular speed. For the next 30 kms he increases his speed by 2 kmph.
Had he walked the entire distance at 3 kmph more than his initial speed, he would have reached 4 hours earlier. Find
his initial speed.
a) 3 kms/hr b) 2 kms/hr c) 4 kms/hr d) None of these
7. A man starts from B to K, another starts from K to B, at the same time. After passing each other they complete their
journeys in 3.33 and 4.80 hours respectively. Find the speed of the second man if the speed of the first is 12 km/ hr
a) 12 kms/hr b) 10 kms/hr c) 14 kms/hr d) Data inadequate
8. A train traveling at 40 kms / hr while inside the tunnel meets another train of half its length traveling at 60 kms / hr
and passes it completely in 4.5 seconds. Find the length of the tunnel if the first train passes completely through it in
4 minutes 37.5 seconds.
a) 2000 meters b) 3000 meters c) 4000 meters d) 5000 meters
9 Lucia is a wonderful grandmother. Her age is between 50 and 70.Each of her sons have as many sons as they
have brothers. Their combined number gives Lucia?s age. What is the age?
Ans: 64
10. There are two towers A and B. Their heights are 200ft and 150ft respectively and the foot of the towers are 250ft
apart. Two birds on top of each tower fly down with the same speed and meet at the same instant on the ground to
pick a grain. What is the distance between the foot of tower A and the grain?
Ans:90ft
11. What would be the output of the following program?
main()
{
char near * near *ptr1;
char near * far *ptr2;
char near * huge *ptr3;
printf("%d %d %d",sizeof(ptr1),sizeof(ptr2),sizeof(ptr3));
}
a) 1 1 1 b) 1 2 4 c) 2 4 4 d) 4 4 4
12.void main()
{
struct a
{
char ch[10];
char *str;
};
struct a s1={"Hyderabad","Bangalore"};
printf("\n%c%c",s1.ch[0],*s1.str);
printf("\n%s%s",s1.ch,s1.str);
getch();
}
Ans: HB, HyderabadBangalor
13. main(int argc,int *argv[])
{
int i;
for(i=1;i<argc;i++)
printf("\n%s%s",argv[i],(i<argc-1)?"":"");
return 0;
getch();
}
Ans: I work for oracle
14.void main()
{
int i,j,k;
for(i=0;i<3;i++)
k=sum(i,i);
printf("\n%d",k);
getch();
}
sum(s,t)
{
static int m;
m+=s+t;
return m;
}
Ans: 6
15.void main()
{
int i;
clrscr();
for(i=1;i<6;++i)
switch(i)
{
case 1:
case 2: printf("%d,",i++);break;
case 3: continue;
case 4: printf("%d,",i);
}
printf("%d",i);
getch();
}
Ans: 1,4,6
16.Which of the storage class(es) becomes the global variables for the entire Program
(A) Extern
(B) Static
(C) Auto
(D) Register
Ans: A
17. What is the output of the program
void main()
{
char s[]="oracle is the best";
char t[40];
char *ss,*tt;
while(*tt++=*ss++);
printf("%s",t);
getch();
}
// A. oracle is the best
// B. Core dump
// c. Error Message
// D. Goes into infinite loop
Ans: B. core dump (Garbage value)
// A. 6,2,1,5
// B. 6,2,1,5,7
// c. Error Message
// D. core dump
Ans: A. 6,2,1,5
19. 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
// c. 11001
// D. 11100
Ans: B. 11110
20 /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
// c. 16
// D. None of the above
Ans: B. 10
2011 Bitwise Placement Papers - I with Answers, Solutions:1. a man buys postage stamps of denomination of 30ps. and 50 ps. for rs.10.00. he buys 22 stamps in all. find the no
of 30ps. stamps bought by him.
a.5(ans) b.6 c.17 d.8
2. the ages of a and b are in the ratio 9:4. after 7 years the ratio of their aghes will be 5:3.find b's present age.
16. main()
{
int I;
for(;;)
{
printf(%d,I++)
if(I>10)
break;
}
}
a. condition in a for-loop is mudt
b. no error
c. 2 ; should be dropped
17.void goop ( int z[]);//prototype
int x[10];
which o is the correct way to call goop
a. goop(x);
b. goop(x[]);
c. goop(x[10]);
d. goop(&x);
e. goop(&x[]);
15. int a=3,b=17;
a=b%a;
b=++a+5;
printf(a,b);
a. 2 8
b. 2 7
c. 3 7
d. 2 8
e. none
18. How many time shell o will be printed?
FILE *fp=fopen (test.txt, w)
Fprintf (fp,hello);
Fork();
a. 1
b. 2
c. 0
d. none
17. int a;
int b=0;
while(a)
{
{ a&=a-1;
b++;
}
a &b
a. 0 & 15
b. 1 & 16
c. 0 & 16
d. none
19. class A
{
public:
static int a;
A() {a=10};
};
int main()
{
A b;
Printf(%d,b.a);
Return 0;
}
Will the program compile?
a yes
b. no
20. What would be the output of the following program?
main()
{
int y=128;
const int x=y;
printf("%d",x);
}
a) 128 b) Garbage value c) Error d) 0
In a seven day long mini-conference organised in memory of Paul Erdos, a close group of
eight mathematicians, call them A,B,C,D,E,F,G,and H, discussed some research problems. At
the beginning of the conference, A was the only participant who has an infinite Erdos
number. Nobody had an Erdos number less than that of F.
On the third day of the conference F co-authored a paper jointly with A and C. This reduced
the average Erdos number of the group of eight mathematicians to 3.The Erdos numbers of
B, D, E, G, and H remained unchanged with the writing of this paper. Further, no other coauthorship among any three members would have reduced the average Erdos number of the
group of eight to as low as 3.
At the end of the third day, five members of this group had identical Erdos numbers while
the other three had Erdos numbers distinct from each other.On the fifth day, Eco-authored a
paper with F which reduced the groups average Erdos number by 0.5.The Erdos numbers of
the remaining six were unchanged with the writing of this paper.No other paper was written
during the conference.
1) How many participants in the conference did not change their Erdos number during the
conference?
a) 2
b) 3
c) 4
d) 5
e) 2
2) The person having the largest Erdos number at the end of the conference must have had
Erdos number (at that time)?
a) 5
b) 7
c) 9
d) 14
e) 15
3. How many participants had the same Erdos number at the beginning of the conference?
a) 2
b) 3
c) 4
d) 5
e) cannot be determined
4. The Erdos number of C at the end of the conference was?
a) 1
b) 2
c) 3
d) 4
e) 5
5. The Erdos number of E at the beginning of the conference was?
a) 2
b) 5
c) 6
d) 7
e) 8
Q. 08: He knows all the ins and outs of the political system?
a) loopholes
b) details
c) problems
d) pressures
e) None of these
Q. 09: ASCII
Ans: American Standard Code For Information Interchange.
Q. 10: find the odd man out:
a) OS/2
b) CMOS
c) MSDOS
d) Unix
Ans: CMOS
Q. 06: Find the probability that a five digit no formed by 1,2,3,4,5 ( not repeated) are
divisible by 4?
Ans: 3/20.
Q. 07: Answer the following questions on the basis of the information given below:
Two traders, Chetan and Michael, were involved in the buying and selling of MCS shares
over five trading days. At the beginning of the first day, the MCS share was priced at
Rs.100, while at the end of the fifth day it was priced at Rs.110. At the end of each day, the
MCS share price either went up by Rs.10, or else, it came down by Rs.10. Both Chetan and
Michael took buying and selling decisions at the end of each trading day. The beginning price
of MCS share on a given day was the same as the ending price of the previous day. Chetan
and Michael started with the same number of shares and amount of cash, and had enough
of both below are some additional facts about how Chetan and Michael traded over the five
trading days.Each day if the price went up, Chetan sold 10 shares of MCS at the closing
price. On the other hand, each day if the price went down, he bought 10 shares at the
closing price.
If on any day, the closing price was above Rs.110, then Michael sold 10 shares of MCS,
while if it was below Rs.90, he bought 10 shares, all at the closing price.
1) If Chetan sold 10 shares of MCS on three consecutive days, while Michael sold 10 shares
only once during the five days, what was the price of MCS at the end of day 3?
a) Rs.90
b) Rs.100
c) Rs.110
d) Rs.120
e) Rs.130
2) If Chetan ended up with Rs.1300 more cash than Michael at the end of day 5, what was
the price of the MCS share at the end of day 4?
a) Rs.90
b) Rs.100
c) Rs.110
d) Rs.120
e) Not uniquely determinable
3) If Michael ended up with 20 more shares than Chetan at the end of days 5, what was the
price of the shares at the and of day 3?
a) Rs.90
b) Rs.100
c) Rs.110
d) Rs.120
e) Rs.130
Q. 08: In the following questions, the symbol @, $, @, ? and ? are used with the following
meanings: P @ Q means P is greater than Q. P $ Q means P is equal to Q. P @ Q means P is
neither greater than nor equal to Q. P ? Q means P is either smaller than or equal to Q. P ?
Q means P is either greater than or equal to Q. Now in each of the following questions
assuming the given statements to be true, find which of the two conclusions I and II given
below them is/are definitely true? Give answer 1) if only conclusion I is true; 2) if only
conclusion II is true; 3) if either I or II is true; 4) if neither I nor II is true; and 5) if both I
and II are true;
1) Statement: M@ K, P ? K, K $ T
Conclusions: I. P $ T II. M @ T
2) Statements: R @ M, M $ P, P ? T
Conclusions: I. R @ T II. R $ T
3) Statements: T ? N, R @ N, R ? K
Conclusions: I. N @ K
II. T ? K
4) Statements: M @ R, R $ A, A ? K
Conclusions: I. K @ M
II. K ? R
5) Statements: P ? M, M @ K, K $ T
Conclusions: I. P $ M
II. T @ P
Q. 09: ANSI
Ans: American National Standard Institute
Q. 10: What is lagging in DBMS?
Ans: Reduced Redundancy