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

Explain the ISA and HASA class relationships. How would you implement each in a class design?
Explain the ISA and HASA class relationships. How would you implement each in a class design? A specialized class "is" a specialization of another class and, therefore, has the ISA relationship with the other class. An Employee ISA Person. This relationship is best implemented with inheritance. Empl...
2012-03-19, 3291👍, 0💬

Which type conditional expression is used when a developer wants to execute a statement only once when a given condition is
Which type conditional expression is used when a developer wants to execute a statement only once when a given condition is met? 1) switch-case 2) for 3) if 4) do-while 5) while
2012-04-24, 3290👍, 0💬

Describe one simple rehashing policy.
Describe one simple rehashing policy. The simplest rehashing policy is linear probing. Suppose a key K hashes to location i. Suppose other key occupies H[i]. The following function is used to generate alternative locations: rehash(j) = (j + 1) mod h where j is the location most recently probed. Init...
2012-04-16, 3286👍, 0💬

What is C++?
What is C++? Released in 1985, C++ is an object-oriented programming language created by Bjarne Stroustrup. C++ maintains almost all aspects of the C language, while simplifying memory management and adding several features - including a new datatype known as a class (you will learn more about these...
2011-12-30, 3268👍, 0💬

How do you decide which integer type to use?
How do you decide which integer type to use? It depends on our requirement. When we are required an integer to be stored in 1 byte (means less than or equal to 255) we use short int, for 2 bytes we use int, for 8 bytes we use long int. A char is for 1-byte integers, a short is for 2-byte integers, a...
2012-03-05, 3249👍, 0💬

What is the use of ‘using’ declaration. C++
What is the use of ‘using’ declaration. C++ A using declaration makes it possible to use a name from a namespace without the scope operator.
2012-01-05, 3245👍, 0💬

What is the difference between Stack and Queue?
What is the difference between Stack and Queue? Stack is a Last In First Out (LIFO) data structure. Queue is a First In First Out (FIFO) data structure
2012-04-11, 3235👍, 0💬

Write the psuedo code for the Depth first Search.
Write the psuedo code for the Depth first Search. dfs(G, v) //OUTLINE Mark v as "discovered" For each vertex w such that edge vw is in G: If w is undiscovered: dfs(G, w); that is, explore vw, visit w, explore from there as much as possible, and backtrack from w to v. Otherwise: "Check" vw without vi...
2012-04-16, 3228👍, 0💬

Give 4 examples which belongs application layer in TCP/IP architecture?
Give 4 examples which belongs application layer in TCP/IP architecture? FTP, TELNET, HTTP and TFTP
2012-04-05, 3227👍, 0💬

Will it execute or not? C++
Will it execute or not? C++ void main() { char *cptr = 0?2000; long *lptr = 0?2000; cptr++; lptr++; printf(” %x %x”, cptr, lptr); }Will it execute or not? Answer1 For Q2: As above, won’t compile because main must return int. Also, 0×2000 cannot be implicitly converted to a pointer (I assume you mea...
2012-03-26, 3224👍, 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, 3216👍, 0💬

Does c++ support multilevel and multiple inheritance?
Does c++ support multilevel and multiple inheritance? Yes.
2012-02-02, 3205👍, 0💬

What is a modifier? C++
What is a modifier? C++ A modifier, also called a modifying function is a member function that changes the value of at least one data member. In other words, an operation that modifies the state of an object. Modifiers are also known as ‘mutators’. Example: The function mod is a modifier in the foll...
2011-12-30, 3186👍, 0💬

Referring to the sample code above, what is the displayed , output if the input string given were: "5 10 Sample Word 15 20"?
int I, j; string s; cin &gt;&gt; I &gt;&gt; j &gt;&gt; s &gt;&gt; s &gt;&gt; I; cout &lt;&lt; I &lt;&lt; " " &lt;&lt; j &lt;&lt; " "&lt;&lt; s &lt;&lt; " "&lt;&lt; I; Referring to the sample code above, w...
2012-04-23, 3185👍, 0💬

What can I safely assume about the initial values of variables which are not explicitly initialized?
What can I safely assume about the initial values of variables which are not explicitly initialized? It depends on complier which may assign any garbage value to a variable if it is not initialized.
2012-03-07, 3184👍, 0💬

I write a program in C++ that asks the user for names of students and their cooresponding midterm scores ...
I write a program in C++ that asks the user for names of students and their cooresponding midterm scores ... I write a program in C++ that asks the user for names of students and their cooresponding midterm scores, at the end, it displays each person, their average, gpa, class ave, total a's, b's, e...
2012-03-14, 3182👍, 0💬

What is an accessor? C++
What is an accessor? C++ An accessor is a class operation that does not modify the state of an object. The accessor functions need to be declared as const operations
2012-01-03, 3177👍, 0💬

What is encapsulation? C++
What is encapsulation? C++ Packaging an object’s variables within its methods is called encapsulation.
2012-02-07, 3174👍, 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, 3173👍, 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, 3170👍, 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, 3167👍, 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”; ? Answer1 a[] = “string”; char *p = “string”; The difference is this: p is pointing to a constant string, you can never safely say p[3]=’x'; however you can always say a[3]=’x'; char a[]=”string”; - character array init...
2012-03-08, 3165👍, 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, 3163👍, 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, 3132👍, 0💬

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