Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Variables problem. (http://www.go4expert.com/forums/variables-problem-t10298/)

blabla2028 30Apr2008 03:59

Variables problem.
 
I am using Dev-C++ compiler.
I wrote simple C code that does this:

Code:

#include<stdio.h>
int main()
{
int a,b;
scanf("%d",a);
b=a;
printf("\n %d",b);
}

and my app. crashes. It pops up a Send Error Report message.
What is the problem with the code?
Thanks in advance.

subha040680 30Apr2008 11:28

Re: Variables problem.
 
scanf("%d",a);
will be
scanf("%d",&a);


All times are GMT +5.5. The time now is 19:16.