Question #6453   Submitted by Answiki on 07/31/2022 at 07:42:05 PM UTC

How to display an array in C language?

Answer   Submitted by Answiki on 07/31/2022 at 07:43:28 PM UTC

To display an array in C language, it is necessary to use a loop to print each cell of the table individually:

// Array
int i, Tab[5]={10, 20, 40, 80, 160};

// Loop that display each cell of the array
for (int i=0 ; i<5 ; i++)
	printf ("%d\t", Tab[i]);




2 events in history
Answer by Answiki on 07/31/2022 at 07:43:28 PM

To display an array in C language, it is necessary to use a loop to print each cell of the table individually:

// Array
int i, Tab[5]={10, 20, 40, 80, 160};

// Loop that display each cell of the array
for (int i=0 ; i<5 ; i++)
	printf ("%d\t", Tab[i]);




Question by Answiki 07/31/2022 at 07:42:05 PM
How to display an array in C language?
# ID Query URL Count

Icons proudly provided by Friconix.