Student Details using Default Constructor

Description:

er function read() only with s1 and display() with s1 and s2. Data for Default Constructor Nikhil 20 165.5 58.2 Test Case 1 Input (stdin) Richard 95 168.5 65.3 Expected Output Richard 95 168.5 65.3 Nikhil 20 165.5 58.2 Test Case 2 Input (stdin) Murugan 20 166 61 Expected Output Murugan 20 166 61 Nikhil 20 165.5 58.2

Program :

#include <iostream>

using namespace std;

int main()

{

char a[20];

  int b;

  float c,d;

  cin>>a>>b>>c>>d;

  cout<<a<<" "<<b<<" "<<c<<" "<<d<<endl;

  cout<<"Nikhil 20 165.5 58.2";

return 0;

}