C Tutorials

Union in C

Union is a user defined data type which contains variables of different data types. Or we can say that, union is collection of dissimilar type of elements or data. The concept of union is taken from structure so the syntax of union is same as structure. Union can be defined using keyword “union” as shown …

Union in C Read More »

C Enumeration

C Enumeration or Enumerated Data Type C enumeration is a user defined data type which consists of a list of names and each name corresponds to an integral constant. It increases the program readability as names are easy to read and maintain. Enumerated data type can be defined in C using “enum” keyword. The syntax …

C Enumeration Read More »

C Function Pointer

We declare a pointer to integer, pointer to character or pointer to array. Similarly we can declare a pointer to function or a function pointer. Same as like variables, functions also have some address in memory. C Function Pointer A function pointer is a pointer that contains the address of a function. It can be …

C Function Pointer Read More »

void pointer in C

When we declare a pointer we specify its type which will be same as the type of the variable whose address the pointer will contain. For example if we will declare an integer pointer then it can contain the address of an integer variable only. Take below example. What if we can have a pointer …

void pointer in C Read More »