Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
3

3

Ratings:

4.5

(2)
|Views: 22 |Likes:
Published by ratulray2006

More info:

Published by: ratulray2006 on Jul 22, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

12/17/2010

pdf

text

original

 
1.int main(){int see(int);printf("%d",sizeof(see('c'));return 0;}int see(int d){printf("%d",d);return d;}2.void fn(int, int);main(){ int a = 5;printf("Main : %d %d\n", a++, ++a);fn(a, a++);}void fn(int a, int b){printf("Fn : a = %d \t b = %d\n", a, b);}3.struct foo{int a;float b;}main(){printf ("check this program before giving output" );}4.int main(){char *ptr = "CIC FIRST TEST";(*ptr)++;printf("%s\n",ptr);ptr++;printf("%s\n",ptr);return 0;}5.int main(){void format(short);format(-1);return 0;}void format(short l){short i;for(i=1;i<8*sizeof(short);i++)printf("%d",(l>>sizeof(short)-i)&1);}
 
6.int main(){short i=(short)300*300/3;printf("%d",i);return 0;}7.int main(){int i=1,j=0,k=-1,w,z;w= --i && ++j || k--;z= !(i-- && j++) || k++;printf("i=%d j=%d k=%d w=%d z=%d",i,j,k,w,z);return 0;}8.int main(){int x,y=1,z;if (z=(y!=1)) x=5;else x=10;printf("x=%d\t y = %d\t z=%d ",x,y,z);return 0;}9.int main(){static char food[]="yummy";char *ptr;ptr=food + strlen(food);while (--ptr>=food)puts(ptr);return 0;}10.int main(){int i;for(i=1;i>=0;i++)printf("%d",i);return 0;}11.int main(){ int i=10;#include<stdio.h> /* think about this statement*/printf("%d %d",++i,i++);printf("%d %d",--i,--i);return 0;}
 
12. int main(){ int *p=100;printf("%d %d",p,*p);*p=30;printf("%d %d",p,*p);return 0;}13.int main(){int a,b;a=4*printf("me first\n"),5*printf("no me first\n"),3;b=(putch('A'),putch('B'),putch('C'));printf("\na=%d b=%d",a,b);return 0;}14.int main(){char *s="abc";char *t;for (t=s;*t!='\0';++t){ switch (*t){case 'a':putchar('1');case 'b':putchar('2');case 'c':putchar('3');break;}}putchar('\n');return 0;}15.struct x{ };struct y{ int x };int main(){printf("%d %d",sizeof(struct x),sizeof(struct y));}16.how much memory we can allocate with the help of malloc?17. int main(){int p,s,i;s=scanf("%c",&i);p=s+printf("i know what printf returns");printf("s=%d p=%d i=%d",s,p,i);return 0;}what will be the output if input is 'C' ?18.write a program to add two numbers with using only one defination ' int i'in your program.

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->