C Array

An array is a collection of elements that are used to hold the fixed number of values of the same type. We cannot change the size and type of array after its declaration. Why should we use an Array? We should use an array because of its properties: It reduces the code...

Pointer in C

Pointer is a variable that is used to contain the address of another variable. We can easily create a pointer in C language. Example: int *ptr Symbol Description & (ampersand sign) Address of an operator is used to contain the address of a variable. * (asterisk...

Dynamic memory allocation

Dynamic memory allocation is used to allocate the memory at runtime. It has following function within <stdlib.h> header file. Function Syntax malloc() malloc (number *sizeof(int)); calloc() calloc (number, sizeof(int)); realloc() realloc (pointer_name, number *...

Nested Structure in C

In C language, we can create nested Structure (Structure within Structure). There are two ways to define a nested structure. By separate structure By Embedded structure   Separate structure In a separate structure, we can create one or more structure inside the...

Union in C

Union is a user-defined data type that is used to hold the different types of elements like structure. In union, all members share the same memory location. Syntax: union [union name] { member definition; member definition; ... member definition; }; 123456789...

File Handling in C

File Handling is used to open, read, write, search and close file.  C files I/O functions handles data on secondary storage device. File handling function: There are varioushandling functions in c. Function Operation fopen() It is used to create a file. fclose() It is...

C pre-processor

The C processor is a macro processor which is used to compile the source code of the program (step by step) . It is not a part of the compiler. All pre-processor commands begin with the hash symbol (#). The C pre-processor provides various facilities that are:...

Pin It on Pinterest