In this tutorial we’ll see how we can use the getchar() function to receive single character input and how we can display characters using the putchar() function.
Amazon Auto Links: No products found.
In this tutorial we’ll see how we can use the getchar() function to receive single character input and how we can display characters using the putchar() function.
Amazon Auto Links: No products found.
Author: The Bad Tutorials
thank you dude.
putchar handzup
Thanks! In the first second of your video, I understood how they are used by how you arranged the program. I cannot express how terribly they explained it at my college..
#include
main()
{
char ch;
printf(“Enter a character:”);
ch = getchar();
printf(“The character entered is:”);
putchar(ch);
}
Here is the code
Thanks a lot!!
Hey! What service do you use to write the code and display the output? Thanks!
Is this the syntax for putchar() and get char()
really very bad
Your tutorials are amazing, I understand everything because of you, bless u,
thanks!
As always, spot on!
Awesome..!!
Very nice! Thank you. What IDE are you using? I am having a problem running this short example in Eclipse on a Windows 7 machine.
Bill
your english is very bad
hello man can you help me ?
i know gow to PRINT ancii chars on screen..
what i need to know its how to execute those commands ..
(example: i want to extract ancii chars + concaternate then + execute then)
char a = 21;
char b = 32;
char command = putchar(a);putchar(b);
int system(char command);
system(command);
thanks
if i use a loop….
for(int i =0; (ch= getchar()) !=EOF;i++)
ch = getchar();
then when will the loop terminate
Thanks buddy, it helps a lot
Where is include
Why would i use getchar and putchar ? Like i understand what they are doing but why would i use them and i have printf scanf etc.
I been trying to use visual studio to run this code but sadly it doesn’t work. What program are you using?
We can do the same using scanf() and printf(). So is there a difference between their usage based on your example?
is there a way by which we can take input without pressing ENTER Key
i.e., Are you sure to quit? y/n where pressing y close application and pressing n go to another statement in the program.
If anybody knows it please reply to my comment.
Nice!