[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Placement Questions & Answers :: Commvault

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

Tags:

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

Tags:

Commvault Global Edge 

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

Tags:

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

Tags:

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

Tags:

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

Tags:

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

Tags:

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

Tags:

Commvault Societe Generale