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

Your manager has asked you to integrate an existing project
Scenario:- Your manager has asked you to integrate an existing project with an external timer. Her requirements include adding a global variable whose contents can be only read by the software but whose value will be continuously updated by the hardware clock. Referring to the above scenario, which ...
2012-04-26, 3138👍, 0💬

Referring to the sample code above, on which one of the following lines does an initializer list occur?
1: class Foo { 2: int size; string name; double value; 3: 4: public: 5: Foo() : size(0), name("unknown"), value(0.0) { 6: } 7: Foo(int s) { 8: size = s; name = "unknown"; value = 0.0; 9: } 10: Foo(int s = 0, string n = "unknown", double v=0) { 11: size = s; name = n; value = v; 12: } 13: }; Referrin...
2012-04-26, 2588👍, 0💬

What is the above sample code an example of?
class Foo; What is the above sample code an example of? 1) A class constructor 2) A class object instantiation 3) A class definition 4) A class declaration 5) A syntax error
2012-04-25, 2526👍, 0💬

What is the value of "count" immediately before the return statement above is executed?
int count=0; class obj { public: obj(){ count++; } ~obj() { count--; } }; main() { obj A,B,C,D ; return 0 ; } What is the value of "count" immediately before the return statement above is executed? 1) 0 2) 1 3) 2 4) 3 5) 4
2012-04-25, 2622👍, 0💬

If this is a complete translation unit, what can be said about the variable "MaxEntries"?
const int MaxEntries = 10; extern int entries[MaxEntries]; If this is a complete translation unit, what can be said about the variable "MaxEntries"? 1) It can only be used within the translation unit shown in the sample. 2) It cannot be used as a case value in a switch statement. 3) It becomes acces...
2012-04-24, 2630👍, 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, 2962👍, 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, 2840👍, 0💬

Referring to the sample code above, what is the type of T2 in the object ::f?
template&lt;class T = int&gt; class Foo { public: template&lt;class T2 = T&gt; class InnerFoo { T2 t2; }; static InnerFoo&lt;long&gt; *f; }; Foo&lt;double&gt; f; Referring to the sample code above, what is the type of T2 in the object ::f? 1) double 2) t2 3) char 4) i...
2012-04-20, 2565👍, 0💬

What values are be stored in 'a' after the above sample code is run if it is run on a system where pointers are two bytes lo
char a; char ca[] = {'a','e','i','o','u','y'}; char* pca = ca; pca += 2; a = *pca; What values are be stored in 'a' after the above sample code is run if it is run on a system where pointers are two bytes long? 1) a = 'u' 2) a = 'e' 3) a = 'i' 4) The code is illegal. Only a pointer can be added to a...
2012-04-20, 2606👍, 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, 2710👍, 0💬

Assuming that: char* p = "abc" int a = 123; .....
3. Assuming that: char* p = "abc"; int a = 123; Fully parenthesize the following expressions and evaluate them: *p++; *--p; *--p++; a--; ++a; ++a--;
2012-04-19, 3547👍, 0💬

Design and implement a String class that satisfies the following:
Design and implement a String class that satisfies the following: * Supports embedded nulls * Provide the following methods (at least) o Constructor o Destructor o Copy constructor o Assignment operator o Addition operator (concatenation) o Return character at location o Return substring at location...
2012-04-18, 2996👍, 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 & 0x00000001 ) cout &lt;&lt; i&lt;&lt;",";
2012-04-18, 2967👍, 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, 2700👍, 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, 2769👍, 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, 2963👍, 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, 2937👍, 0💬

What are the advantages and disadvantages of B-star trees over Binary trees?
What are the advantages and disadvantages of B-star trees over Binary trees? Answer1 B-star trees have better data structure and are faster in search than Binary trees, but it’s harder to write codes for B-start trees. Answer2 The major difference between B-tree and binary tres is that B-tree is a e...
2012-04-13, 4151👍, 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, 2731👍, 0💬

What is the difference between a Java application and a Java applet?
What is the difference between a Java application and a Java applet? The difference between a Java application and a Java applet is that a Java application is a program that can be executed using the Java interpeter, and a JAVA applet can be transfered to different networks and executed by using a w...
2012-04-12, 2494👍, 0💬

What is the software Life-Cycle?
What is the software Life-Cycle? The software Life-Cycle are 1) Analysis and specification of the task 2) Design of the algorithms and data structures 3) Implementation (coding) 4) Testing 5) Maintenance and evolution of the system 6) Obsolescence
2012-04-12, 2599👍, 0💬

Write a fucntion that will reverse a string.
Write a fucntion that will reverse a string. char *strrev(char *s) { int i = 0, len = strlen(s); char *str; if ((str = (char *)malloc(len+1)) == NULL) /*cannot allocate memory */ err_num = 2; return (str); } while(len) str[i++]=s[–len]; str[i] = NULL; return (str); }
2012-04-11, 2500👍, 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, 2931👍, 0💬

Name some major differences between C++ and Java.
Name some major differences between C++ and Java. C++ has pointers; Java does not. Java is platform-independent; C++ is not. Java has garbage collection; C++ does not. Java does have pointers. In fact all variables in Java are pointers. The difference is that Java does not allow you to manipulate th...
2012-04-10, 2571👍, 0💬

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