Whats is the difference between these two ? char* p = "Hello"; char* q = {'h', 'e', 'l', 'l', 'o'};
Sigiloso
first one is a character string, C automatically adds null character in the end. And it needs to be "const char* p" instead of just "char*" because compiler may put this on read only memory. You can never guarantee that it can be modified later. (but interviewer was least interested in knowing that)