I had to print the string but it is just showing errors ;/
This is my code:
#include <stdio.h>
int main(){
char str[] = "Harry";
char *ptr = str;
while(*ptr != '\0'){
printf('%c', *ptr);
ptr++;
}
return 0;
}
I tried to print The String As Harry and its showing this:
Strings.c: In function 'main':
Strings.c:9:16: warning: multi-character character constant [-Wmultichar]
printf('%c', *ptr);
In file included from Strings.c:1:0:
c:\mingw\include\stdio.h:454:38: note: expected 'const char *' but argument is of type 'int'
_CRTIMP __cdecl __MINGW_NOTHROW int printf (const char *, ...);
^~~~~~