[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.

latest placement papers of Capgemini

735.85K

Tot. Mock Test: 19


Total Qs: 483+

NA
SHSTTON
732
Solv. Corr.
1023
Solv. In. Corr.
1755
Attempted
0 M:0 S
Avg. Time

151 / 483

Choose the correct option.
Consider the following code segment in C to traverse a binary tree using the preorder

typedef struct tree {
int info;
struct  *left;
struct  *right;
}node;

void preorder(node *tree)
{
if (t)
{
Statementl
Statement2
Statement3
}
}
The above Statements should be

Apreorder(tree->right); preorder(tree->left); printf("%d", tree->info);

Bpreorder(tree->left); preorder(tree->right); printf("%d", tree->info);

Cpreorder(tree->left); printf("%d", tree->info); preorder(tree->right);

Dprintf("%d", tree->info); preorder(tree->left); preorder(tree->right);

Answer: Option D

Explanation:

Here is no explanation for this answer

Submit Your Solution

NA
SHSTTON
78
Solv. Corr.
65
Solv. In. Corr.
143
Attempted
0 M:39 S
Avg. Time

152 / 483

What will be output of the following "c" code?
void my_recursive_function(int n)
{
    if(n == 0)
    return;
    printf("%d ",n);
    my_recursive_function(n-1);
}
int main()
{
    my_recursive_function(10);
    return 0;
}

A10

B1

C10 9 8...1 0

D10 9 8...1

Answer: Option D

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
108
Solv. Corr.
147
Solv. In. Corr.
255
Attempted
0 M:30 S
Avg. Time

153 / 483

Choose the correct option.
 How will you find the maximum element in a binary search tree?

Case I:
public void max(Tree root)
{
while(root.left() != null) 
{
root = root.left();
}
System.out.println(root.data());
}

Case II:
public void max(Tree root)
{
while(root != null)
{
root = root.left();
}
System.out.println(root.data());
}

Case III:
public void max(Tree root)
{
while(root.right() != null)
{
root = root.right();
}
System.out.println(root.data());
}

Case IV:
public void max(Tree root)
{
while(root != null)
{
root = root.right();
}
System.out.println(root.data());
}

ACase I

BCase II

CCase III

DCase IV

Answer: Option C

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
33
Solv. Corr.
174
Solv. In. Corr.
207
Attempted
0 M:30 S
Avg. Time

154 / 483

Comment on the output of this C code?
#include <stdio.h>
    int main()
    {
        int a = 1;
        switch (a)
        case 1:
            printf("%d", a);
        case 2:
            printf("%d", a);
        case 3:
            printf("%d", a);
        default:
            printf("%d", a);
    }

ANo error, output is 1111

BNo error, output is 1

CCompile time error, no break statements

DCompile time error, case label outside switch statement

Answer: Option D

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
66
Solv. Corr.
31
Solv. In. Corr.
97
Attempted
0 M:22 S
Avg. Time

155 / 483

A NAND gate has


ALOW inputs and a HIGH output

BLOW inputs and a LOW output

CHIGH inputs and a HIGH output

DNone of these

 View Answer |  Submit Your Solution | Topic: Uncategorized| Asked In Capgemini |

Answer: Option A

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
20
Solv. Corr.
70
Solv. In. Corr.
90
Attempted
2 M:23 S
Avg. Time

156 / 483

Convert the following 211 decimal number to 8-bit binary?


A11011011

B11001011

C11010011

D11010011

 View Answer |  Submit Your Solution | Topic: Uncategorized| Asked In Capgemini |

Answer: Option D

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
301
Solv. Corr.
522
Solv. In. Corr.
823
Attempted
4 M:17 S
Avg. Time

157 / 483

What is the output of this 'C' Programe?
#include <stdio.h>
int main()
{
int i=12;
int *p =&i;
printf("%d\n",*p++);
}

AAddress of i++

B12

CGarbage value

DAddress of i

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

NA
SHSTTON
113
Solv. Corr.
19
Solv. In. Corr.
132
Attempted
1 M:46 S
Avg. Time

158 / 483

Consider the following iterative implementation to find the factorial of a number.

int main()
{
int n = 6, i;
int fact = 1;
for(i=1;i<=n;i++)
_________;
printf("%d",fact);
return 0;
}
Which of the following lines should be inserted to complete the above code?


Afact = fact + i

Bfact = fact * i

Ci = i * fact

Di = i + fact

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
51
Solv. Corr.
82
Solv. In. Corr.
133
Attempted
0 M:38 S
Avg. Time

159 / 483

Point out the error in the 'C' program?
#include<stdio.h>
 int main()
{
    char ch;
    int i;
    scanf("%c", &i);
    scanf("%d", &ch);
    printf("%c %d", ch, i);
    return 0;
}

AError: suspicious char to in conversion in scanf()

BError: we may not get input for second scanf() statement

CNo error

DNone of above

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
23
Solv. Corr.
74
Solv. In. Corr.
97
Attempted
0 M:0 S
Avg. Time

160 / 483

Choose the correct option.

For all integral values of n, the expression ((7^2n)-(3^3n)) is a multiple of:


A10

B31

C12

D22

Answer: Option D

Explanation:

As this equation should be divisible by a number for all Integral values, Assume n=1
(7^2)-(3^3) = 22
above equation is divisible by 22

Submit Your Solution

Tags: Capgemini


Here is the list of questions asked in placement question papers of Capgemini latest placement papers of Capgemini. Practice Capgemini Written Test Papers with Solutions and take Q4Interview Capgemini Online Test Questions to crack Capgemini written round test. Overall the level of the Capgemini Online Assessment Test is moderate. Only those candidates who clear the written exam will qualify for the next round, so practic all the questions here and take all the free tests before going for final selection process of Capgemini