#include <iostream> using namespace std; struct student { char name[50]; int roll; float marks; } s[6]; int main() { cout << "Enter information of students: " << endl; for(int i = 0; i < 6; ++i) { s[i].roll = i+1; cout << "Roll number " << s[i].roll << ":" << endl; cout << "Enter name:... Continue Reading →
Sorting in Lexicographical Order
#include <iostream> using namespace std; int main() { string str[10], temp; cout << "Enter words (<=10): " << endl; for(int i = 0; i < 10; ++i) { getline(cin, str[i]); } for (int i = 0; i < 9; ++i) { for (int j = 0; j < 9 - i; ++j) { if (str[j]... Continue Reading →