Here, are some sample questions based on "C++/OOPS Programming language". Read it carefully as these questions will help you in cracking any interview.
81) What is a nested structure ?
A nested structure is a structure having another structure as its member element. It finds a wide range of applications in C++ components like linked lists.
82) How are arrays and structures related to each other ?
Arrays bring together a group of items of the same data type whereas structures bring together a group of related data items of any data type.
83) How are structures and classes related to each other ?
OR
What is the difference between structure and class?
Structure is actually a class in C++ declared with keyword struct. By default, all members are public in a structure, while on the other hand, all members are private by default in classes.
84) What is the difference between get and getline member functions ?
The get() and getline() functions are virtually identical to one another. But the difference between the two of them is that getline() reads and removes the newline character from the input stream if its is encountered, which is not done by the get() function.
85) Differentiate between ifstream class and ofstream class?
The ifstream class is an input stream class, which provides input operations for file. The ofstream class is an output stream class, which provides output operations for a file. Both ifstream and ofstream classes are defined under the header file iostream.h.
ALSO READ:
Frequently Asked C++/OOPS Interview Questions With Answers – 16.
Frequently Asked C++/OOPS Interview Questions With Answers – 17.
"> Frequently Asked C++/OOPS Interview Questions With Answers – 19.
Frequently Asked C++/OOPS Interview Questions With Answers – 20.
… Back To C++/OOPS Interview QnA 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