I have got this problem since updated to Xcode 4.5.
I typed 4555
in console box but it show only 4
in console box.
I tried different input parameters such as %d
, %f
, %c
and %s
, all have the same problem.
I don't get it. How to fix it?
My source code is
#include <stdio.h>
int main()
{
int input;
// insert code here...
printf("Hello, World!\n");
printf("Please Enter Number : ");
scanf("%d",&input);
getchar();
printf("Input is : %d",input);
return 0;
}
and console box shows:
>Hello, World!
>Please Enter Number : 4
>Input is : 4555
It seems that this is a bug of Xcode 4.5. See: