Today, I will go ahead with a program. #include<iostream.h> #include<conio.h. int i;//global variable void main() { int j;//local variable clrscr(); cout<<".............."<<endl; cout<<"12345; cout<<"\n j="<<j; endl(cout); cout<<"i="<<i; cout<<"\n"; cout<<2324.65; cout<<"\\*********\\";//here double back slash which is inside cout statement will be ignored. getch(); } Explanation: refer to 'c++ programming #1' section. Now As we saw in 'C' programming we use other functions instead of scanf, here a get() function introduced to read the single character value and put() function to write in the compiler. The syntax to read a single character using get() - cin.get(variable); ex..char ch; cin.get(ch); The syntax to write a single character using put() - cin.put(variable/value); ex..char ch='x'; cin.put(ch); ...
This blog is only for education purpose, for those who want to interact with the IT world.This may help you to build the basic concepts in software engineering.