Download our Android app to get updates on your mobile

Agreeya Placement Paper January 2012

1. 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

2.Which of the storage class(es) becomes the global variables for the entire Program
(A) Extern
(B) Static
(C) Auto
(D) Register
Ans: A

3. 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
Ans: A. 6,2,1,5

4. 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

5. 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

6. what is the final value of x when the code for(int
x=0;x<10;x++) is
run?
a. 10
b. 9
c. 0
d. 1

7. what is the data type of FILE?
a. integer
b. union
c. pointer
d. structure

char buffer[10]={"Genesis"};
printf("%d",&buffer[4]-(buffer));
}
a. 3
b. 4
c. 0
d. illegal pointer subtraction

8.x% of y is y% of ?

(A) x/y
(B) 2y
(C) x
(D) can't be determined

9. The price of sugar increases by 20%, by what % should a housewife reduce the consumption of sugar so that expenditure on sugar can be same as before ?
(A) 15%
(B) 16.66%
(C) 12%
(D) 9%

10.If * stands for /, /stands for -, +stands for * and –stands for +, then 17/5*4+19-8?

A)1.25

B) 24.5

C) 12.8

D) 22.4
Agreeya Placement Paper January 2012 Agreeya Placement Paper January 2012 Reviewed by Job today on 16:03 Rating: 5

No comments:

Powered by Blogger.