#include<stdio.h> int main() { char str = "CuriousTab"; printf("%s\n", str); return 0; }
To eliminate the error, we have to change the above line to
char *str = "CuriousTab"; (or) char str[] = "CuriousTab";
Then it prints "CuriousTab".
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.