Question: Write C code for a program that does the following: o Create a character array that displays the message My Friends Ages Program at

Write C code for a program that does the following: o Create

Write C code for a program that does the following: o Create a character array that displays the message "My Friends Ages Program" at the declaration o Create a second array that will store 4 integer values o Use assignment statements to store the following friend's ages ages[0] = 25 ages[1] = 27 ages[2] = 24 ages[3] = 26 o Use a puts() statement to display the message in the first bullet o Use a for() statement to display each age stored in the array element The end output statement should display the friend's ages. o

Step by Step Solution

3.48 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

c include int main char message My Friends Ages Program int ages4 ages0 25 ages1 27 ages2 24 ages3 26 putsmessage for int i 0 i 4 i printfFriend ds age d i 1 agesi return 0 The code creates two arrays ... View full answer

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 Programming Questions!