It2b1 Practice-5 Structures 18102023
It2b1 Practice-5 Structures 18102023
#include <iostream>
using namespace std;
//User-defined Datatype 'Student'
struct Student
{
// Data Members
int Stu_ID;
string Stu_Name, Stu_Contact, Stu_Address;
double Stu_Fee;
};
int main()
{
Student S1, S2; //Structure Variable
cout << "\n**************** INPUT-1 ******************" << endl;
cout << "\tEnter Student ID: "; cin >> S1.Stu_ID;
cout << "\tEnter Student Name: "; cin >> S1.Stu_Name;
cout << "\tEnter Student Contact: "; cin >> S1.Stu_Contact;
cout << "\tEnter Student Address: "; cin >> S1.Stu_Address;
cout << "\tEnter Student Fee: "; cin >> S1.Stu_Fee;
system("Pause");
return 0;
}
/*
cout << "\tSize of One Integer Variable: " << sizeof(int) << " Bytes." << endl;
cout << "\tSize of One Double Variable: " << sizeof(double) << " Bytes." <<
endl;
cout << "\tSize of One String Variable: " << sizeof(string) << " Bytes." <<
endl;
cout << "\tSize of One Structure Variable: " << sizeof(S1) << " Bytes." <<
endl;
cout << "\tSize of One Structure Variable: " << sizeof(Student) << " Bytes." <<
endl;
*/