0
Write a c program to read and print the element of 2 D array. Please correct.
#include<stdio.h> #include<conio.h> input(int a,int n) { int i; for(i=0;i<n;i++) { scanf("%d", &a[i]); } } output(int a,int n) { int i; for(i=0;i<n;i++) { printf("%d ", a[i]); } } int main() { int a[1000],i,n; printf("Enter size of array: "); scanf("%d",&n); printf("Enter %d elements in the array : ", n); input(a,n); printf("\nElements in array are: "); output(a,n); return 0; }
1 ответ