324 views
0 votes
0 votes
char ch;

scanf("%c",&ch) // after I do scanning of this variable then after I press enter key then it gets stored inside the buffer so can we print this enter key .Since during the next call to scanf function the enter key gets stored inside the variable .

1 Answer

0 votes
0 votes
Do one more

scanf("%c", &ch)

Now, ch will have Enter. So, do

printf("c", ch);

Related questions

1 votes
1 votes
2 answers
1
0 votes
0 votes
2 answers
3
radha gogia asked Aug 2, 2015
843 views
int B [3];int *p = B; // why this is wrong?int (*p)[3] = B; // why this is correct?
0 votes
0 votes
2 answers
4
radha gogia asked Jul 29, 2015
605 views
when I write this statement int i=1,2,3 then why is this an error , how does comma acts here as a separator ,while in this casei=1,2,3 it acts an operator