Friday, June 5, 2015

Calculating Array Length

Array length is not a big deal in modern high level languages. Still this is more or less impossible with inbuilt libraries in C language. Yet C is very important to code time critical algorithms where you need quick computations with maximum hardware utilization

In C '\0' means the NULL terminator. So what we are planning to do is go through the entire array until the null is met.

This could similarly performed by having stored the length in a struct and using that as an ArrayList available in Java or a list in C#. But this is a quick fix for simple algorithmic simulations. :)


No comments:

Post a Comment