Question- What is a register variable?
Answer- Register variables are stored in the CPU registers. Its default value is a garbage value. Scope of a register variable is local to the block in which it is defined. Lifetime is till control remains within the block in which the register variable is defined. Variable stored in a CPU register can always be accessed faster than the one that is stored in memory. Therefore, if a variable is used at many places in a program, it is better to declare its storage class as register
For Example:
register int x=5;
Variables for
Question- What’s the difference between COM and DCOM?
Answer- the question does not require strict answer. Any DCOM object is yet a COM object (DCOM extends COM) and any COM object may participate in DCOM transactions. DCOM introduced several improvements/optimizations for distributed environment, such as MULTI_QI (multiple QueryInterface()), security contexts etc. DCOM demonstrated importance of surrogate process (you cannot run in-proc server on a remote machine. You need a surrogate process to do that.) DCOM introduced a load balancing.
Question- Where is an auto variables stored?
Answer- Main memory and CPU registers are the two memory locations where auto variables are stored. Auto variables are defined under automatic storage class. They are stored in main memory. Memory is allocated to an automatic variable when the block which contains it is called and it is de-allocated at the completion of its block execution.
Auto variables:
Storage : main memory.
Default value : garbage value.
Scope : local to the block in which the variable is defined.
Lifetime : till the control remains within the block in which the variable is defined.
Question- What is a node class?
Answer- A node class is a class that,
o relies on the base class for
services and implementation,
o provides a wider interface to
the users than its base class,
o relies primarily on virtual
functions in its public interface
o depends on all its direct and
indirect base class
o can be understood only in the
context of the base class
o can be used as base for further
derivation
o can be used to create objects.
A node class is a class that has added new services or
functionality beyond the services inherited from its base class.
Question- What is an orthogonal base class?
Answer- If two base classes have no overlapping methods or data they are said to be independent of, or orthogonal to each other. Orthogonal in the sense means that two classes operate in different dimensions and do not interfere with each other in any way. The same derived class may inherit such classes with no difficulty.
0 comments:
Post a Comment