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 |
How to add two numbers without using arithmetic operators?
18 Answers College School Exams Tests, e track, Infosys, Pan Parag, Sapient, TCS,
Which node is more powerful and can handle local information processing or graphics processing?
What are header files and what are its uses in C programming?
What are the different types of linkage exist in c?
code for bubble sort?
int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); return 0; } can anyone please explain me output????
Diff: between this 2 classes in terms of memory class A { int i; char c; double d; }; class A { double d; int i; char c; }; How it is calculating?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
0 Answers Aegis, CDAC, Infosys,
what is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means....
write a C code to reverse a string using a recursive function, without swapping or using an extra memory.
9 Answers Motorola, TCS, Wipro,
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
DIFFERNCE BETWEEN THE C++ AND C LANGUAGE?