structure that describe a hotel with name, address,rooms
and number of rooms
Answers were Sorted based on User's Feedback
Answer / sourisengupta
struct Hotel
{
char name[30];
char address[50];
int rooms;
int roomCount;
};
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sumithra.a
struct hotel
{
Name,
Address,
Rooms,
RoomCount
};
Is This Answer Correct ? | 4 Yes | 4 No |
What happens when a function throws an exception that was not specified by an exception specification for this function?
Why namespace is used in c++?
How many bit combinations are there in a byte?
What is flush c++?
How do you show the declaration of a virtual constructor?
What is the fastest c++ compiler?
In a class only declaration of the function is there but defintion is not there then what is that function?
class Alpha { public: char data[10000]; Alpha(); ~Alpha(); }; class Beta { public: Beta() { n = 0; } void FillData(Alpha a); private: int n; }; How do you make the above sample code more efficient? a) If possible, make the constructor for Beta private to reduce the overhead of public constructors. b) Change the return type in FillData to int to negate the implicit return conversion from "int" to "void". c) Make the destructor for Alpha virtual. d) Make the constructor for Alpha virtual. e) Pass a const reference to Alpha in FillData
How do you flush std cout?
What is a string example?
How is computer programming useful in real life?
What is a pointer with example?