Created
November 23, 2014 17:16
-
-
Save SOURAV-ROY/976df0fd2ed78138bff2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void scanArray2D(int arr2D[][5], int ROW,int COL); | |
void printArray2D(int arr2D[][5], int ROW,int COL); | |
int main(void) | |
{ | |
int r,c,a[5][5]; | |
printf("Enter Row and Column: \n"); | |
scanf("%d%d",&r,&c); | |
scanArray2D(a,r,c); | |
printArray2D(a,r,c); | |
return 0; | |
} | |
void scanArray2D(int arr2D[][5],int ROW,int COL) | |
{ | |
int i,j; | |
for(i=0;i<ROW;i++){ | |
for(j=0;j<COL;j++) | |
{ | |
printf("Enter: \n"); | |
scanf("%d",&arr2D[i][j]); | |
} | |
} | |
} | |
void printArray2D(int arr2D[][5],int ROW,int COL) | |
{ | |
int i,j; | |
for(i=0;i<ROW;i++){ | |
for(j=0;j<COL;j++) | |
{ | |
printf("%d",arr2D[i][j]); | |
} | |
printf("\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment