What is the difference between Class and Structure?
Answer Posted / bitdeveloper
<a
href="http://questionscompiled.com/answer.jsp?technology=cpp&qid=141">questionscompiled.com</a>
Classes and Structures in C++ are same except class defaults
to private and structures to public. They can have data
members, member function, this pointer, static member functions.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
What is the syntax for a for loop?
Does improper inheritance have a potential to wreck a project?
Can the creation of operator** is allowed to perform the to-the-power-of operations?
What is the history of c++?
How would you use qsort() function to sort an array of structures?
What are the various access specifiers in c++?
Describe the advantages of operator overloading?
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
Is rust better than c++?
Write a program which uses functions like strcmp(), strcpy()? etc
Where must the declaration of a friend function appear?
If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?
Explain one-definition rule (odr).
Explain deep copy and a shallow copy?