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

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

When does a name clash occur? C++
When does a name clash occur? C++ A name clash occurs when a name is defined in more than one place. For example., two different class libraries could give two different classes the same name. If you try to use many class libraries at the same time, there is a fair chance that you will be unable to ...
2012-01-04, 3365👍, 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, 3354👍, 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, 3354👍, 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, 3348👍, 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, 3347👍, 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, 3339👍, 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, 3326👍, 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, 3308👍, 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, 3299👍, 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, 3295👍, 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, 3293👍, 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, 3289👍, 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, 3274👍, 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, 3266👍, 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, 3264👍, 0💬

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

What is encapsulation? C++
What is encapsulation? C++ Packaging an object’s variables within its methods is called encapsulation.
2012-02-07, 3252👍, 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, 3252👍, 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, 3251👍, 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, 3249👍, 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, 3249👍, 0💬

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