0

What to do if we getting error as an expression was expected after '(' while using getchar(); in c

5th May 2023, 12:59 AM
Aditya Rapeti
Aditya Rapeti - avatar
2 Answers
+ 2
Aditya Rapeti this might be a case of the wrong error message being reported. Check all the code before it for correctness. I would first suspect that the line above the getchar is missing a semicolon, or maybe has a mismatched parenthesis. I will join the chorus and ask for you to post your code so we can determine a specific solution.
5th May 2023, 4:09 AM
Brian
Brian - avatar
0
getchar() can't take arguments, so it sounds like the sololearn error parser is being dumb, which happens a lot since the update. Share your code and we can try to help you find what's actually going wrong.
5th May 2023, 1:53 AM
Orin Cook
Orin Cook - avatar