C arrays πŸ—ƒοΈ
Bro Code Bro Code
1.86M subscribers
104,234 views
0

 Published On Oct 6, 2021

C arrays tutorial example explained

#C #arrays #tutorial

int main()
{
// array = a data structure that can store many values of the same data type.

//double prices[] = {5.0, 10.0, 15.0, 25.0, 20.0};
double prices[5];

prices[0] = 5.0;
prices[1] = 10.0;
prices[2] = 15.0;
prices[3] = 25.0;
prices[4] = 20.0;

printf("$%.2lf", prices[0]);

return 0;
}

show more

Share/Embed