Thursday, July 30, 2009

Turbo C is giving me input problems. Anybody know how to fix it?

My Turbo C was working perfectly until yesterday. When I tried today, its giving me a huge problem. Whenever i enter an integer value, it is recognizing the value as 1440, regardless of what I enter. i created a very simple program:





#include%26lt;stdio.h%26gt;


main(){


int i;


scanf("%d",i);


printf("\n%d",i);


getch();


}








when i run the program, i input 1 and it returns a value of 1440.

Turbo C is giving me input problems. Anybody know how to fix it?
sure, you have a bug in your code.





scanf("%d", %26amp;i);





instead of scanf("%d", i);
Reply:your program will not run right because


youve got to put the printf before the scan

potential breakup song

No comments:

Post a Comment