S
somenath
Hi All,
I am not able to understand the behavior of the bellow mentioned
program.
#include<stdio.h>
int main(void)
{
printf("\n Size = %d \n",sizeof 1<0);
return 0;
}
The output of the program is
Size = 0
But my understanding is sizeof returns the size of the type .In this
case should it not returns sizeof (int) ?
But if I rewrite the code as mentioned bellow the output is 4
#include<stdio.h>
int main(void)
{
printf("\n Size = %d \n",sizeof (1<0));
return 0;
}
Size = 4
Could you please help me to understand the problem?
Regards
Somenath
I am not able to understand the behavior of the bellow mentioned
program.
#include<stdio.h>
int main(void)
{
printf("\n Size = %d \n",sizeof 1<0);
return 0;
}
The output of the program is
Size = 0
But my understanding is sizeof returns the size of the type .In this
case should it not returns sizeof (int) ?
But if I rewrite the code as mentioned bellow the output is 4
#include<stdio.h>
int main(void)
{
printf("\n Size = %d \n",sizeof (1<0));
return 0;
}
Size = 4
Could you please help me to understand the problem?
Regards
Somenath