Pages

Sunday 9 June 2013

C & C++ Interview Questions


  1. Define Storage Classes and explain application domain.
  2. Define the Storage Qualifiers.
  3. Give an example for a variable "const" and "volatile". Is it possible.
  4. Detect if a linked list is circular.
  5. Have you any remarks.
  6. Define a "dangling" pointer.
  7. Any difference between "const int*ptr" and int *const ptr".
  8. What is the declaration and definition of a variable.
  9. Give a solution for a stack overflow situation.
  10. Give 4 examples for an infinite loop.
  11. Define Encapsulation.
  12. Define Inheritance.
  13. Define Polimorfism.
  14. Define Constructor, Default Constructor and Copy Constructor.
  15. Define the differences between malloc/free and new/delete.
  16. Define the standard prototypes for main() function.
  17. What is destroyed in the following code.
  18. What is a virtual function.
  19. What is an inline function.
  20. Explain the public, private and protected access specifies.
  21. What is C++.
  22. How do you find out if a linked-list has an end.
  23. What is the difference between realloc() and free().
  24. What is function overloading and operator overloading.
  25. What is the difference between declaration and definition.
  26. What are the advantages of inheritance.
  27. How do you write a function that can reverse a linked-list.
  28. What do you mean by inline function.
  29. Write a program that ask for user input from 5 to 9 then calculate the average.
  30. Write a short code using C++ to print out all odd number from 1 to 100 using a for loop.
  31. What is public, protected, private.
  32. Tell how to check whether a linked list is circular.
  33. What is virtual constructors/destructors.
  34. What are the advantages of inheritance.
  35. What is the difference between an ARRAY and a LIST.
  36. Does c++ support multilevel and multiple inheritance.
  37. What is a template.
  38. Define a constructor - What it is and how it might be called.
  39. You have two pairs: new() and delete() and another pair : alloc() and free(). 
  40. Explain differences between eg. new() and malloc().
  41. What is the difference between class and structure.
  42. What is RTTI.
  43. What is encapsulation.
  44. What is an object.
  45. How can you tell what shell you are running on UNIX system.
  46. What do you mean by inheritance.
  47. Describe PRIVATE, PROTECTED and PUBLIC – the differences and give examples.
  48. What is namespace.
  49. What is a COPY CONSTRUCTOR and when is it called.
  50. What is Boyce Codd Normal form.
  51. What is virtual class and friend class.
  52. What is the word you will use when defining a function in base class to allow this function to be a polimorphic function.
  53. What are 2 ways of exporting a function from a DLL.
  54. What is the difference between an object and a class.
  55. Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array.
  56. What is abstraction.
  57. What are virtual functions.
  58. What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator.
  59. What is a scope resolution operator.
  60. What do you mean by pure virtual functions.
  61. What is polymorphism? Explain with an example.
  62. What’s the output of the following program? Why.
  63. Why are arrays usually processed with for loop.
  64. What is an HTML tag.
  65. You’re given a simple code for the class Bank Customer. Write the following functions.
  66. What does extern mean in a function declaration.
  67. What can I safely assume about the initial values of variables which are not explicitly initialized.
  68. What’s the auto keyword good for.
  69. What is the difference between char a[] = “string”; and char *p = “string”;.
  70. How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters.
  71. What does extern mean in a function declaration.
  72. What is the difference between Mutex and Binary semaphore.
  73. In C++, what is the difference between method overloading and method overriding.
  74. What methods can be overridden in Java.
  75. What are the defining traits of an object-oriented language.
  76. What is the diffrence between a "assignment operator" and a "copy constructor".
  77. RTTI - What is RTTI.
  78. STL Containers - What are the types of STL containers.
  79. What is the need for a Virtual Destructor.
  80. What is "mutable".
  81. What is an Iterator class.
  82. What is an incomplete type.
  83. What is a dangling pointer.
  84. What do you mean by Stack unwinding.
  85. Define precondition and post-condition to a member function.
  86. What are the conditions that have to be met for a condition to be an invariant of the class.
  87. What are proxy objects.
  88. What is a node class.
  89. What is a container class? What are the types of container classes.
  90. How do you write a function that can reverse a linked-list.
  91. What is polymorphism.
  92. How can you tell what shell you are running on UNIX system.
  93. What is Boyce Codd Normal form.
  94. What is pure virtual function.
  95. What’s the meaning of ARP in TCP/IP.
  96. What is a Makefile.
  97. What is deadlock.
  98. What is semaphore.

No comments:

Post a Comment