+ 2

I didn't understand the function of String c

please explain me how it accepts the values.

13th Aug 2018, 4:41 PM
Priyasha Das
Priyasha Das - avatar
2 Answers
+ 1
Strings in C are arrays of 'char' variables. There are two ways of declaring strings in C. The first is declared using a fixed amount of characters, as such: char variable[10] = "string"; The second way is by using pointers: char *variable = "string"; If I misunderstood your question, please let me know.
13th Aug 2018, 7:06 PM
Louie
Louie  - avatar
+ 1
There is two ways to declare string, one is like primitive type and 2nd one is like wrapper class. For example of primitive string ='das'; Example of wrapper class string =new string('das');
28th Aug 2018, 4:22 AM
AYUSH RAJ
AYUSH RAJ - avatar