what are the differences b/w structure and class?
Answer Posted / sai laxman
class ex:-
class classname
{
int a;
float b;
}
struct {
int a;
int b;
}struct name;
In the struct all members are by default public,
in the class we can deference it private,public,protected.
While Inheriting from the structure all the members are
public by default but in class it depends upon the data
access modifiers.
| Is This Answer Correct ? | 7 Yes | 6 No |
Post New Answer View All Answers
What is thread.sleep()?
Is it possible to nest cfml conditional tags?
Where is the main method in c#?
Is as operator in c#?
How do I register my code for use by classic com clients?
What is thread and explain states of a thread in c#?
How to generate strong name key file or which command is used to generated strong name key file?
Why to use “finally” block in c#?
What is the difference between method and function in c#?
Define c# i/o classes?
Can we maintain state in webservice?
Can an int be negative c#?
What is difference between continue and break in c#?
Can a class have multiple constructors c#?
What is array class in c#?