Variables problem.

Discussion in 'C' started by blabla2028, Apr 29, 2008.

  1. blabla2028

    blabla2028 New Member

    Joined:
    Apr 29, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    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.
     
  2. subha040680

    subha040680 New Member

    Joined:
    Apr 30, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    scanf("%d",a);
    will be
    scanf("%d",&a);
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice