Memory Management

Memory Management  This chapter explains dynamic memory management in C. The C programming language provides several functions for memory allocation and management. These functions can be found in the <stdlib.h> header file. S.N. Function and Description 1 void *calloc(int num, int size); This function allocates an array of num elements each of which size in […]

Command Line Arguments

Command Line Arguments It is possible to pass some values from the command line to your C programs when they are executed. These values are called command line arguments and many times they are important for your program especially when you want to control your program from outside instead of hard coding those values inside […]

Type Casting in C

Type Casting in C Type casting is a way to convert a variable from one data type to another data type. For example, if you want to store a ‘long’ value into a simple integer, then you can type cast ‘long’ to ‘int’. You can convert the values from one type to another explicitly using […]