<< < 1 2 3 4 5 6 7 8 > >>   Sort: Date

What is a Null object? C++
What is a Null object? C++ It is an object of some class whose purpose is to indicate that a real object of that class does not exist. One common use for a null object is a return value from a member function that is supposed to return an object with some specified properties but cannot find such an...
2012-01-10, 3105👍, 0💬

Describe Stacks and name a couple of places where stacks are useful.
Describe Stacks and name a couple of places where stacks are useful. A Stack is a linear structure in which insertions and deletions are always made at one end, called the top. This updating policy is called last in, first out (LIFO). It is useful when we need to check some syntex errors, such as mi...
2012-04-17, 3100👍, 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, 3100👍, 0💬

What is the difference between declaration and definition?
What is the difference between declaration and definition? The declaration tells the compiler that at some later point we plan to present the definition of this declaration. E.g.: void stars () //function declaration The definition contains the actual implementation. E.g.: void stars () // declarato...
2012-01-25, 3100👍, 0💬

How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters? Answer1 If you want the code to be even slightly readable, you will use typedefs. typedef char* (*functiontype_one)(void); typedef functiontype_one (*functiontype_two)(void); functi...
2012-03-09, 3099👍, 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, 3092👍, 0💬

What does extern mean in a function declaration?
What does extern mean in a function declaration? Using extern in a function declaration we can make a function such that it can used outside the file in which it is defined. An extern variable, function definition, or declaration also makes the described variable or function usable by the succeeding...
2012-03-06, 3090👍, 0💬

What is virtual class and friend class?
What is virtual class and friend class? Friend classes are used when two or more classes are designed to work together and need access to each other's implementation in ways that the rest of the world shouldn't be allowed to have. In other words, they help keep private things private. For instance, ...
2012-02-15, 3085👍, 0💬

Explain term POLIMORPHISM and give an example using eg. SHAPE object: If I have a base class SHAPE, how would I define DRAW meth
Explain term POLIMORPHISM and give an example using eg. SHAPE object: If I have a base class SHAPE, how would I define DRAW methods for two objects CIRCLE and SQUARE Answer1 POLYMORPHISM : A phenomenon which enables an object to react differently to the same function call. in C++ it is attained by u...
2012-02-08, 3084👍, 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, 3083👍, 0💬

What is an incomplete type? C++
What is an incomplete type? C++ Incomplete types refers to pointers in which there is non availability of the implementation of the referenced location or it points to some location whose value is not available for modification. int *i=0x400 // i points to address 400 *i=0; //set the value of memory...
2012-01-06, 3074👍, 0💬

What is a default constructor? C++
What is a default constructor? C++ Default constructor WITH arguments class B { public: B (int m = 0) : n (m) {} int n; }; int main(int argc, char *argv[]) { B b; return 0; }
2012-03-15, 3070👍, 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, 3069👍, 0💬

You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. new() and malloc()
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. new() and malloc() Answer1 1.) “new and delete” are preprocessors while “malloc() and free()” are functions. [we dont use brackets will calling new or delete]. 2.) no need of allocate the m...
2012-02-06, 3067👍, 0💬

What do you mean by Stack unwinding? C++
What do you mean by Stack unwinding? C++ It is a process during exception handling when the destructor is called for all local objects between the place where the exception was thrown and where it is caught.
2012-01-11, 3065👍, 0💬

Name 7 layers of the OSI Reference Model?
Name 7 layers of the OSI Reference Model? -Application layer -Presentation layer -Session layer -Transport layer -Network layer -Data Link layer -Physical layer
2012-04-13, 3064👍, 0💬

Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array? Mergesort always makes recursive calls to sort subarrays that are about half size of the original array, resulting in O(n log n) time.
2012-02-21, 3062👍, 0💬

What is a conversion constructor C++?
What is a conversion constructor C++? A constructor that accepts one argument of a different type.
2012-03-16, 3061👍, 0💬

Differentiate between a template class and class template.C++
Differentiate between a template class and class template.C++ Template class: A generic definition or a parameterized class not instantiated until the client provides the needed information. It’s jargon for plain templates. Class template: A class template specifies how individual classes can be con...
2012-01-03, 3051👍, 0💬

How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to stor
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array? How can you find the nodes with repetetive data in a linked list? Write a prog to accept a given string in any order and flash error if any of the char...
2012-02-27, 3045👍, 0💬

What is namespace? C++
What is namespace? C++ Namespaces allow us to group a set of global classes, objects and/or functions under a name. To say it somehow, they serve to split the global scope in sub-scopes known as namespaces. The form to use namespaces is: namespace identifier { namespace-body } Where identifier is an...
2012-02-13, 3041👍, 0💬

What is friend function? C++
What is friend function? C++ As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its private and protected members. A friend function is not a member of the class. But it must be listed in the class definition.
2012-02-21, 3040👍, 0💬

What is class invariant? C++
What is class invariant? C++ A class invariant is a condition that defines all valid states for an object. It is a logical condition to ensure the correct working of a class. Class invariants must hold when an object is created, and they must be preserved under all operations of the class. In partic...
2012-01-10, 3037👍, 0💬

Describe PRIVATE, PROTECTED and PUBLIC – the differences and give examples.
Describe PRIVATE, PROTECTED and PUBLIC – the differences and give examples. class Point2D{ int x; int y; public int color; protected bool pinned; public Point2D() : x(0) , y(0) {} //default (no argument) constructor }; Point2D MyPoint; You cannot directly access private data members when they are de...
2012-02-13, 3032👍, 0💬

<< < 1 2 3 4 5 6 7 8 > >>   Sort: Date