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();
Goal: Design a program that computes square matrix multiplication on GPU using CUDA. Write the code in C. In particular, your implementation should obey the following requiremen
Explain high-order and low-order bytes. - Numbers are written from left to right in decreasing order of significance. In the same way, bits in a byte of computer memory can be
develop a C program for Linux called pipes.c that does the following: In the main() function, it creates a pipe using the pipe() function, then creates two child processes with
#questio A charitable organization wants to design a special ATM machine to be used by needy people. The association supplies the needy person with a pin number to be able to use
Explain Operator Overloading It is one type of Polymorphism, an significant feature of object-oriented programming .Polymorphism means one thing having many forms, i.e. here an
how we write decision tables, flowcharts,pseudocode,and algorithm in result management system
padovan string program 1 : package test.padovanstring; public class PadovanString { public int stringOccurrences(int n, String str){ if(n >= 40) return -
Multiple Inheritance Multiple inheritance , as the name suggests , is deriving a class from more than one class . The derived class inherits all the properties of all its base c
Task Your task is to write a program, words, that reports information about the number of words read from its standard input. For example, if the file qbf.txtcontains the text th
How can one handle a constructor that fails?
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