0
chandu
4y

Why we don't write dereference operator while priting string(format specifiers is %s).
For example: char arr[5]={"char"};
printf("%s",arr);//print char.
If we write like printf("%s",*arr);//compile time error.

Comments
  • 1
    You need to go back to the lesson of the course where they explained the difference between pointer and pointed-to, then go forward to where they explained how C strings work.
Add Comment