<< < 2 3 4 5 6 7 8 >   Sort: Rank

What do you mean by inline function?
What do you mean by inline function? The idea behind inline functions is to insert the code of a called function at the point where the function is called. If done carefully, this can improve the application's performance in exchange for increased compile time and possibly (but not always) an increa...
2012-01-27, 2613👍, 0💬

How do you write a function that can reverse a linked-list?
How do you write a function that can reverse a linked-list? void reverselist(void) { if(head==0) return; if(head-&gt;next==0) return; if(head-&gt;next==tail) { head-&gt;next = 0; tail-&gt;next = head; } else { node* pre = head; node* cur = head-&gt;next; node* curnext = cur-&...
2012-01-26, 2498👍, 0💬

What are the advantages of inheritance?
What are the advantages of inheritance? It permits code reusability. Reusability saves time in program development. It encourages the reuse of proven and debugged high-quality software, thus reducing problem after a system becomes functional.
2012-01-26, 2525👍, 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, 2787👍, 0💬

What is function overloading and operator overloading?
What is function overloading and operator overloading? Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This capability is called function overloading. When...
2012-01-25, 2547👍, 0💬

What is the difference between realloc() and free()?
What is the difference between realloc() and free()? The free subroutine frees a block of memory previously allocated by the malloc subroutine. Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, no action will occur. The realloc subrout...
2012-01-24, 2529👍, 0💬

How do you find out if a linked-list has an end? (i.e. the list is not a cycle)
How do you find out if a linked-list has an end? (i.e. the list is not a cycle) You can find out by using 2 pointers. One of them goes 2 nodes each time. The second one goes at 1 nodes each time. If there is a cycle, the one that goes 2 nodes each time will eventually meet the one that goes slower. ...
2012-01-24, 2440👍, 0💬

In the derived class, which data member of the base class are visible?
In the derived class, which data member of the base class are visible? In the public and protected sections.
2012-01-23, 2575👍, 0💬

What is the two main roles of Operating System?
What is the two main roles of Operating System? As a resource manager As a virtual machine
2012-01-23, 2496👍, 0💬

How do you traverse a Btree in Backward in-order?
How do you traverse a Btree in Backward in-order? Process the node in the right subtree Process the root Process the node in the left subtree
2012-01-20, 2726👍, 0💬

Write a Struct Time where integer m, h, s are its members
Write a Struct Time where integer m, h, s are its members struct Time { int m; int h; int s; };
2012-01-20, 2521👍, 0💬

What is pure virtual function? C++
What is pure virtual function? C++ A class is made abstract by declaring one or more of its virtual functions to be pure. A pure virtual function is one with an initializer of = 0 in its declaration
2012-01-19, 2700👍, 0💬

What is Boyce Codd Normal form? C++
What is Boyce Codd Normal form? C++ A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form a-&gt;b, where a and b is a subset of R, at least one of the following holds: * a-&gt;b is a trivial functional dependenc...
2012-01-19, 2681👍, 0💬

How can you tell what shell you are running on UNIX system?
How can you tell what shell you are running on UNIX system? You can do the Echo $RANDOM. It will return a undefined variable if you are from the C-Shell, just a return prompt if you are from the Bourne shell, and a 5 digit random numbers if you are from the Korn shell. You could also do a ps -l and ...
2012-01-18, 2868👍, 0💬

How do you find out if a linked-list has an end? (i.e. the list is not a cycle)
How do you find out if a linked-list has an end? (i.e. the list is not a cycle) You can find out by using 2 pointers. One of them goes 2 nodes each time. The second one goes at 1 nodes each time. If there is a cycle, the one that goes 2 nodes each time will eventually meet the one that goes slower. ...
2012-01-18, 2454👍, 0💬

What is polymorphism? C++
What is polymorphism? C++ Polymorphism is the idea that a base class can be inherited by several classes. A base class pointer can point to its child class and a base class array can store different child class objects.
2012-01-17, 2600👍, 0💬

How do you write a function that can reverse a linked-list?
How do you write a function that can reverse a linked-list? Answer1: void reverselist(void) { if(head==0) return; if(head-&lt;next==0) return; if(head-&lt;next==tail) { head-&lt;next = 0; tail-&lt;next = head; } else { node* pre = head; node* cur = head-&lt;next; node* curnext = ...
2012-01-17, 2574👍, 0💬

What is a container class? C++ What are the types of container classes?
What is a container class? C++ What are the types of container classes? A container class is a class that is used to hold objects in memory or external storage. A container class acts as a generic holder. A container class has a predefined behavior and a well-known interface. A container class is a ...
2012-01-16, 2517👍, 0💬

What is an orthogonal base class? C++
What is an orthogonal base class? C++ 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 deri...
2012-01-16, 3176👍, 0💬

What is a node class? C++
What is a node class? C++ A node class is a class that, * relies on the base class for services and implementation, * provides a wider interface to the users than its base class, * relies primarily on virtual functions in its public interface * depends on all its direct and indirect base class * can...
2012-01-13, 2618👍, 0💬

Name some pure object oriented languages. C++
Name some pure object oriented languages. C++ Smalltalk, Java, Eiffel, Sather.
2012-01-13, 2582👍, 0💬

What are proxy objects? C++
What are proxy objects? C++ Objects that stand for other objects are called proxy objects or surrogates. template &lt;class t=""> class Array2D { public: class Array1D { public: T& operator[] (int index); const T& operator[] (int index)const; }; Array1D operator[] (int index); const Arra...
2012-01-12, 2650👍, 0💬

What are the conditions that have to be met for a condition to be an invariant of the class?
What are the conditions that have to be met for a condition to be an invariant of the class? * The condition should hold at the end of every constructor. * The condition should hold at the end of every mutator (non-const) operation.
2012-01-12, 2619👍, 0💬

Define precondition and post-condition to a member function. C++
Define precondition and post-condition to a member function. C++ Precondition: A precondition is a condition that must be true on entry to a member function. A class is used correctly if preconditions are never false. An operation is not responsible for doing anything sensible if its precondition fa...
2012-01-11, 2916👍, 0💬

<< < 2 3 4 5 6 7 8 >   Sort: Rank