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
What are the characteristics of friend functions?
What does h mean in maths?
What is a hash function c++?
Explain Memory Allocation in C/C++ ?
Write is a binary search tree? Write an algo and tell complexity?
Do you know what is overriding?
Is c++ a difficult language?
What is the full form of dos?
Can we use struct in c++?
Define 'std'.
What is a responder chain?
Which programming language should I learn first?
Explain what are accessor methods?
How does a copy constructor differs from an overloaded assignment operator?
Difference between delete and free.