explain about a string?

jonsca commented: No? -1
Narue commented: Stop being lazy and do some research. -5

Recommended Answers

All 3 Replies

strings are collection of characters that you enclose it with double quotes.
eg:

char a[5]="world";

a[0] will have w
a[1] will have o
a[2] will have r
a[3] will have l
a[4] will have d.

strings are collection of characters that you enclose it with double quotes.
eg:

char a[5]="world";

a[0] will have w
a[1] will have o
a[2] will have r
a[3] will have l
a[4] will have d.

Would you care to correct your description and not blow past your array boundaries?
And add the required information on \0?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.