Here, are some sample questions based on "C++/OOPS Programming language". Read it carefully as these questions will help you in cracking any interview.
Question - 11) Why ‘char’ is often considered as an integer data type?
Answer: The memory implementation of char data type is in terms of the number code, which is an integer. Therefore, it is said to be another integer data type.
Question - 12) What is the difference between structure and class in C++?
Answer: A structure is a collection of data while the class is a collection of data and functions. Further, all members are public by default in a structure while all members are private by default in class. Class has greater data security than structure.
Question - 13) What is the purpose of ios:app?
Answer: The function of ios::app is to retain the previous contents of a file and to append to the end of the existing file contents, rather than truncating them.
Question -14) What is the purpose of ios::ate?
Answer: The purpose of ios::ate is to place file pointer at the end of the file, but you can write data anywhere in the file.
Question - 15) How is random access of data achieved in C++?
Answer: In C++, random access is achieved by manipulating seekg( ), seekp( ), tellg( ) and tellp( ) functions. The seekg() and tellg() functions allow you to set and examine the get_pointer, and the seekp() and tellp() functions perform these operations on the put_pointer.
ALSO READ:
16) Which header file is required for creating and manipulating data files in C++ ?
17) What is an access specifier ?
18) How is memory allocated to a class and its objects ?
19) What is the difference between an object and a class ?
20) Differentiate between data hiding and encapsulation ?
21) What is polymorphism? Explain with an example ?
22) What is public, protected and private ?
23) What is the significance of the protected access specifier ?
24) Do 'derivation' and 'friendship' mean the same ?
25) Enlist some advantages of object oriented programming ?
26) Is prototyping mandatory in C++ ? Why ?
27) When should a function be made inline ?
28) How is a static variable different from a static function ?
29) What is meant by macro ?
30) What do you mean by inline function?
... Back To C++ Programs Index
... Back To C++ FAQ's Index
... Back To C Programs Index
... Back To C FAQ's Index
... Back To HR Interview Index
Comments
Post a Comment
Please share your opinions and suggestions or your experience in the comments section. This way we can all help each other...
Experienced guys can share their resumes at admin@interview-made-easy.com