Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

D FINAL EXAM.pdf x) D https:/ bbl stedary x x-FINAL E AM-2018 Sp ?My L Garda. Su

ID: 3912759 • Letter: D

Question

D FINAL EXAM.pdf x) D https:/ bbl stedary x x-FINAL E AM-2018 Sp ?My L Garda. Sudr ? file///cnsers/b330-u14/Downloads/FINAL%20EXAM.pdf 8. What C-string will be stored in singingstring after the following code is run? char singingstring [20]DoBeDo" strcat (singingString, to you")a Assume that the code is embedded in a complete and correct program and that an include directive for ecstring> is in the program file. Ph 9. Consider the following code (and assume that it is embedded in a complete and correct program and then run): char next; int count-o cout

Explanation / Answer

8. DoBeDo to you will be stored in the variable singingString.

Line 1: char singingString[20] = "DoBeDo"; //declaration of a string in C using character array and we stored DoBeDo in the character array

Line 2: strcat(singingString, " to you"); //strcat is a predefined string function which is used to concatenate two strings

9. The output will be "ace h". Because the condition written here is if count is even then we should display that character.

10. We can define pointer type name using typedef keyword.

Ex: typedef double* NumberPtr;

NumberPtr myPoint; ---> This can be written as double *myPoint; ---> Both are same.