Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
5Activity
0 of .
Results for:
No results containing your search query
P. 1
Frequently Asked Questions

Frequently Asked Questions

Ratings: (0)|Views: 211 |Likes:
Published by api-3715867

More info:

Published by: api-3715867 on Oct 14, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

Frequently Asked Questions \u00ad 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\u00adline arguments?
8.
How can I return multiple values from a function?
9.

How can I invoke another program from within a C program?
10. How can I access memory located at a certain address?
11. How can I allocate arrays or structures bigger than 64K?
12. How can I find out how much memory is available?
13. How can I read a directory in a C program?

14.How can I increase the allowable number of simultaneously open files?
15.What's wrong with the call "fopen("c:\newdir\file.dat", "r")"?
16. What is the output of printf("%d")
17.

What will happen if I say delete this
18. Difference between "C structure" and "C++ structure".
19. Diffrence between a "assignment operator" and a "copy constructor"
20. What is the difference between "overloading" and "overridding"?
21. Explain the need for "Virtual Destructor".
22. Can we have "Virtual Constructors"?
23. What are the different types of polymorphism?
24. What are Virtual Functions? How to implement virtual functions in "C"
25. What are the different types of Storage classes?
26. What is Namespace?
27. What are the types of STL containers?.
28. Difference between "vector" and "array"?
29. How to write a program such that it will delete itself after exectution?
30. Can we generate a C++ source code from the binary file?
31. What are inline functions?
32. Talk sometiming about profiling?
33. How many lines of code you have written for a single program?
34. What is "strstream" ?
35. How to write Multithreaded applications using C++?
36. Explain "passing by value", "passing by pointer" and "passing by reference"
37. Write any small program that will compile in "C" but not in "C++"
38. Have you heard of "mutable" keyword?
39. What is a "RTTI"?
40. Is there something that I can do in C and not in C++?
41. Why preincrement operator is faster than postincrement?
42. What is the difference between "calloc" and "malloc"?
43. What will happen if I allocate memory using "new" and free it using "free" or allocate

sing "calloc" and free it using "delete"?
44. What is Memory Alignment?
45. Explain working of printf.
46. Difference between "printf" and "sprintf".

47. What is "map" in STL?
48. When shall I use Multiple Inheritance?
49. What are the techniques you use for debugging?
50. How to reduce a final size of executable?

51.Give 2 examples of a code optimization.

52. What is inheritance?
53. Difference between Composition and Aggregation.
54. Difference: Sequence Diagrams, Collaboration Diagrams.
55. Difference: 'uses', 'extends', 'includes'
56. What shall I go for Package Diagram?
57. What is Polymorphism?
58. Is class an Object? Is object a class?
59. Comment: C++ "includes" behavior and java "imports"
60. What do you mean by "Realization"?
61. What is a Presistent, Transient Object?
62. What is the use of Operator Overloading?
63. Does UML guarantee project success?
64. Difference: Activity Diagram and Sequence Diagram.
65. What is association?
66. How to resolve many to many relationship?

67.How do you represent static members and abstract classes in Class Diagram?

68. What does static variable mean?
69. What is a pointer?
70. What is a structure?
71. What are the differences between structures and arrays?
72. In header files whether functions are declared or defined?
73. What are the differences between malloc() and calloc()?
74. What are macros? what are its advantages and disadvantages?
75. Difference between pass by reference and pass by value?
76. What is static identifier?
77. Where are the auto variables stored?
78. Where does global, static, local, register variables, free memory and C Program

instructions get stored?
79. Difference between arrays and linked list?
80. What are enumerations?
81. Describe about storage allocation and scope of global, extern, static, local and

register variables?
82. What are register variables? What are the advantage of using register variables?
83. What is the use of typedef?
84. Can we specify variable field width in a scanf() format string? If possible how?
85. Out of fgets() and gets() which function is safe to use and why?
86. Difference between strdup and strcpy?
87. What is recursion?
88. Differentiate between a for loop and a while loop? What are it uses?
89. What are the different storage classes in C?
90. Write down the equivalent pointer expression for referring the same element a

[i][j][k][l]?

91. What is difference between Structure and Unions?
92. What the advantages of using Unions?
93. What are the advantages of using pointers in a program?

94. What is the difference between Strings and Arrays?
95. In a header file whether functions are declared or defined?
96. What is a far pointer? Where we use it?
97. How will you declare an array of three function pointers where each function receives

two ints and returns a float?
98. what is a NULL Pointer? Whether it is same as an uninitialized pointer?
99. What is a NULL Macro? What is the difference between a NULL Pointer and a NULL

Macro?

100. What does the error 'Null Pointer Assignment' mean and what causes this error?
101. What is near, far and huge pointers? How many bytes are occupied by them?
102. How would you obtain segment and offset addresses from a far address of a memory

location?

103. Are the expressions arr and &arr same for an array of integers?
104. Does mentioning the array name gives the base address in all the contexts?
105. Explain one method to process an entire string as one unit?
106. What is the similarity between a Structure, Union and enumeration?
107. Can a Structure contain a Pointer to itself?
108. How can we check whether the contents of two structure variables are same or not?
109. How are Structure passing and returning implemented by the complier?
110. How can we read/write Structures from/to data files?
111. What is the difference between an enumeration and a set of pre\u00adprocessor # defines?
112. what do the 'c' and 'v' in argc and argv stand for?
113. Are the variables argc and argv are local to main?
114. What is the maximum combined length of command line arguments including the

space between adjacent arguments?
115. 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?
116. Does there exist any way to make the command line arguments available to other
functions without passing them as arguments to the function?
117. What are bit fields? What is the use of bit fields in a Structure declaration?
118. To which numbering system can the binary number 1101100100111100 be easily

converted to?
119. Which bit wise operator is suitable for checking whether a particular bit is on or off?
120. Which bit wise operator is suitable for turning off a particular bit in a number?
121. Which bit wise operator is suitable for putting on a particular bit in a number?
122. Which bit wise operator is suitable for checking whether a particular bit is on or off?
123. which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left

shifting an unsigned int or char by 1?
124. Write a program to compare two strings without using the strcmp() function.
125. Write a program to concatenate two strings.
126. Write a program to interchange 2 variables without using the third one.
127. Write programs for String Reversal & Palindrome check
128. Write a program to find the Factorial of a number
129. Write a program to generate the Fibinocci Series
130. Write a program which employs Recursion
131. Write a program which uses Command Line Arguments
132. Write a program which uses functions like strcmp(), strcpy()? etc
133. What are the advantages of using typedef in a program?

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->