problem with scanf

+2 Vaggelis Dou · November 7, 2015
i try to scan an integer with the command scanf("%d", age); but when i run the program and give my age it stops. i tried it with double too but it happened the same. what's wrong?

Post a Reply

Replies

Oldest  Newest  Rating
+2 c student · November 7, 2015
scanf ("%d", &age);
+1 Ivan Kušaković · November 9, 2015
You must declare a variable.

int age;
scanf("%d", age);
+1 Ivan Kušaković · November 9, 2015
You probably have forgotten an uppersand &
  • 1

C

107,257 followers
About

One of the most popular languages of all time.

Links
Moderators
Bucky Roberts Administrator