C AND C++ TESTING (BASIC)
1. What's precedence? What's associativity?
2. What's lvalue? What's rvalue? Why (x=y)=z is illegal in C?
3. What's signature of function? What's difference of signatures
in C and C++?
4. What's overloading of function? What's mangling?
5. What are static variable and static function in C ?
What are their scopes?
6. What's difference between reference and pointer? Why reference
is needed in C++?
7. How to avoid multiple definition error in compiling time?
in linking time?
8. What's memory leak?
9. What's friend function? Why friend function is needed in C++?
10. When we need to use volatile?
11. Explain:
(1) for (x=0;x!=10;) {...}
(2) for (;x<10;) {...}
12. What's difference between a[++x] and a[x++] ?
13. Explain:
(1) *++p;
(2) ++*p;
14. Why X::X(X) is illegal in C++?
15. What's difference between malloc(), calloc(), free(),
new, and delete?
16. In the function with a variable number of arguments such as
f(first,...)..., what's meaning: va_start(args,first); ?
17. What's shallow copy? How to avoid the shallow copy?
18. What's order in which the class members are initialized?
19. Explain the meaning of const in the following:
(1) func1(const class1 & c1) {...}
(2) int func2(...) const;
(3) const String s("Hello");
20. What are public, private, and protected inheritances?
21. What are pure virtual functions and abstract classes?
What are virtual classes?
22. What's "canonical form" for class?
23. What's different between NULL, 0, '0', and '