Answers for "how to use a string"

C++
1

make string

public string MyString = "Hello World";
Posted by: Guest on March-29-2020
1

string

#include <iostream>
int main()
{
	using namespace std;

	char name[20];       //declaring string 'name'

	cin.getline(name, sizeof(name)); //taking string input
	cout << name << endl; //printing string
	return 0;
}
Posted by: Guest on April-20-2021

Code answers related to "how to use a string"

Browse Popular Code Answers by Language