1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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