C Programming :: Strings
-
Will the program compile successfully?
#include
int main() { char a[] = "Fresher"; char *p = "GATE"; a = "GATE"; p = "Fresher"; printf("%s %s\n", a, p); return 0; } -
For the following statements will arr[3] and ptr[3] fetch the same character?
char arr[] = "FresherGATE";
char *ptr = "FresherGATE"; -
Is there any difference between the two statements?
char *ch = "FresherGATE";
char ch[] = "FresherGATE";