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

Frequently Asked Questions - Object oriented Concepts

  1. How do you write a program which produces its own source code as its output?
  2. How can I find the day of the week given the date?
  3. Why doesn't C have nested functions?
  4. What is the most efficient way to count the number of bits which are set in a value?
  5. How can I convert integers to binary or hexadecimal?
  6. How can I call a function, given its name as a string?
  7. How do I access command-line arguments? How can I return multiple values from a function?
  8. How can I invoke another program from within a C program?
  9. * How can I access memory located at a certain address?
  10. * How can I allocate arrays or structures bigger than 64K?
  11. * How can I find out how much memory is available?
  12. * How can I read a directory in a C program?
  13. * How can I increase the allowable number of simultaneously open files?
  14. * What's wrong with the call "fopen("c:\newdir\file.dat", "r")"?
  15. * What is the output of printf("%d")
  16. * What will happen if I say delete this
  17. * Difference between "C structure" and "C++ structure".
  18. * Diffrence between a "assignment operator" and a "copy constructor"
  19. * What is the difference between "overloading" and "overridding"?
  20. * Explain the need for "Virtual Destructor".
  21. * Can we have "Virtual Constructors"?
  22. * What are the different types of polymorphism?
  23. * What are Virtual Functions? How to implement virtual functions in "C"
  24. * What are the different types of Storage classes?
  25. * What is Namespace?
  26. * What are the types of STL containers?.
  27. * Difference between "vector" and "array"?
  28. * How to write a program such that it will delete itself after exectution?
  29. * Can we generate a C++ source code from the binary file?
  30. * What are inline functions?
  31. * Talk sometiming about profiling?
  32. * How many lines of code you have written for a single program?
  33. * What is "strstream" ?
  34. * How to write Multithreaded applications using C++?
  35. * Explain "passing by value", "passing by pointer" and "passing by reference"
  36. * Write any small program that will compile in "C" but not in "C++"
  37. * Have you heard of "mutable" keyword?
  38. * What is a "RTTI"?
  39. * Is there something that I can do in C and not in C++?
  40. * Why preincrement operator is faster than postincrement?
  41. * What is the difference between "calloc" and "malloc"?
  42. * What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?
  43. * What is Memory Alignment?
  44. * Explain working of printf.
  45. * Difference between "printf" and "sprintf".
  46. * What is "map" in STL?
  47. * When shall I use Multiple Inheritance?
  48. * What are the techniques you use for debugging?
  49. * How to reduce a final size of executable?
  50. * Give 2 examples of a code optimization.
  51. * What is inheritance?
  52. * Difference between Composition and Aggregation.
  53. * Difference: Sequence Diagrams, Collaboration Diagrams.
  54. * Difference: 'uses', 'extends', 'includes'
  55. * What shall I go for Package Diagram?
  56. * What is Polymorphism?
  57. * Is class an Object? Is object a class?
  58. * Comment: C++ "includes" behavior and java "imports"
  59. * What do you mean by "Realization"?
  60. * What is a Presistent, Transient Object?
  61. * What is the use of Operator Overloading?
  62. * Does UML guarantee project success?
  63. * Difference: Activity Diagram and Sequence Diagram.
  64. * What is association?
  65. * How to resolve many to many relationship?
  66. * How do you represent static members and abstract classes in Class Diagram?
  67. * What does static variable mean?
  68. * What is a pointer?
  69. * What is a structure?
  70. * What are the differences between structures and arrays?
  71. * In header files whether functions are declared or defined?
  72. * What are the differences between malloc() and calloc()?
  73. * What are macros? what are its advantages and disadvantages?
  74. * Difference between pass by reference and pass by value?
  75. * What is static identifier?
  76. * Where are the auto variables stored?
  77. * Where does global, static, local, register variables, free memory and C Program instructions get stored?
  78. * Difference between arrays and linked list?
  79. * What are enumerations?
  80. * Describe about storage allocation and scope of global, extern, static, local and register variables?
  81. * What are register variables? What are the advantage of using register variables?
  82. * What is the use of typedef?
  83. * Can we specify variable field width in a scanf() format string? If possible how?
  84. * Out of fgets() and gets() which function is safe to use and why?
  85. * Difference between strdup and strcpy?
  86. * What is recursion?
  87. * Differentiate between a for loop and a while loop? What are it uses?
  88. * What are the different storage classes in C?
  89. * Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
  90. * What is difference between Structure and Unions?
  91. * What the advantages of using Unions?
  92. * What are the advantages of using pointers in a program?
  93. * What is the difference between Strings and Arrays?
  94. * In a header file whether functions are declared or defined?
  95. * What is a far pointer? where we use it?
  96. * How will you declare an array of three function pointers where each function receives two ints and returns a float?
  97. * what is a NULL Pointer? Whether it is same as an uninitialized pointer?
  98. * What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
  99. * What does the error 'Null Pointer Assignment' mean and what causes this error?
  100. * What is near, far and huge pointers? How many bytes are occupied by them?
  101. * How would you obtain segment and offset addresses from a far address of a memory location?
  102. * Are the expressions arr and &arr same for an array of integers?
  103. * Does mentioning the array name gives the base address in all the contexts?
  104. * Explain one method to process an entire string as one unit?
  105. * What is the similarity between a Structure, Union and enumeration?
  106. * Can a Structure contain a Pointer to itself?
  107. * How can we check whether the contents of two structure variables are same or not?
  108. * How are Structure passing and returning implemented by the complier?
  109. * How can we read/write Structures from/to data files?
  110. * What is the difference between an enumeration and a set of pre-processor # defines?
  111. * what do the 'c' and 'v' in argc and argv stand for?
  112. * Are the variables argc and argv are local to main?
  113. * What is the maximum combined length of command line arguments including the space between adjacent arguments?
  114. * If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?
  115. * Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
  116. * What are bit fields? What is the use of bit fields in a Structure declaration?
  117. * To which numbering system can the binary number 1101100100111100 be easily converted to?
  118. * Which bit wise operator is suitable for checking whether a particular bit is on or off?
  119. * Which bit wise operator is suitable for turning off a particular bit in a number?
  120. * Which bit wise operator is suitable for putting on a particular bit in a number?
  121. * Which bit wise operator is suitable for checking whether a particular bit is on or off?
  122. * which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?
  123. * Write a program to compare two strings without using the strcmp() function.
  124. * Write a program to concatenate two strings.
  125. * Write a program to interchange 2 variables without using the third one.
  126. * Write programs for String Reversal & Palindrome check
  127. * Write a program to find the Factorial of a number
  128. * Write a program to generate the Fibinocci Series
  129. * Write a program which employs Recursion
  130. * Write a program which uses Command Line Arguments
  131. * Write a program which uses functions like strcmp(), strcpy()? etc
  132. * What are the advantages of using typedef in a program?
  133. * How would you dynamically allocate a one-dimensional and two-dimensional array of integers?
  134. * How can you increase the size of a dynamically allocated array?
  135. * How can you increase the size of a statically allocated array?
  136. * When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
  137. * Which function should be used to free the memory allocated by calloc()?
  138. * How much maximum can you allocate in a single call to malloc()?
  139. * Can you dynamically allocate arrays in expanded memory?
  140. * What is object file? How can you access object file?
  141. * Which header file should you include if you are to develop a function which can accept variable number of arguments?
  142. * Can you write a function similar to printf()?
  143. * How can a called function determine the number of arguments that have been passed to it?
  144. * Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
  145. * How do you declare the following:
  146. * An array of three pointers to chars
  147. * An array of three char pointers
  148. * A pointer to array of three chars
  149. * A pointer to function which receives an int pointer and returns a float pointer
  150. * A pointer to a function which receives nothing and returns nothing
  151. * What do the functions atoi(), itoa() and gcvt() do?
  152. * Does there exist any other function which can be used to convert an integer or a float to a string?
  153. * How would you use qsort() function to sort an array of structures?
  154. * How would you use qsort() function to sort the name stored in an array of pointers to string?
  155. * How would you use bsearch() function to search a name stored in array of pointers to string?
  156. * How would you use the functions sin(), pow(), sqrt()?
  157. * How would you use the functions memcpy(), memset(), memmove()?
  158. * How would you use the functions fseek(), freed(), fwrite() and ftell()?
  159. * How would you obtain the current time and difference between two times?
  160. * How would you use the functions randomize() and random()?
  161. * How would you implement a substr() function that extracts a sub string from a given string?
  162. * What is the difference between the functions rand(), random(), srand() and randomize()?
  163. * What is the difference between the functions memmove() and memcpy()?
  164. * How do you print a string on the printer?
  165. * Can you use the function fprintf() to display the output on the screen?
  166. * What is an object?
  167. * What is the difference between an object and a class?
  168. * What is the difference between class and structure?
  169. * What is public, protected, private?
  170. * What are virtual functions?
  171. * What is friend function?
  172. * What is a scope resolution operator?
  173. * What do you mean by inheritance?
  174. * What is abstraction?
  175. * What is polymorphism? Explain with an example.
  176. * What is encapsulation?
  177. * What do you mean by binding of data and functions?
  178. * What is function overloading and operator overloading?
  179. * What is virtual class and friend class?
  180. * What do you mean by inline function?
  181. * What do you mean by public, private, protected and friendly?
  182. * When is an object created and what is its lifetime?
  183. * What do you mean by multiple inheritance and multilevel inheritance? Differentiate between them.
  184. * Difference between realloc() and free?
  185. * What is a template?
  186. * What are the main differences between procedure oriented languages and object oriented languages?
  187. * What is R T T I ?
  188. * What are generic functions and generic classes?
  189. * What is namespace?
  190. * What is the difference between pass by reference and pass by value?
  191. * Why do we use virtual functions?
  192. * What do you mean by pure virtual functions?
  193. * What are virtual classes?
  194. * Does c++ support multilevel and multiple inheritance?
  195. * What are the advantages of inheritance?
  196. * When is a memory allocated to a class?
  197. * What is the difference between declaration and definition?
  198. * What is virtual constructors/destructors?
  199. * In c++ there is only virtual destructors, no constructors. Why?
  200. * What is late bound function call and early bound function call? Differentiate.
  201. * How is exception handling carried out in c++?
  202. * When will a constructor executed?
  203. * What is Dynamic Polymorphism?
  204. * Write a macro for swapping integers.

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

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