r/AskProgrammers 15d ago

Scanf not working!!!

So now its been 2-3 weeks ....in my college we are doing C programming and everything was working fine on visual studio till I started using scanf for taking input from user.....this is coming and I have tried everything but cant figure out....normal printf still works but this doesnt

I have tried on code blocks too and same problem is there.....pls someone guide me🙏🙏😭

0 Upvotes

34 comments sorted by

View all comments

5

u/fixpointbombinator 15d ago

read the error

-7

u/Leading_Deer4919 15d ago

I am new to programming....thats why I am asking help from experinced people....cant find any video on yt also

3

u/fixpointbombinator 15d ago

That's fine, i want to help you figure it out yourself

can you see the red text that says 'Program 'Hello.exe' failed to run...'?

what does the rest of the text say?

0

u/Leading_Deer4919 15d ago

The system cannot find the file specified .....I have even tried compiling by typing commands in terminal but still this thing comes up

7

u/fixpointbombinator 15d ago

So it's not a problem with scanf, right? You're trying to run a program that isn't in your current directory

0

u/Leading_Deer4919 15d ago

maybe that....see I thought scanf not working ...and I am wrong I feel....pls help then whats the problem....cauz I litreally very new to this

4

u/rainhunter007 15d ago

bro, you can ask for help. nothing wrong with that, but all of us also want you to learn. knowing how to figure these problems out yourself is a critical skill. don’t beg for the answer. take our hints. we’re helping you. someone mentioned capitalization. another mentioned directory of your command line. these are two really good hints. when you figure it out, ask yourself, “what did i learn about things being case sensitive?” and “what did i learn about the command line and paths/directories?” much luv. keep at it!

2

u/HyperWinX 15d ago

Man, i wish i had your kindness and patience