Question.1
Two developers write the following code snippets to achieve the same objective:
Code 1
struct S { int x; };
// ... inside main() ...
S s;
s.x = 10;Code 2
class C { int x; };
// ... inside main() ...
C c;
c.x = 10;Which of these implementations will compile successfully?