Write a c program to determine the size of an array?

1 answer

Answer

1271051

2026-05-05 01:45

+ Follow

using sizeof operator the size of whole array can be calculated, then divide it with the zise of the datatype(E.g. for int =4, char =2....etc.)

Example:

#define Narray (sizeof(array)/sizeof(array[0]))

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.