Is this syntactically correct?
Posted
by
Borrito
on Stack Overflow
See other posts from Stack Overflow
or by Borrito
Published on 2012-09-06T15:28:48Z
Indexed on
2012/09/06
15:38 UTC
Read the original article
Hit count: 103
c
I have code in one of the source file as follows:
#include <stdio.h>
#include <math.h>
int a ;
int b = 256 ;
int c = 16 ;
int d = 4 ;
int main() {
if ((d <= (b) && (d == ( c / sizeof(a))))
{
printf("%d",sizeof(a) );
}
return 0;
}
I have removed the casts and have simplified on the data names. The sizeof(a)
can be taken as 4. I want to know if the the if
syntax is a valid one and if so why doesn't it execute?
PS : I haven't sat down on this for long due to time constraints. Pardon me if you find a childish error in the code.
© Stack Overflow or respective owner