Problem:- Write A C++ Program To Print A Full String Input By Keyboard or how to print a string in c++ using cout or print string in c++ using printf or how to output a string in c or cout string array c++ or write a c++ program that displays your name on the output screen or input string in c++ or string manipulation in c++ program or string in c++ example or output string c++ or cout string array c++ or print string in c++ using printf or how to output a string in c or c++ string << operator or c++ cout example or c++ operator to string or how to print quotation marks in c++.
Check This:- Hacker rank solution for Strings, Classes, STL, Inheritance in C++.
Logic:- Take an input and using a " For Loop " print string in screen this is a very simple program just like a print a Hello World!. In this program I use a gets() function this is why we can take an input included with space or in other words we can say that we can take a sentence as in input. For next level, after this problem, you can check this problem and practice See the problem C++ Program To Display String From Backward
Also Check:- Geeksforgeeks solution for School, Basic, Easy, Medium, Hard in C++.
Extreme Recommended:- Like our Facebook Page or Join our Facebook Group and Google plus Community for up-to-date for a new post or if you have any Query you can ask there with lots of coders also suggest to your Friends to join and like our page.
Solution:-
Output:-
You May Also See
1. C Program to Convert a person's name in Abbreviated
2. C Program For Calculate A Simple Interest
3. C Program To Find Greater No. Among given Three Number
4. C++ Program For Calculate Percentage Of 5 Subjects
5. C++ Program For Converting Temperature Celsius Into Fahrenheit
6. C++ Program To Display Size Of Different Datatype
7. C++ Program To Check Number Is Positive Or Negative
8. Java Program To Check Number Is Positive Or Negative
9. Java Program To Find Character Is Vowel Or Not
10. Java Program To Calculate Factorial Of A Given Number
Check This:- Hacker rank solution for Strings, Classes, STL, Inheritance in C++.
Logic:- Take an input and using a " For Loop " print string in screen this is a very simple program just like a print a Hello World!. In this program I use a gets() function this is why we can take an input included with space or in other words we can say that we can take a sentence as in input. For next level, after this problem, you can check this problem and practice See the problem C++ Program To Display String From Backward
Also Check:- Geeksforgeeks solution for School, Basic, Easy, Medium, Hard in C++.
Extreme Recommended:- Like our Facebook Page or Join our Facebook Group and Google plus Community for up-to-date for a new post or if you have any Query you can ask there with lots of coders also suggest to your Friends to join and like our page.
Solution:-
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
/*Visit - www.programmingwithbasics.com*/
cout<<"=====================================";
cout<<"\nVisit - www.programmingwithbasics.com";
cout<<"\n=====================================";
char a[20];
int i,j;
cout<<"\n\nEnter The String: ";
gets(a);
cout<<"\n\nYour Entered String is Given Below \n\n";
for(i=0;a[i]!='\0';++i)
{
cout<<a[i];
}
return 0;
}
Output:-
1. C Program to Convert a person's name in Abbreviated
2. C Program For Calculate A Simple Interest
3. C Program To Find Greater No. Among given Three Number
4. C++ Program For Calculate Percentage Of 5 Subjects
5. C++ Program For Converting Temperature Celsius Into Fahrenheit
6. C++ Program To Display Size Of Different Datatype
7. C++ Program To Check Number Is Positive Or Negative
8. Java Program To Check Number Is Positive Or Negative
9. Java Program To Find Character Is Vowel Or Not
10. Java Program To Calculate Factorial Of A Given Number
0 Comments: