Difference between Structure and Class in C++?
Answers were Sorted based on User's Feedback
Answer / ashish raghuvanshi
Basically in C++ structure and class are same but with some
minor diffrences listed below:-
1. In classes all the members by default are private but in
structure members are public by default.
2. There is no term like constructor and destructor for
structs, but for class compiler creates default if you
don't provide.
| Is This Answer Correct ? | 79 Yes | 14 No |
Answer / madhusudhan
1. In classes all the members by default are private but in
structure members are public by default.
2. There is no term like constructor and destructor for
structs, but for class compiler creates default if you
don't provide.
3. Sizeof empty structure is 0 Bytes wer as Sizeof empty
class is 1 Byte
| Is This Answer Correct ? | 24 Yes | 20 No |
Answer / ammukutty
give the clear full difference between structure and class
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / alok
no. we can use the concept of constructor and destruct in c++ structure. one difference is that in c structure and c++ class is structure automatically initialization with zero.
| Is This Answer Correct ? | 2 Yes | 8 No |
Write a program in C++ returning starting locations of a substring using pointers
what is electronic software
Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A.Explain how a pointer to function can be declared in C++? B.List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header (“Include”) Files.
0 Answers GE, Infosys, Microsoft, NIM,
write a program that will accept a number and print.its equivalent in words the maximum input number is 9999
Explain how to insert a hyperlink in to an Excel worksheet and save a Word document as a Web page.
Explain when u will use Observer pattern and how u will implement in c++ .
What is a standard template library (stl)? What are the various types of stl containers?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
What is Object Oriental Progam
Define stl.
how to use C++?
write a program to demonstrate,how constructor and deconstructor work under multilevel inheritance