Download our Android app to get updates on your mobile

Alumnus Placement Paper January 2012 Based on Candidate Experience


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

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

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

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

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
// c. 11001
// D. 11100
Ans: B. 11110

6. write a code to count the no. of 1's in a binary rep. of a number. memory taken for char *, int * etc.

7. To ensure one pgm. doesnt corrupt other pgm. in a Multi-pgm enviornment what you should do?

8. in c++, what is a constructor, destructor, friend etc.

9. what is waterfall model, prototype model etc.

10. Which one is not suitable for client-server application? tcp/ip,message passing,rpc,none of the above.

Alumnus Placement Paper January 2012 Based on Candidate Experience Alumnus Placement Paper January 2012 Based on Candidate Experience Reviewed by Job today on 16:00 Rating: 5
Powered by Blogger.