+ 2

Why I get weird numbers?

In C programming, while compiling I get a weird number of 8 digits when using scanf function. This is before I write a number, the weird number is shown on the compiler. I use Dev.Why??? https://code.sololearn.com/ceCLkfLYjMkA/?ref=app

17th Jun 2020, 7:33 AM
🏐Volley
🏐Volley - avatar
5 Respuestas
+ 8
Actully you have not used scanf properly check your scanf it will be like this scanf("%d",&p); In your code u write & ampersand in double quotes .write this "%d" then comma then address then variable name . .........Thankyou..........
17th Jun 2020, 8:55 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 2
Thank u so much (*Javaria*) 😊😊
17th Jun 2020, 9:11 AM
🏐Volley
🏐Volley - avatar
+ 1
Oh yeah n everytime I compile I get a different number. I want to enter a number but there seems to be a mistake going on.....
17th Jun 2020, 7:35 AM
🏐Volley
🏐Volley - avatar
+ 1
Seems like a variable may be uninitialized for some reason, but it's hard to tell without seeing your code.
17th Jun 2020, 7:46 AM
Gen2oo
Gen2oo - avatar
+ 1
Gen2oo Gen2oo Here I uploaded the code Hope u could understand.
17th Jun 2020, 8:20 AM
🏐Volley
🏐Volley - avatar