Tuesday, September 6, 2011

wipro old papers

7. What is this- "int f(int x);" ?a) Declaration
b) Definition
c) I don't know


8. Can namespaces be nested?
a) Yes
b) No
c) Depends
d) I don't know


9. May destructors have arguments?a) Yes
b) No
c) I don't know
13. Can unions have constructors and destructors?a) Yes
b) No
c) I don't know


14. Can unions have virtual functions?
a) Yes
b) No
c) I don't know


15. Can the anonymous unions have private and protected members?a) Yes
b) No
c) I don't know 
16. Can the anonymous unions have function members?a) Yes
b) No
c) I don't know


17. Can a bit-field be a static member?a) Yes
b) No
c) I don't know


18. Can classes be nested?a) Yes
b) No
c) Depends
e) I don't know
19. Can a friend template be defined within a class?a) Yes
b) No
c) I don't know


20. What a function cannot return?
a) Reference
b) Array
c) Pointer
d) None of them
e) All of them
f) I don't know


21. Is it possible to get the address of a constructor?a) Yes
b) No
c) Depends
e) I don't know 
22. If we have class A with variable Name in it and write: "A *obj", how do you invoke the Name variable?a) A.Name
b) A->Name
c) obj.Name
d) obj->Name
e) All of these will work
f) None of these will work
g) a and b will work
h) c and d will work
i) I don't know


23. Can you overload the constructor?a) Yes
b) No
c) I don't know


24. Where can you overload the "=" operator?a) It can't be overloaded
b) In a friend function
c) In an operator-member function
d) Both b and c are true
e) I don't know
25. What type is the [] operator, when talking about overloading it?a) Unary
b) Binary
c) Not-defined
d) I don't know


26. Which of these has the lowest precedence priority?
a) &
b) ^
c) |
d) &&
e) ||
f) ?:
g) <<
h) >>
i) I don't know


27. What will be the result of 100/10*2?a) 5
b) 20
c) Other
d) I don't know 
28. What will be the results of 1000/100%7*2?a) 6
b) 1000
c) 250
d) 10
e) Other
f) I don't know


29. What will this do: for(;;)?a) Loop forever
b) Crash the OS
c) Illegal
d) Ignored by the compiler
e) I don't know


30. Which of the following is evaluated first?a) &&
b) !
c) ||
d) I don't know

No comments:

Post a Comment