Array of pointers in C Programming

Example: Write a program to assign the address of array elements to pointer variable and print the array element with address.

OUTPUT

Functions in C Programming

In a C programming language a function is a group of statements that together perform a special task. In every C program has at least one function, which is main(). In a C library has a numerous predefined or built-in functions. For example, strcat() to concatenate two strings, main() from where program execution starts.  In a C programming … Read more

Matrix Multiplication in C Programming

Example: Write a program to multiply two matrix. Firstly, ask from user order of matrix( number of rows and column) Then take the elements of matrix from user as a input and print the resultant matrix.

NULL Pointers in C Programming

A pointer that is assigned NULL is called a null pointer. We must initialize NULL pointer during variable declaration. A null pointer refers to pointer variable that does not point to a valid address. Generally NULL pointer is used when you do not have an exact address to be assigned.

OUTPUT

Call by value and Call by reference in C Programming

Call by value and Call by reference in C are two ways to pass arguments in a function Lets see above one by one Call by value Whenever we call a function and passes the value of variable to the called function is called call by value.

OUTPUT

Call by reference Whenever we … Read more

Multi-dimensional Array in C Programming

C programming language also support multidimensional arrays. Syntax of multidimensional array declaration: Data_type    array_name[size1][size2]…[sizeN]; For example, if we want to creates a three dimensional integer array − int  num[5][10][4]; Two-dimensional Arrays The simplest form of multidimensional array is the two-dimensional array. if we want to declare a two dimensional integer array of size [x][y] ( … Read more

Pointer to Pointer in C Programming

In  C language, a pointer is an address. Normally, a pointer variable contains the address of a another variable.  A pointer to a pointer is a chain of pointers.  Or Pointer to pointer means one pointer variable holds the address of another pointer variable.

Pointers in C Programming

In    programming, variable is used to hole the value & this variable stored in a memory.  Each variable has a address to identify where these variables actually stored in a memory.     In a C programming language, pointer is a variable which can hold the address of another variable.   Accessing Address of Variable In … Read more

Recursion in C Programming

In C programming language, a function that calls itself is known as a recursive function. And, this technique is called as recursion.  Recursive functions are very useful to solve many problems such as  Towers of Hanoi (TOH), Inorder/Preorder/Postorder Tree Traversals, DFS of Graph, etc. How recursion works?

Example: Write a program in a C language to … Read more

Union in C Programming

In C programming language, union is a special user defined data type that allows to store different data types in the same memory location. “union”  uses the same memory location for multiple-purpose.  Or In a union data type, single variable, i.e., same memory location, can be used to store multiple types of data. In c programming … Read more