What is the difference between a class and a structure in C++?



What is the difference between a class and a structure in C++?..

Answer / nashiinformaticssolutions

With the exception of member variables and methods' default accessibility setting, class and structure (or struct) are essentially the same in C++. They are configured as public in a structure and private in a class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Mention the ways in which parameterized can be invoked.

0 Answers  


Is c++ primer good for beginners?

0 Answers  


What is the most useful programming language?

0 Answers  


What are the five types of inheritance in C++?

1 Answers  


What is a binary file? List the merits and demerits of the binary file usagein C++.

0 Answers  


How can you find the nodes with repetetive data in a linked list?

1 Answers   Lucent,


i want to know how to copy arrary without using any method or function. I have tried the below using System; class e4 { static void Main(string[] args) { int a,b; int[ ] m= new int[5]; int[ ] n= new int[5]; for(a=0;a<=4;a++) { Console.WriteLine("enter any value"); m[a]=Convert.ToInt32(Console.ReadLine()); m[a]=n[a]; } for(b=0;b<=4;b++) { Console.WriteLine(n[b]); } } } but it will give wrong result can anyone solve this problem

1 Answers   Reliance,


What is the topic of the C++ FAQ list?

1 Answers  


What are the various compound assignment operators in c++?

0 Answers  


the first character in the variable name must be an a) special symbol b) number c) alphabet

0 Answers  


Can a program run without main in c++?

0 Answers  


What is the use of c++ programming language in real life?

0 Answers  


Categories