MENU

Fun & Interesting

C arrays 🗃️

Bro Code 184,944 lượt xem 3 years ago
Video Not Working? Fix It Now

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;
}

Comment