Friday 7 December 2012

EXL Infotel aptitude paper

Placement Paper

1. Write a program C for calculating factorial of number 9.
2. Write a program in C to calculate from i=9,9*10*11*12,by using increment operator only.i.e you cannot use any kind of loops,variable and constants.
3. Define API and it’s types.
4. What do you understand by WinMain().
5. Write down the name’s of any three ANSI standard libraries.
6. What do you understand by \t.
7. What is the associativity of <<=>>= operator.
8. What is int*(*p)().
9. What is <button>.
10. What is <sup>.
11. What is <li>.
12. What is <area>.
13. What is size =”number”.
14. What do you interpret from head -n file name in UNIX.
15. What do you understand by Listen()  unix system call.
16. Write the JSP Tag to activate the Bean[cname].
17. Define Application layer and it’s types.
18. What kind of service reserved port numbers 20,21 provided.
19. Write general reference -sql to delete and update.
20. Write general reference -sql to adding new columns.
21. Choose the write options.
main() 
int i;
 clrstcr();
 printf("%d",&i)+1; 
scanf("%d",i)-1; 
(a)Runtime error. 
(b)Runtime error.Access violation.
(c)Compile error. Illegal Syntax 
(d)None of the above.
22.Choose the right option
main(int argc,char *argv[])
 {
 (main && argc)?main(argc-1,NULL):return 0;
 }
(a)Runtime error. 
(b)Compile error. Illegal syntax 
(c)Gets into Infinite loop. 
(d)None of these
23.Choose the right option
main() 
{
 int i; 
 float *pf;
 pf=(float *)&i; 
 *pf=100.00; 
 printf("%d",i); 
 }
(a)Runtime error. 
(b)100 
(c)Some Integer not 100 
(d)None of the above
24.Choose the right option
main()
int i=0xff;
printf("%d",i<<2);
}
(a)4. (b)512. (c)1020. (d)1024
25. main()
{
int c=5;
printf("%d",main||c);
}
26. 1.)
const int perplexed = 2;
#define perplexed 3
main()
{
#ifdef perplexed
#undef perplexed
#define perplexed 4
#endif
printf(“%d”,perplexed);
}
2.)
main()
{
char * strA;
char * strB = I am OK;
memcpy( strA, strB, 6);
}
3.)
main()
{
char *p = “hello world”;
p[0] = ‘H’;
printf(“%s”, p);
}
4.)
main(int argc, char *argv[])
{
(main && argc) ? main(argc-1, NULL) : return 0;
}

No comments:

Post a Comment