0

What's going wrong? I think I've got it figured out but I'm unable to compile the program and print out what I want it to say.

0

count_letters is a function. count_letters("Some text") is an int. You've got the %i flag in your printf statement, so you need an int as the second argument. That's why it's not compiling.

It won't work either, because you'll never run that line of code. The return statement on line 25 will exit that function, and line 26 will never run. (Also, you shouldn't call count_letters() inside count_letters() like you're doing here, because if you did run that line of code, it would lead to an infinite loop. It looks like you should have that line of code in main.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .