I have seen this one in this forum only..but i couldnt understand how come the answer is 10 for the below ??? int z,x=5,y=-10,a=4,b=2; z =...
#include <stdio.h> main() { char a[5] = "abcd"; int b = 3; printf("%c\n",a[b]); printf("%c\n",((char *) b)[(int) a]); } i get d d as...
#include <stdio.h> char*s="char*s=%c%s%c;main(){printf(s,34,s,34);}"; main() { printf(s,34,s,34); } outputs.....
void fun(int *i); void main( ) { int gyan[] = { 10, 20, 30, 40, 50 }; int i, *ptr ; ptr = gyan; for ( i = 0 ; i <4 ; i++ ) { fun(ptr++);...
# define TWICE(i) 2*i # define TWO(i) i+i main () { int no, sum, product; no = 1; sum = -- TWICE(no); --sum;...
main() { int a=10,b=20,c; c = a+++b; printf("%d",c); } output is 30.. how does this work???
if i give if(1,0) printf("true"); else printf("false"); then it is always evaluating to false... but if i give i=(1,0)?1:0;...
i have seen at many places where condition is to be evaluated.. if(a) {} if(!a) {} for(i=0;!a;i++) {} if(1){} if(!9){} and things lyk...
#include<stdio.h> void main() { char a[]="Gate2011"; char *p=a; printf("%s", p + p[3] - p[1]); } Outputs 2011 Can somebody me...
#include<stdio.h> #include<stdarg.h> void func(int n,...); void main() { func(3,1,2,3); } void func(int n,...) { int i,t,sum=0; va_list li;...
Separate names with a comma.