Creativo - the topper's choice

www.creativo.co.in ( Placement papers of all companies are here )

Sunday, April 30, 2006

INautix

1.main() { char **p=="Hello"; printf("%s",**p); } Ans: Garbage or nothing 2.main(){ printf("%d%c\n");printf("%d%c\n"); } Ans: Garbage Value 3. main() { int x==5; printf("%d%d",x++,++x); }
Ans==6 6 4. main() { int x==4; printf("%d",printf(" %d %d ",x,x) ); } Ans: 4 4 5 5. main() { union { int i; char p;
struct { int t; char e; char o; }w; }l; printf("%d\n",sizeof(l) ); } Ans: 4 6. main() { int i==0,n==6; while(n--0); i+==n; printf("%d\n",i); } Ans: -1 7. main() { char a[]=="Hello"; printf("%c\n",*a++); } Ans: Error 8. a==3,b==2,c==1; What's the value of k? k== a< a="="3;" a="="-1;" c="="-32;" i="="-64;" u="="-26;" class="" a="e" temp="=s1;" s2="=s1;" s1="=s2;" a2="=t;" a1="¢;" t="¡;" i="=0;" s="='R';" sum="=0,count;" count="=1;sum+==count)" p="=(char*)a;">>=1; 3. main() { int n,i=1; switch(n) { case 1: some stuff; case 2: some stuff; default: i=10; } printf("i=%d",i); } what will be value of i; ans:non of the above 4.pick ut the wrong one #typedef some stuff { --- }; 5.one q's on do loop? 6.pick the odd one a.malloc b.calloc c.new(ans) 7. char *ptr; p=malloc(20); How will u de allocate the memory? a.delete. b.free. There r about 20 q's in this section rest i am un able to remember? UNIX paper: ----------- 1.ans:script 2.How will u do version maintaince? sccs(source code control system) 3.awk $2 4.a program in shell script? find the o/p. 5.which signal u can't catch? ans:sigkill 6.core dump is due to ? ans:segmentation fault. 7.echo "todays date is 'date'"; o/p = ? 8.process synchronisation is done by ? ans:s'phore There r totally 15 in this section rest r easy to answer.

0 Comments:

Post a Comment

<< Home