Output:Code:#include <stdio.h>
int main()
{
int i = 0;
for(i = 0; i <= 10; i++)
{
float offset = (i/1000)*256;
printf("%d\n", (int)(offset));
}
return 0;
}
0
0
0
0
0
0
0
0
0
0
0
Expected Output:
0
0
0
0
1
1
1
1
2
2
2
Could you explain why this is happening?