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 |
which is the best site or book for learning C...and i need the content for C..how to get the good programming skills....? can plz suggest me....
what is the purpose of the code, and is there any problem with it. bool f( uint n ) { return (n & (n-1)) == 0; }
suppose there are five integers write a program to find larger among them without using if- else
How do I send escape sequences to control a terminal or other device?
Define VARIABLE?
Give basis knowledge of web designing ...
What is the difference between array and pointer in c?
Write a C program that defines a 2-dimentional integer array called A [50][50]. Then the elements of this array should randomly be initialized either to 1 or 0. The program should then print out all the elements in the diagonal (i.e. a[0][0], a[1][1],a[2][2], a[3][3], ……..a[49][49]). Finally, print out how many zeros and ones in the diagonal.
Why doesn't C have nested functions?
write a C program to print the program itself ?!
find largest element in array w/o using sorting techniques.
What is difference between structure and union in c programming?