Difference between Class and Struct.
Answers were Sorted based on User's Feedback
Answer / ravish
Structure is a value type variable, but a class is a
reference type variable.
We can create an object of a class but not for a structure.
Structures does not have function definition but a class has..
Is This Answer Correct ? | 6 Yes | 7 No |
Answer / farhat khan
In C struct does not use function(method).
Is This Answer Correct ? | 6 Yes | 10 No |
Answer / naksh @tcs
The major difference between struct and class is :
Struct donot contain functions(methods) as its members.
Yes, by default members of struct are public and that of a
class are private.
Is This Answer Correct ? | 33 Yes | 79 No |
What are the valid places to have keyword “break”?
i want to know aptitude questions,technical questions
The program to allow the characters from the input received and send this function to a function check if the characters between letters a to z is a function of y joins as the characters main and output to otherwise return to the original function of the y characters
how can i get the string which is having two spaces at the end.suppose the string is "Hello World ".Now at the end i have two spaces.i need to print with that spaces .
What is the difference between mpi and openmp?
What is %d used for?
If the static variable is declared as global, will it be same as extern?
ratio,age,persentage
What happens if you free a pointer twice?
What is malloc return c?
c pgm count no of lines , blanks, tabs in a para(File concept)
What is a newline escape sequence?