# How to get the number of elements in the float table in C?

• How do I determine the size of my array in C? 20 answers

I'm trying to get the number of floats in the following array:

``````float coins[] = {0.25, 0.10, 0.05};
printf("%i", sizeof(coins));
```
```

I get `12`.

I am trying to get `3`.

What am I missing here?

you can get the number of elements in array by,

``````array_size/single_array_element_size
```
```

i.e.

``````sizeof(coins)/sizeof(float)
```
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.74867046,"math_prob":0.9119018,"size":404,"snap":"2019-51-2020-05","text_gpt3_token_len":115,"char_repetition_ratio":0.1225,"word_repetition_ratio":0.0,"special_character_ratio":0.3069307,"punctuation_ratio":0.1827957,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9816922,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-21T20:08:03Z\",\"WARC-Record-ID\":\"<urn:uuid:57012285-bbbf-4ebc-a737-8cba4af5bc5d>\",\"Content-Length\":\"18554\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d06248b6-fa5e-4f42-acb5-03ebd85330c3>\",\"WARC-Concurrent-To\":\"<urn:uuid:9f8607ec-df2e-4591-92a6-78620fe98979>\",\"WARC-IP-Address\":\"104.31.73.112\",\"WARC-Target-URI\":\"https://www.codesd.com/item/how-to-get-the-number-of-elements-in-the-float-table-in-c.html\",\"WARC-Payload-Digest\":\"sha1:WFSKIJHNZO2HRKHWCWMY7BXSVU4OUWQZ\",\"WARC-Block-Digest\":\"sha1:DJEY3MYIU4RBPOHTQVJIY6XCIIKS2XYR\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250605075.24_warc_CC-MAIN-20200121192553-20200121221553-00315.warc.gz\"}"}