practical part 2
practical part 2
practical part 2
Assignment No.1
Problem Statement:- Consider a student database of SEIT class (at least 15 records). Database
contains different fields of every student like Roll No, Name and SGPA.(array of structure)
*/
#include <iostream>
#include <cstring>
struct student {
int roll_no;
char name[30];
float SGPA;
};
// ACCEPT FUNCTION
// DISPLAY FUNCTION
cout << "\n " << list[i].roll_no << " \t " << list[i].name << "\t " << list[i].SGPA;
int k, j, c = 0;
key = list[k];
j = k - 1;
list[j + 1] = list[j];
j--;
c++;
list[j + 1] = key;
int main() {
int ch;
do {
switch (ch) {
case 1:
insert_sort(data);
display(data);
break;
case 2:
break;
default:
return 0;
Output=
Enter Roll-Number, Name, SGPA:102 Aditya 7.8
Enter Roll-Number, Name, SGPA:105 Tejas 8.0
1) Inser on Sort
2) Exit
105 Tejas 8
1) Inser on Sort
2) Exit