சனி, 20 பிப்ரவரி, 2010

Top C++ interview questions

http://www.techinterviews.in/top-c-interview-questions-3/18

Top C++ interview questions

C January 30th, 2007

  1. What is virtual constructors/destructors?
  2. What is pure virtual functions?
  3. What is namespace?
  4. What is RTTI?
  5. What is a template?
  6. What is inline function?
  7. What is virtual class and friend class?
  8. What is function overloading and operator overloading?
  9. Difference between realloc() and free()?
  10. What is binding of data and functions?
  11. What is abstraction?
  12. What is encapsulation?
  13. What is the difference between an object and a class?
  14. What is polymorphism? Explain with an example?
  15. What is inheritance?
  16. What is a scope resolution operator?
  17. What are virtual functions?
  18. What is friend function?
  19. What is the difference between class and structure?
  20. What is public, protected, private?
  21. What is an object?
  22. What is a class?
  23. What is the difference between Function and Member function?
  24. What is a memory leak? How can we avoid it?
  25. Define copy constructor? What is the use of copy constructor?
  26. How do you write a program which produces its own source code as its output?
  27. Can you allocate the memory using malloc() in C and deallocate the same memory using free() in c++
  28. it possible to inherit the private member in drived class?
  29. What are the things contains in .obj file ? ( compiled result of .cpp file )
  30. What is difference between followin intialization. int iVar1; int iVar2 = int(); and which one of two should we prefer always and why?
  31. What is the use of volatile keyword? Give me one example?
  32. What is the difference between Object and Instance?
  33. What is function overriding?
  34. Can we take “main function” as of type float,char etc?
  35. Hey anybody help me to write code for this program wap which display year,month & day presents in a year for eg. 1. no. is 14 print 2 weeks 2. no is 90 print 3 months 3. no is 365 print 1 year user can input any no
  36. How is static variable stored in the memory? ( if there are 2 functions in a file,and the static variable name is same (ex var) in both the function. how is it keep seperately in the memory).
  37. What will be output of the following code #include using namespace std; class abc { public : void main() { cout<<" Its main function "< } }; int main(int c, char **v) { abc a; if(c<1)>
  38. What is the difference betwen wait() and delay()?
  39. Why always array starts with index 0
  40. Can main() be overridden
  41. What is the difference between macro and inline()?
  42. How can we define a dynamic memory allocation in UNIX operating system?
  43. What are auto static variables and auto extern variables?
  44. Different types of languages compare in c++ and other lanuages
  45. Oops concepts in other language oops
  46. How can double dimensional arrays be dynamically initialized in C++?
  47. Can destructor be private?
  48. Why Pointers are not used in C Language. What are the main differences between C and C++
  49. What is memory leaking in c++ ?
  50. class A() { }; int main() { A a; } Whether there will be a default contructor provided by the compiler in above case ?
  51. class A() { }; int main() { A a; } Whether there will be a default contructor provided by the compiler in above case ?
  52. What is operator overloading?what r the advantages of operator overloading?
  53. Why array index starts from 0[zero] only?
  54. What is the difference between c&c++?
  55. What is the use of virtual destructor?
  56. Why cant one make an object of abstract class?Give compiler view of statement
  57. What is the need /use of function overloading
  58. In c++ have a default constructor ?
  59. What is a “RTTI”?
  60. Have you heard of “mutable” keyword?
  61. What is “strstream”?
  62. What are inline functions?
  63. Can we generate a C++ source code from the binary file?
  64. Explain “passing by value”, “passing by pointer” and “passing by reference”
  65. How to write a program such that it will delete itself after execution?
  66. Difference between “vector” and “array”?
  67. What are the types of STL containers?
  68. Difference between a “assignment operator” and a “copy constructor”
  69. Can we have “Virtual Constructors”?
  70. What are the different types of Storage classes?
  71. What are Virtual Functions? How to implement virtual functions in “C”
  72. What are the different types of polymorphism?
  73. Explain the need for “Virtual Destructor”.
  74. What is the difference between “overloading” and “overriding”?
  75. Difference between “C structure” and “C++ structure”.
  76. What will happen if I say delete this
  77. What is the output of printf (”%d”)
  78. What is an algorithm (in terms of the STL/C++ standard library)?
  79. How can you force instantiation of a template?
  80. What is the difference between operator new and the new operator?
  81. Can you explain the term “resource acquisition is initialization?”
  82. What is defference between constructor and destructor
  83. What is encapsulation?
  84. What is the difference between an object and a class?
  85. What is inheritance?
  86. What is a scope resolution operator?
  87. What is the Basic nature of “cin” and “cout” and what concept or principle we are using on those two?
  88. What are virtual functions?
  89. We can overload assignment operator as a normal function.But we can not overload assignment operator as friend function why?
  90. What is the difference between class and structure?
  91. What is an object?
  92. What is the difference between structures and classes in C++?
  93. What is a class?
  94. What is polymorphism? Explain with an example?
  95. What is public, protected, private?
  96. What is friend function?
  97. What is binding of data and functions?
  98. Difference between realloc() and free()?
  99. What is function overloading and operator overloading?
  100. What is virtual class and friend class?

கருத்துகள் இல்லை:

கருத்துரையிடுக