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

Capgemini placement papers with solution

735.67K

Tot. Mock Test: 19


Total Qs: 483+

NA
SHSTTON
28
Solv. Corr.
110
Solv. In. Corr.
138
Attempted
0 M:0 S
Avg. Time

141 / 483

What will be the output of the program?

#include
#include

int main()
{
int *p;
p = (int *)malloc(20); /* Assume p has address of 1314 */
free(p);
printf("%u", p);
return 0;
}


A1314

BGarbage value

C1316

DRandom address

Answer: Option D

Explanation:

Here is no explanation for this answer

ShortCut By :: Devanand

Answer is  16953360

RANDOM VALUES

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
97
Solv. Corr.
94
Solv. In. Corr.
191
Attempted
0 M:54 S
Avg. Time

142 / 483

What will be output of the following "c" code?
#include<stdio.h> int main()
{
show();
return 0;
}
void show()
{
printf("I'm the greatest");
}

ACompier error: Type mismatch in redeclaration of show.

BI', the greatest

CLinker error

DNone of these

Answer: Option B

Explanation:

When the compiler sees the function show it doesn't know anything about it. So the default return type (ie, int) is assumed. But when the compiler sees the actual definition of show mismatch occurs since it is declared as void. Hence there will be a warning, if you have set treat warning as error then option A will be, else option B will be. Here Option B will be correct.

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
83
Solv. Corr.
125
Solv. In. Corr.
208
Attempted
0 M:58 S
Avg. Time

143 / 483

What is the output of 'C program'
#include<stdio.h> void main()
{
printf("%p",main);
}

ACompilation error

BGarbage Value

CSome address will be printed.

DNone of these

Answer: Option C

Explanation:

Function names are just addresses (just like array names are addresses). main() is also a function. So the address of function main will be printed. %p in printf specifies that the argument is an address. They are printed as hexadecimal numbers

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
168
Solv. Corr.
88
Solv. In. Corr.
256
Attempted
0 M:0 S
Avg. Time

144 / 483

What will be output of the following "c" code?
#include<stdio.h>
#define  max(a,b)  (a>b)? a:b
int  main()
{
int a,b; a=3; b=4;
printf("%d",max(a,b));
return 0;
}

A3

B4

C12

D0

ECompilation Error

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
497
Solv. Corr.
214
Solv. In. Corr.
711
Attempted
0 M:19 S
Avg. Time

145 / 483

What will be output of the following "c" code?
#include<stdio.h>
void main()
{
int i=5;
printf("%d",i+++++i);
}

A5

B6

CCompiler Error

D7

Answer: Option C

Explanation:

The expression i+++++i is parsed as i ++ ++ + i which is an illegal combination of operators.

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
59
Solv. Corr.
202
Solv. In. Corr.
261
Attempted
1 M:18 S
Avg. Time

146 / 483

What will be output of the following "c" code?
Note: 32 bit compiler

#include<stdio.h>
int main(){
    float **(*ptr)[4]=(float **(*)[4])0;
    ptr+=5;
    printf("%d  %d",ptr,sizeof ptr);
    return 0;
}

A0 2

B160 8

C40 2

D80 4

ECompilation error

Answer: Option D

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
346
Solv. Corr.
240
Solv. In. Corr.
586
Attempted
0 M:27 S
Avg. Time

147 / 483

Choose the correct option.

In Breadth First Search of Graph, which of the following data structure is used?


AStack.

BQueue.

CLinked List.

DNone of these.

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
361
Solv. Corr.
539
Solv. In. Corr.
900
Attempted
0 M:7 S
Avg. Time

148 / 483

Choose the correct option.

An algorithm is made up of two independent time complexities f (n) and g (n). Then the complexities of the algorithm is in the order of


Af(n) x g(n)

BMax ( f(n),g(n))

CMin (f(n),g(n))

Df(n) + g(n)

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

NA
SHSTTON
387
Solv. Corr.
146
Solv. In. Corr.
533
Attempted
0 M:49 S
Avg. Time

149 / 483

Choose the correct option.

Let S be the original stack and S1 and S2 the two additional stacks then the following pseudo code is to reverse the stack S:

while (S not empty)
{
push(S1,pop(S));
}

while(S1 not empty)
{
push(S2,pop(S1));
}

while(S2 not empty)
{
push(S,pop(S2));
} ?


ATRUE

BFalse

CNot Answer

Answer: Option A

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
144
Solv. Corr.
511
Solv. In. Corr.
655
Attempted
0 M:45 S
Avg. Time

150 / 483

What is the following code segment doing?
void fn( ){
char c;
cin.get(c);                   
if (c != '\n') {
fn( );
cout.put(c);
}
}

AThe string entered is printed as it is

BThe string entered is printed in reverse order.

CIt will go in an infinite loop.

DIt will print an empty line.

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution


Here is the list of questions asked in placement papers of Capgemini 2020 placement papers of Capgemini 2020. 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