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

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, 3088👍, 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, 3085👍, 0💬

What is an object? C++
What is an object? C++ Object is a software bundle of variables and related methods. Objects have state and behavior.
2012-02-08, 3081👍, 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, 3080👍, 0💬

Write a short code using C++ to print out all odd number from 1 to 100 using a for loop
Write a short code using C++ to print out all odd number from 1 to 100 using a for loop for( unsigned int i = 1; i &lt; = 100; i++ ) if( i &amp; 0x00000001 ) cout &lt;&lt; i &lt;&lt; \",\";
2012-01-30, 3080👍, 0💬

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 look for the shell with the highest PID. class Point2D{ int ...
2012-02-11, 3079👍, 0💬

What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator.
What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator. An internal iterator is implemented with member functions of the class that has items to step through. .An external iterator is implemented as a separate class that can be "at...
2012-02-23, 3078👍, 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, 3077👍, 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, 3075👍, 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, 3068👍, 0💬

Write a class to store, evaluate and print integer arithmetic expressions. the public interface .....
Write a class to store, evaluate and print integer arithmetic expressions. the public interface should look like this: class myexpr { public: myexpr(char*); int eval(); void print(); };
2012-04-19, 3066👍, 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, 3058👍, 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, 3054👍, 0💬

What are 2 ways of exporting a function from a DLL?
What are 2 ways of exporting a function from a DLL? 1.Taking a reference to the function from the DLL instance. 2. Using the DLL ’s Type Library
2012-02-17, 3052👍, 0💬

What are the differences between a C++ struct and C++ class?
What are the differences between a C++ struct and C++ class? The default member and base-class access specifiers are different.
2012-03-13, 3049👍, 0💬

Define namespace. C++
Define namespace. C++ It is a feature in C++ to minimize name collisions in the global name space. This namespace keyword assigns a distinct name to a library that allows other libraries to use the same identifier names without creating any name collisions. Furthermore, the compiler uses the namespa...
2012-01-04, 3048👍, 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, 3047👍, 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, 3046👍, 0💬

Suppose a 3-bit sequence number is used in the selective-reject ARQ, what is the maximum number of frames that could be transmit
Suppose a 3-bit sequence number is used in the selective-reject ARQ, what is the maximum number of frames that could be transmitted at a time? If a 3-bit sequence number is used, then it could distinguish 8 different frames. Since the number of frames that could be transmitted at a time is no greate...
2012-04-17, 3041👍, 0💬

What is Boyce Codd Normal form?
What is Boyce Codd Normal form? 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; , where a and b is a subset of R, at least one of the following holds: * a- &gt; b is a trivial functional dependency ...
2012-02-15, 3041👍, 0💬

What is the difference between char a[] = “string”; and char *p = “string”;?
What is the difference between char a[] = “string”; and char *p = “string”;? In the first case 6 bytes are allocated to the variable a which is fixed, where as in the second case if *p is assigned to some other value the allocate memory can change.
2012-03-07, 3038👍, 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-02-01, 3038👍, 0💬

What are virtual functions? C++
What are virtual functions? C++ A virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually of the derived class, even if the object is accessed by a base poin...
2012-02-22, 3036👍, 0💬

What is the difference between an ARRAY and a LIST?
What is the difference between an ARRAY and a LIST? Answer1 Array is collection of homogeneous elements. List is collection of heterogeneous elements. For Array memory allocated is static and continuous. For List memory allocated is dynamic and Random. Array: User need not have to keep in track of n...
2012-02-02, 3034👍, 0💬

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