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 |
Can we change the value of static variable in c?
What are preprocessor directives in c?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What is the difference between declaring a variable and defining a variable?
How are strings stored in c?
write a C code to reverse a string using a recursive function, without swapping or using an extra memory.
9 Answers Motorola, TCS, Wipro,
What will be your course of action for a push operation?
What are the two forms of #include directive?
How many keywords (reserve words) are in c?
What is s or c?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
What is variable in c example?