How can a struct in c++ differs from a struct in c?
Answer / Shivam Sundaram
In C++, structs have public member access by default, whereas in C, they have private access. Additionally, C++ allows for inheritance and operator overloading with structures.
| Is This Answer Correct ? | 0 Yes | 0 No |
Please explain the reference variable in c++?
What is the type of 'this' pointer?
Explain some examples of operator overloading?
Can we change the basic meaning of an operator in c++?
Do class method definitions?
Differentiate between late binding and early binding. What are the advantages of early binding?
Why are pointers used?
Evaluate: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); a) 10 b) 11 c) 1
Where can I run c++ program?
How can we read/write Structures from/to data files?
Write a c++ code that will calculate the roots of a quadratic equation a2+ bx+c=0 Hint: d = sqrt (b2-4ac), and the roots are: x1 = (€“b + d)/2a and x2 = (€“b €“ d)/2a (use sqrt function from cmath.h )?
Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?