why I am unable to run the scanf() function in c? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

why I am unable to run the scanf() function in c?

This code is not executing .pls help. #include<stdio.h> int main(){ float i ; printf("enter a number ="); scanf("%f", &i); printf("%f",i); return 0; } output : [Running] cd "c:\Users\lenovo\Desktop\New folder (2)\New folder\" && gcc input.c -o input && "c:\Users\lenovo\Desktop\New folder (2)\New folder\"input

2nd Feb 2022, 1:14 AM
KUNAL SINGHAL 2K21/B1/009
3 Answers
+ 2
did create an executable file? gcc <filename> -o <object_file name> ./<object_file name>
2nd Feb 2022, 1:22 AM
Slick
Slick - avatar
0
@slick bruh i already have one exe file . it is executed in exe file but not on vs code
2nd Feb 2022, 11:29 AM
KUNAL SINGHAL 2K21/B1/009
0
its only happening with scanf() all others are working.
2nd Feb 2022, 11:53 AM
KUNAL SINGHAL 2K21/B1/009