0

Reading a character from the keyboard keeps giving me problem. When I do a gcc -o progname progname.c and ./progname, and press enter, it doesn't stop to receive the character. How can I correct this ?

Code blocks are created by indenting at least 4 spaces
... and can span multiple lines
#include<stdio.h>
char c;
int main(void)
{ 
 printf("\nEnter character ");
 scanf("%c",c);

 return 0;
}
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by zeroliken
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.