CCAT Aug 2013 paper

2,433 views

Published on

this is memory based paper of CCAT Aug 2013

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,433
On SlideShare
0
From Embeds
0
Number of Embeds
1,405
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

CCAT Aug 2013 paper

  1. 1. CCAT MEMORY BASED AUG 2013 PAPER (SECTION -B C Language) Q1. void main() { int x=3; if(x==2) x==0; if(x==3) x++; else x+=2; printf("%i",x); } Q2. void main() { int a[3][2][2]={1,2,3,4,5,6,7,8,9,10,11,12}; printf("%d",a[2][2][1]); } (Note.Question is correct) Q3. void myfun() { if(x>0) myfun(--x); printf("%d",x); } void main() { myfun(5); } Q4. void main() { char *ch="CDAC"; printf("%d %d %c",sizeof(ch),sizeof(*ch),*ch); } (Note. assume compiler is 32 bit) Q5. void main() { int a=45,b=74; char x=1,y=0; if(a,b,x,y) { printf("CCAT"); } } Q6. void main() { printf("%d",strcmp("AAAC","AAAA")); } Q7. void main() { printf("%d",printf("CCAT")); } Q8. void main() { int a=10; b=a++ + ++a; printf("%d %d",a++,++a); } Q9. int main() { int i,j=0; for(i=6;i<9;i++) for(j=i;j<=i;j++) printf("n %d",i*j); } Q10. void main() { int a[2][3][2]={1,2,3,4,5,6,7,8,9,10,11,12}; printf("%d %d %d %d",a,*a,**a,***a); printf("%d %d %d %d",a+1,*a+1,**a+1,***a+1); } (Note. assume base address is 160)

×