2D Array
2D Array
#include<stdio.h>
#include<string.h>
struct Book {
char BookID[15];
char title[25];
int no_of_copies;
int number_of_readers;
};
printf("\n");
}
printf("\n");
printf("\n");
}
#include<stdio.h>
#include<string.h>
struct Employee {
char EmployeeID[15];
char name[25];
int experience;
float salary;
};
printf("\n");
for(i=0; i<3; ++i){
printf("Enter the %d employee ID: %s", i+1, Employee[1][i].EmployeeID); printf("\n");
else{
continue;
}
return 0;
}
03.
#include<stdio.h>
struct Product {
char ProductID[15];
char name[25];
float unitPrice;
int qty;
};
printf("\n");
for(i=0; i<3; ++i){
printf("Enter the %d Product ID: %s", i+1, Product[1][i].ProductID); printf("\n");
return 0;
}
04.
#include<stdio.h>
int rainfall[3][4];
int x, y, maxRainfall[4] = {0};
printf("\n");
return 0;
}
05.
#include<stdio.h>
int boxes[4][3];
int x, y, volume[4] = {0};
printf("\n");
}
printf("\n");
printf("\n");
for (x=0; x<4; ++x ){
printf("%d Box volume: %d", x+1, volume[x]);
printf("\n");
}
return 0;
}
06.
#include<stdio.h>
float temp[2][3];
int x, y;
float avgTemp[2] = {0};
printf("\n");
printf("\n");
return 0;
}
07.
#include<stdio.h>
float size[3][5];
int x, y;
float avgSize[3] = {0};
printf("\n");
printf("\n");
return 0;
}
08.
#include<stdio.h>
int marks[2][5];
int x, y;
float finalMark[5] = {0};
printf("\n");
return 0;
}