Ask your own question, for FREE!
Computer Science 9 Online
OpenStudy (anonymous):

#include int main() { char c; scanf("%c",&c) printf("%c",c); return 0; } why iam not able to give a character to 'c' at runtime..

OpenStudy (harsimran_hs4):

Semicolon is missing at the end of the scanf statement , this would have been pointed out by the compiler Other than that everything is fine

OpenStudy (anonymous):

when you compile the code compile like this gcc -Wall -o name name.c -Wall means that if your program has wrongs thing like syntax errors those are to be mention at compile time ,if it so you can identify where went wrong ...

OpenStudy (rsmith6559):

With the addition of the semi-colon, your code works. Would this addition help: int main() { char c; printf( "Enter a character: " ); scanf("%c",&c); printf("%c\n",c); return 0; }

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!