1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include "stdio.h" main() { struct xx { int x; struct yy { char s; struct xx *p; }; struct yy *q; }; } |
1 2 3 4 5 6 7 8 9 10 11 12 | #include "stdio.h" main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s=malloc(sizeof(struct xx)); printf("%d",s->x); printf("%s",s->name); } |
1 2 3 4 5 6 7 8 9 10 | #include "stdio.h" main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); } |
1 2 3 4 5 6 | main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); } |
1 2 3 4 5 6 | #define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); } |
1 2 3 4 5 | main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here } |
1 2 3 4 5 6 7 8 9 10 11 12 | #include "stdio.h" main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } } |
1 2 3 4 5 | void main() { int i=5; printf("%d",i+++++i); } |
1 2 3 4 5 | void main() { int i=5; printf("%d",i++ + ++i); } |
1 2 3 4 5 6 7 8 9 10 11 | main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); } |
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