<< < 57 58 59 60 61 62 63 64 65 66 67 > >>   Sort: Rank

What is output equal to in Bitwise Operations - ...
What is output equal to in Bitwise Operations - ... What is output equal to in Bitwise Operations - Given inputs X, Y, Z and operations | and & (meaning bitwise OR and AND, respectively), what is output equal to in? output = (X & Y) | (X & Z) | (Y & Z);
2012-04-04, 3541👍, 0💬

Differences of C and C++ Could you write a small program that will compile in “C” but not in “C++”?
Differences of C and C++ Could you write a small program that will compile in “C” but not in “C++”? In C, if you can a const variable e.g. const int i = 2; you can use this variable in other module as follows extern const int i; C compiler will not complain. But for C++ compiler u must write extern...
2012-04-03, 3385👍, 0💬

Virtual Destructor - What is the need for “Virtual Destructor”?
Virtual Destructor - What is the need for “Virtual Destructor”? Destructors are declared as virtual because if do not declare it as virtual the base class destructor will be called before the derived class destructor and that will lead to memory leak because derived class’s objects will not get fre...
2012-04-03, 3573👍, 0💬

STL Containers - What are the types of STL containers?
STL Containers - What are the types of STL containers? There are 3 types of STL containers: 1. Adaptive containers like queue, stack 2. Associative containers like set, map 3. Sequence containers like vector, deque
2012-04-02, 5025👍, 0💬

What is RTTI? C++
What is RTTI? C++ Answer1. RTTI stands for "Run Time Type Identification". In an inheritance hierarchy, we can find out the exact type of the objet of which it is member. It can be done by using: 1) dynamic id operator 2) typecast operator Answer2. RTTI is defined as follows: Run Time Type Informati...
2012-04-02, 3625👍, 0💬

"mutable" Keyword - What is "mutable"?
"mutable" Keyword - What is "mutable"? Answer1. "mutable" is a C++ keyword. When we declare const, none of its data members can change. When we want one of its members to change, we declare it as mutable. Answer2. A "mutable" keyword is useful when we want to force a "logical const" data member to h...
2012-03-30, 4073👍, 0💬

Assignment Operator - What is the diffrence between a "assignment operator" and a "copy constructor"?
Assignment Operator - What is the diffrence between a "assignment operator" and a "copy constructor"? Answer1. In assignment operator, you are assigning a value to an existing object. But in copy constructor, you are creating a new object and then assigning a value to that object. For example: compl...
2012-03-30, 3117👍, 0💬

If you hear the CPU fan is running and the monitor power is still on, but you did not see any thing show up in the monitor scree
If you hear the CPU fan is running and the monitor power is still on, but you did not see any thing show up in the monitor screen. What would you do to find out what is going wrong? I would use the ping command to check whether the machine is still alive(connect to the network) or it is dead.
2012-03-29, 3073👍, 0💬

Can you be bale to identify between Straight- through and Cross- over cable wiring? and in what case do you use Straight- throug
Can you be bale to identify between Straight- through and Cross- over cable wiring? and in what case do you use Straight- through and Cross-over? Straight-through is type of wiring that is one to connection, Cross- over is type of wiring which those wires are got switched We use Straight-through cab...
2012-03-29, 3105👍, 0💬

Write a program that ask for user input from 5 to 9 then calculate the average
Write a program that ask for user input from 5 to 9 then calculate the average int main() { int MAX=4; int total =0; int average=0; int numb; cout&lt;&lt;"Please enter your input from 5 to 9"; cin&gt;&gt;numb; if((numb &lt;5)&amp;&amp;(n umb&gt;9))cout&lt;&lt;...
2012-03-28, 5010👍, 0💬

What are the defining traits of an object-oriented language?
What are the defining traits of an object-oriented language? The defining traits of an object-oriented langauge are: * encapsulation * inheritance * polymorphism
2012-03-28, 3060👍, 0💬

What methods can be overridden in Java?
What methods can be overridden in Java? In C++ terminology, all public methods in Java are virtual. Therefore, all Java methods can be overwritten in subclasses except those that are declared final, static, and private.
2012-03-27, 3124👍, 0💬

In C++, what is the difference between method overloading and method overriding?
In C++, what is the difference between method overloading and method overriding? Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters). Method overriding is the ability of...
2012-03-27, 2968👍, 0💬

What is the difference between Mutex and Binary semaphore?
What is the difference between Mutex and Binary semaphore? semaphore is used to synchronize processes. where as mutex is used to provide synchronization between threads running in the same process.
2012-03-26, 3122👍, 0💬

Will it execute or not? C++
Will it execute or not? C++ void main() { char *cptr = 0?2000; long *lptr = 0?2000; cptr++; lptr++; printf(” %x %x”, cptr, lptr); }Will it execute or not? Answer1 For Q2: As above, won’t compile because main must return int. Also, 0×2000 cannot be implicitly converted to a pointer (I assume you mea...
2012-03-26, 3249👍, 0💬

Will the following program execute? C++
Will the following program execute? C++ Will the following program execute? void main() { void *vptr = (void *) malloc(sizeof(void)); vptr++; } Answer1 It will throw an error, as arithmetic operations cannot be performed on void pointers. Answer2 It will not build as sizeof cannot be applied to void...
2012-03-23, 3417👍, 0💬

Are there any new intrinsic (built-in) data types?
Are there any new intrinsic (built-in) data types? Yes. The ANSI committee added the bool intrinsic type and its true and false value keywords.
2012-03-23, 3044👍, 0💬

What problem does the namespace feature solve?
What problem does the namespace feature solve? Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The namespace feature surrounds a library’s external declarations with a unique namespace tha...
2012-03-22, 2974👍, 0💬

Describe run-time type identification.
Describe run-time type identification. The ability to determine at run time the type of an object by using the typeid operator or the dynamic_cast operator.
2012-03-22, 2715👍, 0💬

What is the Standard Template Library (STL)?
What is the Standard Template Library (STL)? A library of container templates approved by the ANSI committee for inclusion in the standard C++ specification. A programmer who then launches into a discussion of the generic programming model, iterators, allocators, algorithms, and such, has a higher t...
2012-03-21, 3028👍, 0💬

What is an explicit constructor? C++
What is an explicit constructor? C++ 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.
2012-03-21, 3060👍, 0💬

What is a mutable member? C++
What is a mutable member? C++ One that can be modified by the class even when the object of the class or the member function doing the modification is const.
2012-03-20, 3043👍, 0💬

When is a template a better solution than a base class?
When is a template a better solution than a base class? When you are designing a generic class to contain or otherwise manage objects of other types, when the format and behavior of those other types are unimportant to their containment or management, and particularly when those other types are unkn...
2012-03-20, 2893👍, 0💬

Explain the ISA and HASA class relationships. How would you implement each in a class design?
Explain the ISA and HASA class relationships. How would you implement each in a class design? A specialized class "is" a specialization of another class and, therefore, has the ISA relationship with the other class. An Employee ISA Person. This relationship is best implemented with inheritance. Empl...
2012-03-19, 3305👍, 0💬

<< < 57 58 59 60 61 62 63 64 65 66 67 > >>   Sort: Rank