What is the difference between class and structure?

Answer Posted / konankiswetha

class is a slow access because of heap memory. But struct
is a faster in access because of stack memory.



values are initialize at the time of declaration in class
but not in struct.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is react oop?

616


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

1645


to find out the minimum of two integer number of two different classes using friend function

1645


Advantage and disadvantage of routing in telecom sector

790


What is coupling in oops?

600






Why do we use encapsulation in oops?

529


What does and I oop mean in text?

627


c++ program to swap the objects of two different classes

1767


What is difference between abstraction and encapsulation?

594


What is difference between pop and oop?

611


What is the fundamental idea of oop?

641


Can we create object of interface?

611


given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

2150


What is encapsulation example?

553


What are the three parts of a simple empty class?

1462