google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.: C program in data structure for storage representation of 2-D array

Monday, April 6, 2015

C program in data structure for storage representation of 2-D array

#include<stdio.h>
#include<conio.h>
void main()
{
 int a[10][10],i,j,r,c;
 clrscr();
 printf("\n Enter row and column number:-");
 scanf("%d%d",&r,&c);
 printf("\n Enter %d*%d matrix:-",r,c);
 for(i=0;i<r;i++)
 {
  for(j=0;j<c;j++)
  {
   scanf("%d",&a[i][j]);
  }
 }
 printf("\n storage representation of 2-D array:-");
 for(i=0;i<r;i++)
 {
  for(j=0;j<c;j++)
  {
   printf("\n[%d][%d]= %d",i,j,a[i][j]);
  }
  printf("\n");
 }
 getch();
}



/* OUTPUT
 Enter row and column number:-3 3                                              
                                                                               
 Enter 3*3 matrix:-1 2 3                                                      
                   4 5 6                                                      
                   7 8 9                                                      
                                                                               
 storage representation of 2-D array:-                                        
[0][0]= 1                                                                      
[0][1]= 2                                                                      
[0][2]= 3                                                                      
                                                                               
[1][0]= 4                                                                      
[1][1]= 5                                                                      
[1][2]= 6                                                                      
                                                                               
[2][0]= 7                                                                      
[2][1]= 8                                                                      
[2][2]= 9                                                                      
     */

रामायण

रामायण दशरथ की तीन पत्नियाँ – कौशल्या, सुमित्रा , कैकेयी दशरथ के चार पुत्र – राम,लक्ष्मण,भरत,शत्रुघ्न दशरथ: राम के पिता और कौशल के राजा कौशल...