Advanced Topics in C

Declaring a pointer variable

General syntax of pointer declaration is, data-type *pointer_name; Data type of pointer must be same as the variable, which the pointer is pointing. void type pointer works with all data types, but isn’t used oftenly. Initialization of Pointer variable Pointer Initialization is the process of assigning address of a variable to pointer variable. Pointer variable …

Declaring a pointer variable Read More »

Error Handling

C language does not provide direct support for error handling. However few method and variable defined inerror.h header file can be used to point out error using return value of the function call. In C language, a function return -1 or NULL value in case of any error and a global variable errno is set …

Error Handling Read More »

What is Dynamic Memory Allocation In C Programming Language? C Tutorial

The process of allocating memory at runtime is known as dynamic memory allocation. Library routines known as “memory management functions” are used for allocating and freeing memory during execution of a program. These functions are defined in stdlib.h. Function Description malloc() allocates requested size of bytes and returns a void pointer pointing to the first …

What is Dynamic Memory Allocation In C Programming Language? C Tutorial Read More »