Review of C++ 1. What is console? 2. What is preprocessing? 3. What happens during compilation? 4.

Whats the difference between cin >> and cin.get(ch); ? 5. What is a recursive function? When do we use that? Give example OOP Intro 6. Procedural programming language definition and examples 7. Object based programming language definition and examples 8. What are the features of object oriented programming language? 9. Advantages of OOP 10. What is ADT? Function Overloading 11. How does C++ implement polymorphism? 12. What is function signature? 13. example for operator overloading >> and << 14. virtual functions – dynamic binding or linking 15. What is compile time polymorphism or early binding or static binding or static linking? 16. Which out of the following overloads the functions? a. Return type b. Signed and unsigned arguments c. Const and normal argument d. Static and non static functions e. Typedef f. Enumerations g. Pointer and array h. 1D and 2D array Classes n Objects 17. Difference between structure and class 18. What is scope resolution operator? Where do we use it? 19. What are inline functions? 20. What is meant by public, private and protected access in a class? 21. What is friend function? How do you make a function friend to a class? 22. What is class scope? Which variables usually have class scope? 23. Can u have a global object for a local class? What is the relationship exhibited by global, local class and objects? 24. What are accessor, mutator and manager functions? 25. Can u have objects of nested class defined inside/outside the enclosing class? If so, how? 26. How can the nested class access the members of the enclosing class? Which members can it access? 27. How can the enclosing class access the members of the nested class? Which members can it access? 28. When does inlining not work? Mention the 4 cases. 29. When do you make a function const? 30. When you create an object of a class, memory is allocated for which all parts? 31. Pass by value and pass by ref – an object to a function 32. What is the visibility and life time of a static data member? 33. Can u have a static data member within a local class? 34. How is a static member function different from a normal member function of a class? 35. Formatted and Unformatted input and output 36. Difference between a class and an object 37. What is the size of the object if the class has no data member?

If object of derived class is created. “Holds a” relationship is implemented using ? 64. What could be the arguments of a destructor? 55. Can a constructor be static? 53. An array of objects requires which type of ctor? 45.Constructor n Destructor 38. by default what happens? 82.? 71. What is EOL char? 78. What's the order that objects in an array are destructed? 73. Random access and Sequential access 77. which function will be invoked if u call function A? Base class or derived class? How to invoke the other? 70. If file already exists. How will u read a char from a file? A word? A line? 80. Will compiler provided constructor initialize the data members? Is it inline? 42. Can we do destructor overloading? Why? 57. How do you make an implicit or explicit call to the ctor? 46. Size of a derived object – will you consider private members of the base class or not? 65. Is there any difference between List x. get and getline function diff 84. How do you convert a parameterized constructor to a default constructor? 43. What is an abstract class? 66. What is the default visibility mode? 61. Different visibility modes 60. class member functions written in binary file? 85. Derived class also has function A in public section. and List x(). “is a type of” relationship is implemented using? 62. Why should we have a constructor and destructor? 39. Are Constructors and Destructors derived? 52. Whats the diff? 79. Order of construction n destruction for inheritance and nesting Inheritance 58. What is member initialization list? 51. Can you have a default ctor for derived class? 69. Can you have a parameterized constructor with default arguments and default constructor in a class? 44. Base class constructor is parameterized. Two types of data files 75. What are temporary instances of a class? 47. Diff between void main() and int main() Data File Handling 74. “has a” relationship is implemented using? 63. What are virtual base classes? What is Dreaded Diamond? 68. by default what happens? 81. What is a concrete class? 67. Situations when constructors are called 48. Can a constructor call the member function? 54. If there is no file. ios::noreplace ? 83. Difference between text and binary file 76. Different types of inheritance 59. What is the use of ios::trunc. Base class has function A in public section. How do you initialize const and reference members of a class? 50. ios::nocreate. What is a private class? 41. two types of file pointers . Why can't I initialize my static member data in my constructor's initialization list? 72. What is the return type of a constructor? 40. How many destructors can be there for a class? 56. Why the argument to a copy constructor is passed by reference? 49. Open a file using ctor and open method.

Operations on Linked List 121. Attribute. Deletion at the end for a Singly Linked List – How can it be done? 120. a pointer to const int? 107. Preconditions for Binary Search 113. Local extent. 101. Can you assign the address of a float variable to an int pointer? Why? 97. Stack. What is memory leak? 102. Linked List. What is the size of a pointer variable? 96. Array size calculation (1D and 2D) 115. cout << a + 3. Degree.1. selection) 117. tellg and seekg do? 87. Linked list 109. Cardinality 131.5}. Static extent. failbit.2. Properties of a relation 129. int *iptr = new int(10).3. Tuple. Tree 114. badbit. What are wild pointers? 90. Diff Data models 127. What will get printed? int a [ ] = {7. goodbit 88. Advantages of DBMS 126. insertion. Dynamic extent 93. NULL is defined in which header file? 98. Binary Search Principle 112. Queue. Can circular queue be implemented using Linked List? How? 123. What is a view? Can view be updated? .86. The array of char pointers is generally preferred over 2D array of characters. What is heap / stack memory? Free store? 91. Self referential structure 108. Why it is faster to use an element pointer rather than an index when scanning arrays? 105. Why? 106.9. How will u declare a const pointer to an int. Connection between array and a pointer 104. 103. Doubly Linked List 119. 3 levels of Data Abstraction 128.8. Data structure  Linear and Non linear  Simple and Compound 111. Diff bet Database and DBMS 125. Why postfix? What is the advantage? Database 124. What is dereferencing? 95. which function to reset the bits? Pointers 89. int *iptr = new int[10]. Domain 130. Singly Linked List. calculating the no of rows n cols 116. What will be the size of Linked List? 122. What happens when you add one to an int pointer? 99. Static / Dynamic memory allocation 92. Sequential allocation and Linked allocation 118. sorting and merging (bubble. Can you declare a global pointer variable? 100. eofbit. Given lower limit n upper limit. * and & operators 94. this pointer Data Structure 110. b. What’s the difference between? a.4.

138. UNIQUE . GPRS. Logical Constant n Variable 151.132. With N inputs. 144. Web hosting. 139. Authorization b. Modem 167. 142. Primary Key. 147. web portal. 143. CHECK . Network n Open Source Concepts 161. SOP n POS 158. Gateway 169. Router. PRIMARY KEY . differences. Network Security techniques a. Candidate Key. 146. Firewall i. Telephone connector / Network Connector – Numbers 168. Difference 135. AND. Why NAND and NOR are Universal Gates? 160. What is K-Map used for? Commn. Bandwidth 164. Minterms n Maxterms 157. Authentication c. Wireless/Mobile Communication protocols such as GSM. MAN. VoIP protocols such as Wi-Fi and Wi-Max 172. Bridge. All protocols – general idea 173. Electronic Mail protocol such as SMTP. OR 149. 145.differences. All theorems 155. Biometric Systems e. 136. how many combinations will be present in truth table? 156. Hub. What are uses of the logic gates? Where are they used? 153. Video Conferencing. DEFAULT DISTINCT Wildcard Characters Dual table When is having clause used? All commands and clauses What is the condition for deleting a table? Diff between update and alter Name some aggregate/group functions What is join? Boolean Algebra 148. LAN. NOT. web scripting (client side n server side) 174. Project. Guided and Unguided Media examples. Cartesian Product. Switch. iMAP. Network Topologies . definitions 166. Chat. Canonical SOP n Canonical POS 159. Packet filter ii. CDMA. Foreign Key 133. definitions. Union. All Logic Gates 152. Tautology n Fallacy 154. shareware 175. What is Truth Table? 150. Alternate Key. PAN 165. DDL n DML Name some DDL commands Name some DML commands Constraints on a table NOT NULL . 170. 171. uses 163. Encrypted Smart Cards d. 141. Switching Techniques 162. WLL. 137. Intersection. POP3. Application gateway . WAN. Select. 140. Operations on relational model 134. Diff bet freeware n free software.

Why? How to compare? Casting. Integer constants types 185. standard input. 2 forms of floating point constant 188. Avoid equality comparisons on floating point numbers. Cookies Hackers n Crackers 3 types of viruses Trojans. Postfix and Prefix decrement and increment operators 212. output. Worms. Bitwise operators 192. Why? 213. References. ios . Can we have __ for variable names? 183. error devices? 193. Avoid comparing signed and unsigned values. 177. type conversion types 217. rvalue and lvalue 207. Identifier? Capital style notation for an identifier? 184. Disadvantage of float 200. What is the size of escape sequence? 187. how many numbers can be represented? 203. Circuit level gateway iv. What is compilation? Errors caught by the compiler. Unary. what can all be rvalues? Give examples 208. Derived data types 199. Binary and Ternary operators 191. Proxy server 176. char and floating point 202. What is declaration? What does the compiler do? 197. 178. setw. Data type modifiers for integers. Fundamental data types 198. Header files for clrscr. Dynamic initialization 209. not caught by the compiler 196. Spams IPR 11th Portions 181. Shift operators. Enumeration 206. With 1 byte. Which to cast? 214. Comments in a program – how do u give? What happens to comments in compilation stage 194. 180. sizeof operator 215. Union 205. mod operator for float 216.iii. void 201. how do u declare them? 204. char ch = x. 179. Nongraphic characters – How are they represented? 186. .scientific and fixed – what do they mean? 211. exit 195. Keywords examples 182. multi character constant – size ? 189. ios flags for formatting output 210. cout << (int)ch. What will be the answer? int x = 300. difference between multi character constant and string literal 190.

What is the base address of the array? 255. What happens when the type is converted as following Target Type Expression type Possible Info loss Signed char Char Char Char Int Int Float Double Char Short int Int Long int Long int Float Double Long double If value > 127. Why is C++ std library needed? 252.. typedef 244. Infinite loop 227. How can u say that 2 structure objects are equal? 243. How does continue differ in for and while loop? 233. default return type in a function? 235. .h? 253. When conversion takes place from smaller to longer type. portability ? 245. File Scope 240. When do we use constant arguments? 238.. string. Class Scope.h. Fractional part Precision. compound stmt . array when passed in a function – by val or by ref? 250. Why do we include iostream. put the most common cases first (as it will reduce the comparisons made by the CPU everytime) 224. break. exit and continue diff 230. Empty loop – why do we use them? 229. When do we use return statement? 231. Default args in function proto or function definition 236. 219. ctype. Is prototype mandatory? When is it optional? 237. result rounded . . Local Scope. #define preprocessor directive – why? 246. Diff between if and switch 225. Interpreter and Compiler . null stmt 221.h. If arr is an array of integer. entry controlled and exit controlled loops 228.. Fall through 223. there is no loss of information. is arr++ allowed? 254. Call by value and call by ref 239.. Can u compare 2 structures? 242. Explain how? 251. int twod [] [ 2] which index can be left out? Why? 241. Loops parts 226. Diff between gets and cin 248. target is –ve High Order 8 bits . Dangling else 222.218. Function Scope. random numbers (randomize and random) 234. Macro 247. How do we detect whether the loop has ended normally or prematurely? 232. It does not add precision and accuracy either 220. A function can return how many values? 249. Unsigned int is twice as large as signed int.

What's the problem with the above code? 263. the program will compile and run fine. the program will compile okay. but the function is never called. When a variable of the enumerated type is declared (such as eColor in the example above). We can override the default precision that cout shows by using the setprecision() function that is defined in a header file called iomanip. the function is called. The double-quotes tell the compiler that this is a header file we are supplying. and simplifies some of the internal logic needed to deal with negative numbers. why we use angled brackets for iostream. Defining an enumerated type does not allocate any memory. as arrays must have at least one element. The answer is that angled brackets are used to tell the compiler that we are including a header file that was included with the compiler. using the sizeof operator. there is no direct way to ask an array how many elements it contains. but the linker will complain that it can’t resolve the function call. In C++. Multiple conditions in for stmt like multiple initializations or updations 270. and double quotes for add. int* ptr = new int. if a forward declaration is made. Why do we add 1? Consider the number 0. This prevents 0 from having two representations. 0 would have two representations: 0000 0000 (positive zero) and 1111 1111 (negative zero). Variables of type double typically have a precision of about 16 significant digits. 258. and hence it will truncate anything after that. Variables of type double are named so because they offer approximately double the precision of a float. What happens if we forward declare a function but do not define it? The answer is: it depends. memory is allocated for that variable at that time. 261. Use of typedef 269. 265. we can figure it out: 1 int nElements = sizeof(anArray) / sizeof(anArray[0]). . However. Consider the following program: 259. 5 % -2 and -5 % 2 – whats the diff in answer? 266. When outputting floating point numbers. If a forward declaration is made. However. 268.256. cout has a default precision of 6 — that is. Order of evaluation for &&. whats the output? 267. float a = 10/4 . 260. II and ! 264. Variables of type float typically have a precision of about 7 significant digits (which is why everything after that many digits in our answer above is junk). What is linking Linking is the process of taking all the object files for a program and combining them into a single executable. it assumes all variables are only significant to 6 digits. int i =16. which causes it to look for that header file in the current directory containing our source code first. By adding 1. 1111 1111 intentionally overflows and becomes 0000 0000. but the program never defines the function. Use double quotes to include any other header files.h. Because all of the elements of the array have the same size. dividing the total size of the array by the size of any one of the elements yields the number of elements in the array! We use element 0 because it is the only element guaranteed to exist. If a negative value was simply represented as the inverse of the positive number. ptr = &i. Rule: Use angled brackets to include header files that come with the compiler. 262. cout << a. what is object file? Or What is the output file that u get after compilation of source code? 257.

How will you dynamically allocate an array? Deallocate? int &rnInvalidRef. -> mistake uninitialized const int size. // return a reference to nValue here } // nValue goes out of scope here 276. globals area. where the compiled program sits in memory. this pointer for static member functions 280. However. public -> private Last Years What is a concrete class? How does linked stack work? Where is stack used in the computer? Where is queue used in the computer? What is postfix expression? What is the need for converting to it? What is an abstract class? Why doesn’t it have any objects? What is a view? Where is it stored? What happens to it when the base table is deleted? What is the difference between a hub and switch? What is the difference between "a" and 'a'? What is the size of long double data type? What is a candidate key? What is the condition for an attribute to be a candidate key? What is the name of the base class that contains all file handling definitions? What is dreaded diamond? what is web scripting applns of everything (LL. html n dhtml. is a special type of pointer that can be pointed at objects of any data type! A void pointer is declared like a normal pointer. pair. stack.271. b. 277. also known as the generic pointer. hub n bridge what is telnet what is cardinality post fix . Private constructors and singleton classes 279. queue) appln of circular queue text/binary file . 278. The void pointer. -> mistake uninitialized 274. one major downside of functions is that every time a function is called. stack. using the void keyword as the pointer’s type: 275. How is it implemented? What is null pointer? How many bytes will a pointer occupy? What is k map? what are different ways to reduce an expr .quad. The memory a program uses is typically divided into four different areas: The The The The code area. where global variables are stored. return nValue. c. 272. heap. a. octet diff bet class & structure. why computer converts everything to postfix? . Code written in-place is significantly faster. all the function parameters must be created and assigned values. Protected -> Public in derived class.which is random access? Sequential access? What is degree? Diff between unsigned n signed. multi level n multiple what is tuple Diff bet xml n html. 273. What’s wrong? int& DoubleValue(int nX) { int nValue = nX * 2. there is a certain amount of performance overhead that occurs. where parameters and local variables are allocated from. Difference between copy constructor and assignment operator 281. This is because the CPU must store the address of the current instruction it is executing (so it knows where to return to later) along with other registers. d. and the program has to branch to a new location.where is it used. where dynamically allocated variables are allocated from.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.