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 |
write a program for odd numbers?
Explain how do you print an address?
How can I write a function that takes a format string and a variable number of arguments?
How can you tell whether a program was compiled using c versus c++?
What are the different flags in C? And how they are useful? And give example for each in different consequences?
What are the benefits of organizational structure?
Write a routine that prints out a 2-D array in spiral order!
Do you know what are the properties of union in c?
What are external variables in c?
What is the scope of local variable in c?
In which mode we open the file for read,write and append also in c ? a)W b)w+ c)r+ d)a
How pointer is benefit for design a data structure algorithm?