cppbuzz logo

Home  |  About Us  |  Contact
View Questions Upload Training Misc..

How does float array works in C programming | example of float array | float array in C

Declaration of float array in C programming:
float b[5]

It can be expalined as:
b is an array of 5 float values. If float takes 4 bytes then this array will take 20 bytes of memory.
b first element can be accessed using b[0], second element can be accessed using b[1], and so on..
here 0, 1 are known as index value.

All elements of b array are allocated on Stack area of memory.