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
Show the declaration for a static function pointer.
What are iterators in c++?
what is data encapsulation in C++?
When do we run a shell in the unix system? How will you tell which shell you are running?
What are the operators in c++?
Explain how the virtual base class is different from the conventional base classes of the opps.
Why is null pointer used?
What is scope resolution operator in c++ with example?
Is c++ the most powerful language?
Explain the different access specifiers for the class member in c++.
Which software is used to run c++ program?
Can you explicitly call a destructor on a local variable?
How do you write a function that can reverse a linked-list?
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
What are the two types of comments?