Question: L language is c Question 1 0 / 1 pts Where is the storage for the hello string literal allocated in memory when chis program

L language is c Question 1 0 / 1 pts Where isthe storage for the "hello" string literal allocated in memory when chisprogram is run? #include int main(void) { char * p = "hello";printf("%s ", p); return 0; No memory is allocated to "hello". SomewhereL

language is c

Question 1 0 / 1 pts Where is the storage for the "hello" string literal allocated in memory when chis program is run? #include int main(void) { char * p = "hello"; printf("%s ", p); return 0; No memory is allocated to "hello". Somewhere else. On the stack. Incorrect. Incorrect. Question 7 0/1 pts What happens when you compile and run this program? (To print the return value you can use echo $? in the command-line window right after running the program.) #include int main(void) { char c = NULL; return c != '\0'; It compiles just fine, even with -Wall - Wextra. It produces a compilation warning, but then it returns 0. It crashes. It produces a compilation error. Incorrect It returns -1. Question 9 0/1 pts What does the following program print when executed? #include int main(void) { char c[] = "36"; c[0]++; printf("%s ", c); return 0; O 4G It prints nothing because it crashes when it tries to modify read-only memory. Question 10 0 / 1 pts What does the following program print when run? #include int main(void) { char str[] = "complement"; char * p = str; p[sizeof(str)-6] = 'i'; printf("That's quite a %s ! ", str); return 0; That's quite a compiement! O That's quite a complement! The program does not compile. That's quite a compliment

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!