Question: You have an array that is defined as int array2[4] = {50, 100, 150, 200}; write a for loop and a while loop to print

You have an array that is defined as int array2[4] = {50, 100, 150, 200};

write a for loop and a while loop to print each element of the array with a label in the following manner using printf() with the correct format string.

array2[0] = 50

array2[1] = 100

array2[2] = 150

array2[3] = 200

can it be written in C

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!