M
mdh
Can someone look at this little program and tell me why the last line
is not compiling.
#include <stdio.h>
int main (){
int i, j, k;
i=0;
j=9;
k=-8;
printf("Given i=0, j=9 and k= -8 \n");
printf( "Then for \" if ( i) , if (j) and if (k)\"\n");
printf("the Answers are %d %d %d ", if(i), if(j), if(k) ); /**parse
error before 'if'**/
return 0;
}
It's probably something really silly, or I am missing something, which
is more likely!! but all in the quest to learn C!!!!
Thanks in advance.
is not compiling.
#include <stdio.h>
int main (){
int i, j, k;
i=0;
j=9;
k=-8;
printf("Given i=0, j=9 and k= -8 \n");
printf( "Then for \" if ( i) , if (j) and if (k)\"\n");
printf("the Answers are %d %d %d ", if(i), if(j), if(k) ); /**parse
error before 'if'**/
return 0;
}
It's probably something really silly, or I am missing something, which
is more likely!! but all in the quest to learn C!!!!
Thanks in advance.