what is a string code example

Example 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;
}

Example 2: what is a string

a linear sequence of characters, words, or other data.

Example 3: whats a string

string a = "je bolle tering moeder";
  
  Console.WriteLine (a);
  Console.ReadKey ();

Example 4: what is string

It's an immutable char sequence and
all characters has index numbers.

There are also mutable char sequences like :
STRING BUILDER & STRING BUFFER