Saved Bookmarks
| 1. |
“Structure is a user defined data type”. Justify this statement with the help of an example. |
|
Answer» Yes it is true. A user can give define according to his needs. #include<iostream> using namespace std; struct date { int dd,mm,yyyy; date*ptr; }; int main() { date *ptr; ptr = new date; ptr->dd=28 ptr->mm=6; ptr->yyyy=1983; cout<<"Your date of Birth is"<<ptr<<"/"<<ptr->mm<<"/"<<ptr->yyyy; delete ptr; } |
|