C++ PROGRAM TO ILLUSTRATE THE USE OF getchar() and putchar() – tutorial 2

0
137

​heyaa guys capstricks.net back and this time with the 2nd tutorial and program is to illustrate the use of getchar() and putchar() before proceeding further i suggest you guys to get any book like “getting started with c++ ” if you really serious to learn basics of c++ programming so without taking more time lets start with the code

CODE-

#include<iostream.h>

#include<stdio.h>

void main()

{

       char ch;

        cout<<“enter any character \n”;

         ch=getchar();

          cout<<“you have entered \n “;

           putchar(ch);

}

OUTPUT

enter any character 

also read:-  Things to know about Nokia 6

L

You have entered

L

wohooo now proceed further to get more tutorial