1 2 3 4 5 | main() { int i=5,j=6,z; printf("%d",i+++j); } |
1 2 3 4 5 6 7 | #include "stdio.h" main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); } |
1 2 3 4 5 6 7 8 9 | #include "stdio.h" main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d..%d",*p,*q); } |
1 2 3 4 5 6 7 8 | #include "stdio.h" main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); } |
1 2 3 4 5 6 | main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); } |
1 2 3 4 5 6 7 8 9 | main() { int *j; { int i=10; j=&i; } printf("%d",*j); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } |
1 2 3 4 5 6 7 8 9 | #define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); } |
1 2 3 4 5 6 7 8 9 | main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); } |
1 2 3 4 5 | main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); } |
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Resources #Terms of Use
Copyright©2012 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com