Program 1:
#include <stdio.h>
int main()
{
if (sizeof(int) > -1)
printf("Yes");
else
printf("No");
return 0;
}
Output : No
Program 2:
#include <stdio.h>
int main()
{
if (2 > -1)
printf("Yes");
else
printf("No");
return 0;
}
Output: Yes
Questions:
- What is the difference between program 1 and program 2?
- Why
sizeof(int)
is considered asunsigned
? - Why is
2
in program 2 considered assigned
?