#include<stdio.h>
void main()
{
int a;
a=300*300/300;
printf("a=%d",a);
}
output is: 81 in turbo c++ compiler
Reason:- Problem is when we calculate 300 * 300 its value is 90,000 i.e out of integer limit.
( from yashwant kanetkar's Exploring C book )
void main()
{
int a;
a=300*300/300;
printf("a=%d",a);
}
output is: 81 in turbo c++ compiler
Reason:- Problem is when we calculate 300 * 300 its value is 90,000 i.e out of integer limit.
( from yashwant kanetkar's Exploring C book )
0 comments: