+ 5

How to use String pointer in C ??

Char *str="solo"; //how to display caracter of str??

2nd Apr 2022, 12:40 AM
Mik
Mik - avatar
4 Answers
+ 3
G'day Vliz's that is C++ code, RDC+243 wanted C Try this: #include <stdio.h> int main() { char* str; str="contents"; puts(str); //when you only want the string printf("%s",str); //when you want to use printf() return 0; } https://code.sololearn.com/c4KcCUVOFhL8/?ref=app
2nd Apr 2022, 1:58 AM
HungryTradie
HungryTradie - avatar
+ 3
Ok !
7th Apr 2022, 12:41 PM
Mik
Mik - avatar