My Blog
Articles related to programming, computer science, technology and research.

C program to read and print a matrix using pointers

29/07/2016 Categories: Pointers. Comments Off on C program to read and print a matrix using pointers

A C program to read and print a matrix using pointers and dynamic memory allocation. Program is as follows: #include<stdio.h> #include<stdlib.h> int main() { int m, n; printf(“Enter no. of rows and columns: “); scanf(“%d%d”, &m, &n); int **a; //Allocate memory to matrix a = (int **) malloc(m * sizeof(int *)); for(int i=0; i<m; i++) […]

Read the rest of this entry »

C program to reverse an array in place using pointers

09/07/2016 Categories: Pointers. Comments Off on C program to reverse an array in place using pointers

A C program to reverse the given array in place using pointers. Program is as follows:

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to compare two arrays using pointers

06/05/2016 Categories: Pointers. Comments Off on C program to compare two arrays using pointers

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to reverse a given string using pointers

06/05/2016 Categories: Pointers. Comments Off on C program to reverse a given string using pointers

 

Input and output for the above program is as follows:

 

Read the rest of this entry »
Scroll Up