CARITOR SERVICES INDIA PVT LIMITED
C QUESTIONS
1.struct x
{
int I;
char s;
}
union
{
struct x,y;
double j
}z;
main()
{
printf(�%d�,sizeof (union z));
2.struct x
{
int I;
short int j;
char a;
char b;
}
struct y
}
main()
{
printf(�%d%d�,sizeof(structx),sizeof(structy));
}
ans
12 12
12 8
12 8
8 12
3.main()
{
int I=0;
}
declaration
definition
4.main()
{
int I=1234.567
printf(�%d�,I)
}
ans
1234
1235
1234.567
error
5.main()
{
int *+j
int *I=6;
if(NULL!=&&NULL!=*I)
printf(� �);
}
6.main()
{
int a[]={�1�,�2�,�3�,0,�1�,�2�,�3�}
printf(�%s�,a);
ans
123
1230123
error
7.main()
{
#define x 10
{
printf(�%d�,++x);
}
ans
compilation error
run time error
10
11
8.main()
{
char a[]=(�ABC�����xyz�);
printf(�%d�,sizeof(a));
ans
26
27
25
9.main()
{
char a[] =�abc������xyz�,
char *x;
p=a;
printf(�%d�,sizeof(*p));
p=p+10;
printf(�%d�,sizeof(a);
ans
26,26
26,16
16,26
10.
main()
{
int x=1111;
printf(�%d�,x);
}
ans
0
11.main()
{
int i=(int*)0x1000;
printf(�%d�,I);
ans
1000
compilation error
runtime error
12.
main(int I)
{
printf(�%d�,I)
}
ans
error
12
13.main(int arg c)
int I,j=0;
{
for(I=0;I<argc:I++0)
j=j+�.(argv(I))
printf(�%d�,j);
}
ans
123
error
6
14.main()
{
printf(�%d�,printf(�helloworld�));
}
ans
13
hello world
hello world 13
error
15.
main()
{
int a[2][2][6]
{{2,3,4,5,6,7}
{�����.}}
printf(�%u%u%u%u�,a,*a,**a,***a);
assume base address is 567895
ans
567895, 567895, 567895,2
16.
main()
{
a[2][2]={{2},{3}}
printf(�%d�,a[0][0]);
printf(�%d�,a[0][1]);
printf(�%d�,a[1][0])
printf(�%d�,a[1][1]);
}
ans
2000
2300
2030
2003
QUANTS
A- if statements is partly right
B- if statements is partly wrong
C- if no conclusion can be made
first 6 questions from data interpretation
last 5 questions on what comes next
1. a man works. He has to maintain 100 cups. He gets 30 ps for every cup he safeguards and has 10 pay 90 ps for every cup he breaks.if he earns rs.24 per day, how many did he break?
2. 32 people playing table tennis. how many matches to determine the winner.
3. A cube 3�* 3�* 3� is painted green it is cut into 1�* 1�* 1� how many cubes were painted on atleast on one side
4. If x and x+10 are lengths containing right angle, what is the equation if area is 24 sq.cm
5. Length and breadth of a rectangle are in ratio 7:5. If length is reduced by 5 and breadth by 2, area reduces by 65. Find length and breadth.
6. Denominator is 4 greater than numerator if 10 is added to Denominator,the fraction becomes 1/8.what is the fraction
7. A and b can do a piece of work in 15 and 10 days. A and b work on it for sometime and then a leaves b completes the job in 5 days. For how long did a work.
8. In a company 241 apply for posts .of them 40 know neither c nor c++.180 know c; 186 knows c++. how many people know only c.
9. A farmer has a farm square of 100 sq.m a cow is tied at one and with a rope of 10m length.assume pi-3.what is the area of land the cow can graze.
10. The average of x and y is 6.5. if z=4,what is the average of x,y,z.
11. If the bus travels with 8 tyres(6 tyres running),travels a distance of 16000 km how much is the distance sustained by each tyre.ans 120000
12. In a box there are four different coloured bells,of some quantity (4 each ) what is the minimum number of pick ups so that, atleast 2 of them of the same colour.
13. A company manufactures x refrigerators cp.(9000+500x0 sp=500x; what must be the value of x so that atlas the amount gained After selling is equal to the amount spent on production
14. A dealer sells 3 sets at Rs.2400 each ,one at 20% gain and the other at 20% loss. what is the overall gain or loss