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 of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
1)what is the error in the following stmt where str is a char array and the stmt is supposed to traverse through the whole character string str? for(i=0;str[i];i++) a)There is no error. b)There shud be no ; after the stmt. c)The cond shud be str[i]!='\0' d)The cond shud be str[i]!=NULL e)i shud be initialized to 1
What are the advantages of the functions?
In which header file is the null macro defined?
What is chain pointer in c?
Explain what does the format %10.2 mean when included in a printf statement?
what will be the out put. #include<stdio.h> void main() { printf("Output:"); printf(1+"vikashpatel"); }//output: ikashpatel
what are bit fields? What is the use of bit fields in a structure declaration?
0 Answers Flextronics, TISL, Virtusa,
What is the use of header?
What is difference between union All statement and Union?
Explain how do you list a file’s date and time?
What do you mean by scope of a variable in c?