mirror of
https://github.com/cc65/cc65.git
synced 2024-08-17 03:29:15 +00:00
27 lines
347 B
C
27 lines
347 B
C
|
/*
|
||
|
!!DESCRIPTION!! division bug
|
||
|
!!ORIGIN!! testsuite
|
||
|
!!LICENCE!! Public Domain
|
||
|
!!AUTHOR!! Stefan Wessels
|
||
|
*/
|
||
|
|
||
|
/*
|
||
|
The output from the code below is:
|
||
|
a / b = 6
|
||
|
|
||
|
Shouldn't that be 0?
|
||
|
*/
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#define b 10000
|
||
|
char a;
|
||
|
int main()
|
||
|
{
|
||
|
char c;
|
||
|
|
||
|
a = 100;
|
||
|
c = a / b;
|
||
|
printf("a / b = %d", c);
|
||
|
|
||
|
return 0;
|
||
|
}
|