How the keyword struct is different from the keyword class in c++?



How the keyword struct is different from the keyword class in c++?..

Answer / Alka Gautam

In C++, a struct (structure) and a class are similar, but there are some differences. By default, members of a struct are public and share external linkage, while members of a class are private and have no linkage. Additionally, a struct does not provide a constructor by default, while a class does.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Is java made in c++?

1 Answers  


What c++ is used for?

1 Answers  


What is an iterator?

1 Answers  


What is public, protected, private in c++?

1 Answers  


Tell me an example where stacks are useful?

1 Answers  


What is the difference between method and message?

5 Answers   HP,


What are files in c++?

1 Answers  


What is #include ctype h in c++?

1 Answers  


Specify different types of decision control statements?

1 Answers  


What is multithreading and what is its use?Whats are multithreading techniques used in C++?

1 Answers  


List the advantages of inheritance.

1 Answers  


Is c++ high level programming language?

1 Answers  


Categories