What is the difference b/w Structure & Class?
Answers were Sorted based on User's Feedback
Answer / srilatha
1.structure contains only data members.
class contains data members and member functions.
2.in structures we can use keyword struct.
in classes we can use keyword class.
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / mohan chaudhari
1.In structure there is no data encapsulation.
but in class, there is data encapsulation.
2.Data member in structure are not private .
In class they are private.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / alekhya
1.in structure we have only data members where as
in class we have members and member functions
2.in class we declare members with access specifiers like
private,public...
in structs we dont have any access specifiers all the
members of structure are pubic
| Is This Answer Correct ? | 1 Yes | 0 No |
Explain output of printf("Hello World"-'A'+'B'); ?
WHAT IS C?
Explain function pointer with exapmles.
what is function pointer?
How do you search data in a data file using random access method?
What is the real difference between arrays and pointers?
27 Answers Hexaware, Logic Pro, TCS,
Why is sizeof () an operator and not a function?
Why enum is used in c?
What is an lvalue?
code for concatination of 2 strings with out using library functions?
disadvantages of realloc ?
yogesh patil in dell