Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please explain the code and also the result. please show how the result come out. See code 03_A_activity.c, in the code AND answer questions 1,
please explain the code and also the result. please show how the result come out.
See code 03_A_activity.c, in the code AND answer questions 1, 2 and 3. You need to replace each printf*( statement as specified in the comment above. Code screenshot need to include pwd and data pwd date 03_A_activity Example Screenshot with solution (except program is called 03_A_activity): nutmeg:ingrid:1640\} pwd /Users/ingrid/ctutorial/1activity_solA \{nutmeg:ingrid:1641\} date Mon Feb 8 04:07:23 EST 2021 \{nutmeg:ingrid:1642\} 03_A_activity [f1]: input is: a and returns 1 [f2] : input is: b and returns 2 [f3]: input is: c and returns 3 nutmeg:ingrid: 1643} \#include int f1( char var) \{ char fn[]="[f1]"; int return_val=1; printf( "\%s: input is: \%c and returns \%2d ", fn, var, return_val); return return_val; \} int f2( char var) \{ char fn []="[f2]"; int return_val=2; printf( "\%s: input is: \%c and returns \%2d ", fn, var, return_val ); return return_val; \} int f3( char var) \{ char fn[]="[f3]"; int return_val=3; printf( "\%s: input is: \%c and returns \%2d ", fn, var, return_val); return return_val; \} int main() \{ printf( " "); printf("\t............... ); printf("\t ..... Task 3a.... ); printf("\t............... ); printf(" "); // // // // QUESTION 1: Declare an ARRAY of 3 chars initialized I/ to contain 3 chars - ' a ', ' b ' and ' c ' // name the array "carray" ("c" is for char). // // Q1: REPLACE the print statement below with array declaration printf("Q1: TODO: Add declaration of -- an array of 3 chars --- : ")Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started