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
Differentiate between a constructor and a method in C++.
Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h
Define pre-condition and post-condition to a member function in c++?
Is c++ the hardest programming language?
Is java made in c++?
Explain public, protected, private in c++?
What are static type checking?
What is a wchar_t in c++?
What do you mean by translation unit in c++?
Is C++ case sensitive a) False b) Depends on implementation c) True
Explain about templates of C++.
Write a program to add three numbers in C++ utilizing classes.
Name the debugging methods that are used to solve problems?
What are the various storage classes in C++?
What is the full form of dos?