+ 5
How to use String pointer in C ??
Char *str="solo"; //how to display caracter of str??
2 odpowiedzi
+ 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
+ 3
Ok !