The program is a C++ program that demonstrates the use of different data types and input/output operations. The program is currently commented out, which means that all the statements are disabled, except for one that reads a line of text from the user. Let's break down the program line by line:
The current program is commented out, which means that all the statements are disabled except for one that reads a line of text from the user. This line uses the getline() function to read a line of text from the user and store it in the a variable. The getline() function is used to read an entire line of text, whereas the cin object is used to read only a single word or number. Finally, the program outputs the value of the a variable to the console.
#include<iostream> using namespace std; int main() { //int a,b; /* float a,b; cout<<"Enter The Integer Value : "<<endl; cin>>a>>b; cout<<"Total is :"<<a+b; char a; char a; cout<<"\nEnter The Character : "; cin>>a; cout<<"Character is : "<<a; string a; cout<<"\nEnter The String : "; cin>>a; cout<<a;*/ string a; cout<<"\nEnter The Para : "; getline(cin,a); cout<<a; return 0; }
Enter The Integer Value : 23 456 Total is :479 Enter The Character : S Character is : S Enter The String : Tutor Joes Tutor Enter The Para : Tutor Joes Computer Education Tutor Joes Computer EducationTo download raw file Click Here
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions