C++ Interview Question and Answers - C++ Interview
C++ Interview Question and Answers:56. What is the use of storage class specifiers?
A storage class specifier is used to refine the declaration of a variable, a function, and parameters. The following are storage class specifiers :
auto
register
static
extern
57. What is strstream?
stringstream provides an interface to manipulate strings as if they were input/output streams.
‹ strstream› to define several classes that support iostreams operations on sequences stored in an allocated array of char object.
58. what is assignment operator in c++?
Default assignment operator handles assigning one object to another of the same class. Member to member copy (shallow copy).
59. What is an explicit constructor?
A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. It’s purpose is reserved explicitly for construction.Explicit constructors are simply constructors that cannot take part in an implicit conversion.
60. Can destructor be private?
Yes destructors can be private. But according it is not advisable to have destructors to be private.
No comments:
Post a Comment