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

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, 2772👍, 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, 2765👍, 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, 2764👍, 0💬

What’s the meaning of ARP in TCP/IP?
What’s the meaning of ARP in TCP/IP? The "ARP" stands for Address Resolution Protocol. The ARP standard defines two basic message types: a request and a response. a request message contains an IP address and requests the corresponding hardware address; a replay contains both the IP address, sent in ...
2012-04-06, 2762👍, 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, 2761👍, 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, 2759👍, 0💬

How does throwing and catching exceptions differ from using setjmp and longjmp?
How does throwing and catching exceptions differ from using setjmp and longjmp? The throw operation calls the destructors for automatic objects instantiated since entry to the try block.
2012-03-15, 2757👍, 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, 2749👍, 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, 2746👍, 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, 2738👍, 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, 2732👍, 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, 2732👍, 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, 2729👍, 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, 2727👍, 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, 2725👍, 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, 2724👍, 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, 2721👍, 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, 2719👍, 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, 2712👍, 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, 2702👍, 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, 2702👍, 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, 2701👍, 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, 2693👍, 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, 2691👍, 0💬

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