-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractical1.cpp
More file actions
57 lines (49 loc) · 1.08 KB
/
practical1.cpp
File metadata and controls
57 lines (49 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include<iostream>
#include<string.h>
using namespace std ;
class student ;
class person{
char name[20],dob[20],bg[20],contact[20],phone[20],lincense[20];
public :
person(){
strcpy(name,"dhanshree");
strcpy(dob,"dd/mm/yyyy");
strcpy(bg,"O+ve");
strcpy(contact,"5676886686");
strcpy(phone,"3455");
strcpy(lincense,"3436375");
}
friend student ;
};
class student{
int rollno ;
char div[10];
public :
student(){
}
student(person *p){
cout<<"Enter Details of student"<<endl;
cout<<"Name\tRoll No\tDOB\tBloodGroup\tDiv\tContact\tPhone\tLincense"<<endl;
cin>>p->name;
// cout<<"\t";
cin>>rollno ;
// cout<<"\t";
cin>>p->dob;
// cout<<"\t";
cin>>p->bg;
// cout<<"\t";
cin>>div;
// cout<<"\t";
cin>>p->contact;
// cout<<"\t";
cin>>p->phone;
// cout<<"\t";
cin>>p->lincense;
}
// void getdata(){
// }
};
int main(){
person d ;
student s(&d) ;
}