Posts

Showing posts with the label how to find the length of an array in c

How to Find the Length of an Array in C?

Image
C is a programming language  that has been known for its simplicity and the ease of compiling any program. Dennis Ritchie is the known founder of the C language and has been involved in various other programming language’s development. C is the base of various languages for instance, MySQL has been written with the help of C and C++ fundamentals. Array is a vital part of the C language that is basically one of its components. An array in basically a collection of items that are stored at a contiguous memory locations in C and C++, and the elements can generally be accessed randomly just by the use indices of an array. Arrays are the components that can be used basically to store a collection of primitive data types like int, double, float, char, etc that are of any particular type. To find the length of an array we should follow the generic approach that is given below: Arrays are basically known to have a fixed lengths that is generally within the scope of ...