+ 2
Why we create array while using char data type in c?
16 Answers
+ 4
I don't think so, because the last time I try using pointer it doesn't work, maybe expert may have another means, let me call in a guru ~ swim ~
+ 3
yeah, char arr[10]=0;
scanf("%s", arr); or gets(arr);
+ 3
~ swim ~ thats was just a typo error
+ 3
Thank u Asterisk 😀
+ 3
Ty swim
+ 2
maybe to create a string or to create lots of character array to choose from for an option
+ 2
Bt i wanted to know is there any other way for taking string as an input
+ 2
What is swim
+ 1
Yeah I know to create or to take string as an input.But is there any way to take string as an input in c?
+ 1
Ty
+ 1
Tysm Airee n Asterisk
+ 1
Yeah i tried this approach.
0
That's a replacement for strings.
In Javascript, you can treat strings like arrays. In C, they are literally arrays of characters
0
No, there are no strings in C