What are the differences between a struct and a class in
C++?
Answer Posted / ajit
In structures by default the member variables considered as
public where as in classes by default data members are
considered as private.
Structures doesn't provide the concept data encapsulation
but classes provides it.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Can create new c++ operators?
Is sorted c++?
What is the difference between the indirection operator and the address of oper-ator?
Define anonymous class.
Show the declaration for a pointer to function returning long and taking an integer parameter.
What are c++ templates used for?
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;
When you overload member functions, in what ways must they differ?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300
What is struct c++?
To what does “event-driven” refer?
What relational operators if statements in c++?
Is c++ a pure oop language?
What does scope resolution operator do?
In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?