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

Show the declaration for a static function pointer.

1048


What are iterators in c++?

1014


what is data encapsulation in C++?

1069


When do we run a shell in the unix system? How will you tell which shell you are running?

982


What are the operators in c++?

1117


Explain how the virtual base class is different from the conventional base classes of the opps.

1170


Why is null pointer used?

1171


What is scope resolution operator in c++ with example?

1037


Is c++ the most powerful language?

1085


Explain the different access specifiers for the class member in c++.

998


Which software is used to run c++ program?

1002


Can you explicitly call a destructor on a local variable?

1028


How do you write a function that can reverse a linked-list?

1110


Is it possible to pass an object of the same class in place of object reference to the copy constructor?

1046


What are the two types of comments?

997