9. The following C code program should print hello world on the screen, but it has compile and run time errors in the code.

9. The following C code program should print “hello world” on the screen, but it has compile and run time errors in the code. List all these errors and for each error, state what the error is. Rewrite the C program with all the error fixed. # include stdio. h > int main () { char *s s call () ; strcat (world, s); printf (s); } char* call () { return (“hello”); } 10. What is the output produced by that the following code fragment? Give an explanation of your answer. int *ptr int arr[] (10,20,30,40,50}; ptr= arr; printf “%d”, *(++ptr) ) ;



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *