Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Is structure can be inherited?

Answer Posted / priya

yes it can be in C++:

#include <iostream>
using namespace std;


struct person
{
private:
char name[20];
int age;
public:
float calsalary();
};
struct emp:public person
{
int empid;
private:
float salary;
float bonus;

};

Is This Answer Correct ?    17 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do pointers work?

1250


How do you compile the source code with your compiler?

1103


What is virtual destructor ans explain its use?

1170


Can malloc be used in c++?

1130


You want to link a c++ program to c functions. How would you do it?

1039


How many static variables are created if you put one static member into a template class definition?

1086


What is using namespace std in cpp?

1246


How is c++ used in the real world?

1089


Explain the difference between overloading and overriding?

1197


Define linked lists with the help of an example.

1078


What are the basic data types used in c++?

1076


What do you mean by public protected and private in c++?

1113


What is c++ library?

1092


When does a 'this' pointer get created?

1150


What is lambda expression c++?

1120