+ 1
Can anybody help with this code because it's not given no output
Factorial code I have made some changes but output is given "no output" please anybody help me in this.....
7 Antworten
+ 5
So here is your code: https://code.sololearn.com/cVHeZQq2lmEc/?ref=app
The problem is that you forgot to use & (Address Operator) in the scanf() function
Change line no. 9 to this:
scanf("%d", &x);
And your code will be fine!
Note that using & Operator is must while scanning value from user in C Language, otherwise that value will freely move in the memory and will not be stored in the proper variable.
+ 4
Anil Gupta No you have not used address operator. Check this: scanf(" %d", *x*); Change *x* to *&x*
+ 4
Anil Gupta Check mark my main answer if that helped you
+ 2
Show us your code. We can’t help you if we can’t see what youve done
+ 1
But I have already address operator in scanf but still given same output that "no output "
+ 1
Absolutely right I have forgotten to add that thank you so much