Skip to main content

Why C is a Middle Level Language?

Students who are in computer field will be aware about this topic . . . But do you really know why C is known as "Middle Level Language"?

In this article I will tell you some essential points, which makes you more prudent . . .Here, two cases are taken for discussion and that are: Function and Array

Functions of C language

  1. C doesn't back up Pascal like procedures - the original C always had a return value (void was later added during standardization; it means the value is returned from a function but that value is ignored)
  2. The arguments that you pass to the function is stored first onto the stack in the reverse order - before function is called. Now, when the function is called, it takes the arguments one by one (Last In first Out). For example, you have three variables such as 10, 20, and 30 to pass to the function. In stack, 30 will be the first element which will be stored, 20 second and so on. Now, when function will try to retrieve the elements from stack, the first element will be 10, 20 and 30.
  3. C doesn't back up for nested functions (Function inside the function)
  4. When function names are used in C, they decay into pointers. In other words, the name of the function is best thought of as an address, usually in a code segment, where that functio's executable code is stored.

Arrays of C language

  1. Array is a collection of same type of elements.
  2. With the aid of array's first address, you can access further elements one by one. So, you need to recollect only the first element address.
  3. The array elements are stored in a contiguous manner. It means there is no gap between any elements.
  4. You can access the element in many ways, like arry[i], i[arry], i + arry, and arry + i. This facility is provided by pointer.
  5. Array indexing starts from 0, not 1.
Still the features of arrays and functions look very high-level, familiar to us, and easy to use. That is the beauty of C and that is the reason why C is related to as middle level programming.

Comments