0

How to write strings from console using pointers?

I'm trying to accept a string from console and print the same using pointers,can someone help me?

31st May 2019, 4:53 AM
Deepak Chekuri
3 Answers
+ 3
Please specify the language in the tags or in the question. C doesn't have strings but char arrays. In a char array like char str[100], "str" will be a pointer to the first char in the array, so it might be difficult to accept any text input that isn't already a pointer to char
31st May 2019, 5:09 AM
Anna
Anna - avatar
0
In C language not in C++
31st May 2019, 4:56 AM
Deepak Chekuri
0
Thanks Anna
31st May 2019, 5:14 AM
Deepak Chekuri