what is the difference between class and structure in C++?
Answer Posted / balaram singh
1->CLASS IS THE ADT WHERE AS STRUCTURE IS UDT
2->CLASS NEEDS ACCESS SPECIFIER SUCH AS PRIVATE,PUBLIC &
PRIVATE WHERE AS STRUCTURE MEMBERS CAN BE ACCESSED BY
PUBLIC BY DEFAULT & DO'NT NEED ANY ACCESIFIERS.
3->CLAAS IS OOPS WHERE STRUCTURE IS BORROWED FROM
TRADITIONAL STRUCTURED(POP) CONCEPT
Is This Answer Correct ? | 13 Yes | 4 No |
Post New Answer View All Answers
What is polymorphism and types?
What is abstraction in oops?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
What is the point of oop?
How to hide the base class functionality in Inheritance?
IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?
hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.
What is inheritance in simple words?
What is polymorphism what is it for and how is it used?
Why is oop better than procedural?
What is encapsulation c#?
What is the difference between inheritance and polymorphism?