Hi all,
I started using DevC++ 4 {The stable release version} recently. I got head up with a problem.
Please see my code below.
#include <stdio.h>
int main()
{
1. short int first, second;
2. printf("Enter first number :");
3. scanf("%d",&first);
4. printf("\nEnter first umbers :");
5. scanf("%d",&second);
6. printf("You entered %d and %d\n",first,second);
7. getch();
8. return 1;
}
According to the program, I entered two numbers. But my first number disappears on line 6. I
always get my first number as 0. If i change the type of variable to "int", I am getting the
answer as I expects. What might be my problem. Any answer to this question is appreciated.
-ranjith
|