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();
(c) A static member function can access static member data only, static member functions and functions and data outside the class. A static member function may be called, even whil
Explain history of clanguage
Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4
Write a c++ program to find the sum of 0.123 ? 103 and 0.456 ? 102 and write the result in three significant digits.
write aprogram for random -search to implement if a[i]=x;then terminate other wise continue the search by picking new randon inex into a
write c++ program to decode the given code. in mobile keypad the integers from 1 to 9 will display the characters from a to z and 0 will assign a space
# c pragram TO count the number of occurances of the string in nth padovan''s string program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : pa
how to write a program using arrays
What is the difference between an external iterator and an internal iterator? Ans) An internal iterator is executed with member functions of the class that has items to step th
A: In C, encapsulation was completed by making things static in a compilation unit or module. It prevented another module from accessing the static stuff. (Incidentally, now static
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