EmbLogic's Blog

Enter Elements in Array

#include <stdio.h>
int main()
{
int i,j;
int r=2,c=3;
int arr[3][4];

printf(“Enter Elements:\n”);
for(i=0;i<3;i++)
{
for(j=0;j<4;j++)
{
scanf(“%d”, &arr[i][j]);
}
}

printf(“Elements of Array:\n”);
for(i=0;i<3;i++)
{
for(j=0;j<4;j++)
{
printf(“%d \t”, arr[i][j]);
}
printf(“\n”);
}
return 0;
}

~
“2d_array.c” 28L, 357C                                                                                 6,2-9         All

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>