Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Define a structure of student class:
Write a program to define a structure of student record in C.
class student
{
char name[20];
int roll_no;
int marks[2];
float average;
public:
void input();
void output();
float calci();
friend void rank(student ,student );
};
void student:: input()
cout << "enter the name ,rollno,marks of 2 subjects\n";
cin>> name >> roll_no >>marks[0]>>marks[1];
}
void student :: output()
cout< } float student :: calci() { return average= float(marks[0]+ marks[1]) / 2; } void rank(student a, student b) { if ( a.calci() > b.calci() ) cout << "the student e1 is best\n"; else cout <<"the studentr e2 is best\n"; } void main() { clrscr(); student t[2]; t[0].input(); // t[0].calci(); // t[0].output(); t[1].input(); // t[0].calci(); //t[1].output(); rank(t[0],t[1]); getch(); }
float student :: calci()
return average= float(marks[0]+ marks[1]) / 2;
void rank(student a, student b)
if ( a.calci() > b.calci() )
cout << "the student e1 is best\n";
else
cout <<"the studentr e2 is best\n";
void main()
clrscr();
student t[2];
t[0].input();
// t[0].calci();
// t[0].output();
t[1].input();
//t[1].output();
rank(t[0],t[1]);
getch();
Operator Overloading Fundamentals The C language uses the concept of Operator Overloading discreetly. The asterisk (*) is used as multiplication operator as well as indirect
Just need the answers to the following 3 questions. "NO NEED to write a program compile or run it, do not need it. Just need the answers for the following questions. Example quest
find the area of a curve y=f(x) between x=a and x=b integrate f(x) between limits a and b #include float start_point, /* GLOBAL VARIABLES */
to design a car that travels along the room and gives the length of the room
Use the above problem and have the program print the biggest and smallest sales for each employee for everyday of the month. Program should also find the largest and
#include #include #include #include #include class Employee { private: char *Name; //Set them as pointers... int IdNumber; char *Department; char *Position; public: voi
Simple program of c++: int main() { int bushels; float dollars, rate; cout cin >> dollars; cout
Constructor and Destructor function with derived classes If there are constructors included in the base class and the derived class, the compiler automatically calls both of th
Described virtual destructor?
Explain procedural logic A procedure, or function, was explained as a set of specific instructions implemented in sequential manner. The data is kept separate from the procedur
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd