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

-2.c:275:26: eror: \'firstname\' undeclared (first use in this function) scanfC\

ID: 3731086 • Letter: #

Question

-2.c:275:26: eror: 'firstname' undeclared (first use in this function) scanfC"s", &firstname;); 2.C:275:26: note: each undeclared identifier is reported only once for each function it appea in 2.c201: error: passing argument 1 of 'printlessoge' mokes pointer from integer without a t -Werror] printMessage(firstName,MIA) H 2.c:in:6: note: expected ‘char., but argument is of type ‘char, void printHessageCchar name, char num 2.c:zaS:21: error: passing argument 1 of 'printHessage' makes pointer from integer without a st -Herror printHessage(firstName, BNA) H.2.c:in:6: note: expected ‘char ., but argument is of type ‘char, void printHessage(char name0, char num 2.c:290:2a: error: passing argument 1 of 'printMessage' makes pointer from integer wi thout a st [-Werrorl printHessageCfirstName, LAS); kl.c :181:6: note: expected ‘chor ., but argument is of type 'dar' void printHessageCchar nameD, char num ccl: all warnings being treated as errors [malpq8ete-m610-login-node623-

Explanation / Answer

Since images are not all clear and the code is not complete I will provide only the changes that you need to make:

Wrong: char firstname;

Correct: char firstname[20];

Wrong: scanf("%s", &firstname);

Correct: scanf("%s", firstname);

Above two changes should take care of the messages showing above. Kindly give a nice thumbs up.