Capgemini Placement Questions & Answers :: Capgemini

277.95K

Tot. Mock Test: 16


Total Qs: 224+

NA
SHSTTON
16
Solv. Corr.
13
Solv. In. Corr.
29
Attempted
0 M:0 S
Avg. Time

1 / 224

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
75
Solv. Corr.
36
Solv. In. Corr.
111
Attempted
0 M:14 S
Avg. Time

2 / 224

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
6
Solv. Corr.
26
Solv. In. Corr.
32
Attempted
1 M:18 S
Avg. Time

3 / 224

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
13
Solv. Corr.
35
Solv. In. Corr.
48
Attempted
0 M:24 S
Avg. Time

4 / 224

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

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

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
22
Solv. Corr.
24
Solv. In. Corr.
46
Attempted
0 M:54 S
Avg. Time

5 / 224

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

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

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
5
Solv. Corr.
27
Solv. In. Corr.
32
Attempted
0 M:0 S
Avg. Time

6 / 224

What is the output of the following 'C' program ?

#include
void main ()
{
const int x = 5;
const int *ptrx;
ptrx = &x;
*ptrx = 10;
printf("%d", x);
}


A5

BCompilation Error

C10

DGarbage value

Answer: Option B

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
7
Solv. Corr.
24
Solv. In. Corr.
31
Attempted
0 M:0 S
Avg. Time

7 / 224

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
10
Solv. Corr.
13
Solv. In. Corr.
23
Attempted
1 M:31 S
Avg. Time

8 / 224

When Rajeev was born, his father was 32 years older than his brother and his mother was 25 years older than his sister. If Rajeev's brother is 6 years older than Rajeev and his mother is 3 years younger than his father, how old was Rajeev's sister when Rajeev was born?


A15 Years

B7 Years

C17 Years

D10 Years

ENone of these

Answer: Option D

Explanation:

Here is no explanation for this answer

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
49
Solv. Corr.
18
Solv. In. Corr.
67
Attempted
0 M:0 S
Avg. Time

9 / 224

Choose the correct option.

The average salary of 3 workers is 95 Rs. per week. If one earns Rs.115 and second earns Rs.65 how much is the salary of the 3rd worker.


A285

B150

C105

D104

Answer: Option C

Explanation:

Lets assume three workers a a,b and c
Their average salary is (a+b+c)/3 = 95
=> a+b+c=285

a=115,
b=65
So c=285-115-65=105

Submit Your Solution

Tags: Capgemini

NA
SHSTTON
18
Solv. Corr.
13
Solv. In. Corr.
31
Attempted
0 M:0 S
Avg. Time

10 / 224

A 16 stored building has 12000 sq. feet on each floor. Company A rents 7 floors and company B rents 4 floors. What is the number of sq. feet of unrented floor space.


A6000

B60000

C132000

D50000

Answer: Option B

Explanation:

Given 16 floors building which each floor has 12000 sq.ft
so total space = 16*12000 is 192000.
11 floors are given for rent so 11*12000 ie 132000
so the unrented floor space is (192000-132000) = 60000

Submit Your Solution

Tags: Capgemini


Here is the list of questions asked in Capgemini Aptitude Test Question with Answers Capgemini Mock Test page 1. 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