Single Choice
Not Set
QWhat is the output of this program?
#include
int main()
{
if (sizeof(int) > -1)
printf("Yes");
else
printf("No");
return 0;
}
ID: #909
Data Types in C Language
2,065 views
Question Info
#909Q ID
Not SetDifficulty
Data Types in C LanguageTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
In C, when an integer value is compared with an unsigned it, the int is promoted to unsigned. Negative numbers are stored in 2's complement form and unsigned value of the 2's complement form is much higher than the sizeof int.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic