31. #include
using namespace std;
class base {
int b;
public:
base (int x) {
b = x;
cout << "Base";
};
};
class derived : public base
{
double d;
public:
derived(double x, int y);
d = x;
cout << " Derived";
};
int main () {
derived d(23.5, 10);
}
Answer: Compilation error: No appropriate base class constructor available
Explanation:Here is no explanation for this answer
Workspace
Commvault
32. What does the following statement result in?
Two processes want to write a file to a print spool area at the same time and both start writing. As the print spool area is of fixed size, it fills up before either process finishes writing its file, so both wait for more space to become available.
Answer: Deadlock
Explanation:Here is no explanation for this answer
Workspace
Commvault Global Edge
33. Which statement about thread synchronization is wrong?
Answer: Mutex object is to provide exclusive access to a resource and all the threads can belong to different processes.
Explanation:Here is no explanation for this answer
Workspace
Commvault Global Edge Societe Generale
34. Which statement about OS booting is wrong?
Answer: A hard reboot is restarting a computer under software control, without removing power or (directly) triggering a reset line.
Explanation:Here is no explanation for this answer
Workspace
Commvault
35. A computer program or routine is described as reentrant if the routine can be re-entered while it is already running. Which of the following conditions is not correct to be reentrant?
Answer: Can call non-reentrant computer programs or routines
Explanation:Here is no explanation for this answer
Workspace
Commvault
36. Assume single linked list pseudo code as follows?
struct Node {
data
next
}
record List {
Node firstNode
}
function1(List list) {
obsoleteNode = list.firstNode; list.firstNode = list.firstNode.next; free obsoleteNode;
}
function2(node node) {
obsoleteNode = node.next; node.next= node.next.next; free obsoleteNode;
}
function3(Node node,Node newNode) {
newNode.next = node.next;node.next= newNode
}
function4(List list, Node newNode) {
newNode.next = list.firstNode; list.firstNode = newNode;
}
Answer: function3 inserts newNode after node
Explanation:Here is no explanation for this answer
Workspace
Commvault Societe Generale SAP Labs Capgemini
37. Which of the following can a Dynamic Link Library contain?
Answer: Code, Data and Resources
Explanation:Here is no explanation for this answer
Workspace
Commvault
38. Which of the following is an invalid path for the following graph?
Answer: C D A C B A
Explanation:Here is no explanation for this answer
Workspace
Commvault
39. What is the output of the program?
#include
#include
void main()
{
char *pl= "word";
char *p2;
p2=(char*)malloc(10);
memset(p2, 'A', 10);
while(*p2++ = *pl++)
printf("%s ", p2);
}
Answer: AAAAAAAAA AAAAAAAA AAAAAAA AAAAAA
Explanation:Here is no explanation for this answer
Workspace
Commvault
40. What is the worst case performance of Selection sort algorithm?
Answer: O(n* n)
Explanation:Here is no explanation for this answer
Workspace
Commvault Societe Generale