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

What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function? virtual
2012-02-16, 2231👍, 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, 2486👍, 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, 2360👍, 0💬

What is a COPY CONSTRUCTOR and when is it called?
What is a COPY CONSTRUCTOR and when is it called? A copy constructor is a method that accepts an object of the same class and copies it’s data members to the object on the left part of assignement: class Point2D{ int x; int y; public int color; protected bool pinned; public Point2D() : x(0) , y(0) {...
2012-02-14, 2297👍, 0💬

What do you mean by inheritance? C++
What do you mean by inheritance? C++ Inheritance is the process of creating new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class, but can add embellishments and refinements of its own.
2012-02-14, 2362👍, 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, 2422👍, 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, 2459👍, 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, 2366👍, 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, 2294👍, 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, 2535👍, 0💬

What is encapsulation? C++
What is encapsulation? C++ Packaging an object’s variables within its methods is called encapsulation.
2012-02-07, 2550👍, 0💬

What is RTTI? C++
What is RTTI? C++ Runtime type identification (RTTI) lets you find the dynamic type of an object when you have only a pointer or a reference to the base type. RTTI is the official way in standard C++ to discover the type of an object and to convert the type of a pointer or reference (that is, dynami...
2012-02-07, 2302👍, 0💬

What is the difference between class and structure?
What is the difference between class and structure? Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also. The major difference is that all declarations inside a...
2012-02-06, 2370👍, 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, 2526👍, 0💬

Define a constructor - What it is and how it might be called (2 methods).
Define a constructor - What it is and how it might be called (2 methods). Answer1 constructor is a member function of the class, with the name of the function being the same as the class name. It also specifies how the object should be initialized. Ways of calling constructor: 1) Implicitly: automat...
2012-02-03, 2304👍, 0💬

What is a template? C++
What is a template? C++ Templates allow to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until certain point they fulfill the functionality of a macro. Its prototype is any of the two followi...
2012-02-03, 2899👍, 0💬

Does c++ support multilevel and multiple inheritance?
Does c++ support multilevel and multiple inheritance? Yes.
2012-02-02, 2662👍, 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, 2398👍, 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, 2399👍, 0💬

Tell how to check whether a linked list is circular C++
Tell how to check whether a linked list is circular C++ Create two pointers, each set to the start of the list. Update each as follows: while (pointer1) { pointer1 = pointer1-&gt;next; pointer2 = pointer2-&gt;next; if (pointer2) pointer2=pointer2-&gt;next ;if (pointer1 == pointer2) { pri...
2012-01-31, 2424👍, 0💬

Write a function that swaps the values of two integers, using int* as the argument type.
Write a function that swaps the values of two integers, using int* as the argument type. void swap(int* a, int*b) { int t; t = *a; *a = *b; *b = t; }
2012-01-31, 2421👍, 0💬

What is public, protected, private? C++
What is public, protected, private? C++ Public, protected and private are three access specifiers in C++. Public data members and member functions are accessible outside the class. Protected data members and member functions are only available to derived classes. Private data members and member func...
2012-01-30, 2562👍, 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, 2435👍, 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 #include "iostream.h" int main() { int MAX = 4; int total = 0; int average; int numb; for (int i=0; i&lt;MAX; i++) { cout &lt;&lt; "Please enter your input between 5 and 9: "; cin &gt;&gt; numb; while ...
2012-01-27, 2339👍, 0💬

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