Accenture Placement Paper 2010What is the value of *second_ptr

1.

int *first_ptr;

int *second_ptr;

*second_ptr = 30;

ptr value = 1;

first_ptr = &value

second_ptr = first_ptr;

(A) 30

(B) 1

(C) first_ptr

(D) None of the above

2.What is the output of the program

void main()

{

int i,j,k;

i=2;

j=4;

k=i++>j&2;

printf("%d\n",k);

if(++k && ++i<--j|| i++)

{

j=++k;

}

printf(" %d %d %d",i,-j--,k);

getch();

}

A. 4,-3,2

B. 5,-3,2

c. 4,-2,2

D. 5,-2,2

D

Ans:

Output of the following program is

3.

main()

{

int i=0;

for(i=0;i<20;i++)

{

switch(i){

case 0:

i+=5;

case 1:

i+=2;

case 5:

i+=5;

default:

i+=4;

break;

}

}

}

(A) 5,9,13,17 (B) 12,17,22 (C) 16,21 (D) syntax error.

4.Find the approximate value of the following equation. 6.23% of 258.43 - ? + 3.11% of 127 = 13.87

1) 2

2) 4

3) 8

4) 6

5) 10

5.A train overtakes 2 persons walking at 3 km/hr and 5 km/hr respectively in the same direction and completely passes them in 8 seconds and 10 seconds respectively. Find the speed of the train.

1) 15 km/hr

2) 13 km/hr

3) 10 km/hr

4) 10 km/hr

5) None of these

6.The ratio between the radius and height of a cone is 3:4. What is the curved surface area of the cone?

1) 15p m2

2) 12p m2

3) 9p m2

4) Data inadequate

5) None of these

7.In a business P and Q invested amounts in the ratio 3:4, whereas the ratio between amounts invested by P and R was 6:7. If Rs 106501.50 was their profit, how much amount did Q receive?

1) Rs 40572

2) Rs 30429

3) Rs 35500.50

4) Rs 34629

5) None of these

8.A function ‘q’ that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as:

A)int (*q(char*)) []

B)int *q(char*) []

C)int(*q)(char*) []

D)None of the Above

9.Identify the correct argument for the function call fflush() in ANSI C:

A)stdout

B)stdin

C)stderr

D)All the above

10.Which of the Following will define a type NODE that is a node in a Linked list?

A)struct node {NODE*next;int x;};type def struct node NODE;

B)typedef struct NODE {struct NODE *next;int x;};

C)typedef struct NODE {NODE *next;int x;};

D)typedef struct {NODE *next;int x;}NODE;

11.Which of these statements are false w.r.t File Functions?

i)fputs() ii)fdopen() iii)fgetpos() iv)ferror()

A)ii B)i,ii C)iii D)iv

10.Study the code:

void show()

main()

{

show();

}

void show (char *s)

{

printf("%sn",s);

}

What will happen if it is compiled & run on an ANSI C Compiler?

A)It will compile & nothing will be printed when it is executed

B)it will compile but not link

C)the compiler will generate an error

D)the compiler will generate a warning

12.after 10 years A will be twice the age of B before 10 years.and now if the difference is 9 years between them then what is the age of B after 10 years

Ans 49

13.races and games ---- 2 questions from this chapter like (A beats B by 10 meters and B beats C by 15 metres the A beats C by )

14.in the year 1990 there are 5000 men 3000 women 2000 boys .in 1994 men are increased by 20% women are increased by ratio of boys and women (this type of question but some what difficult I mean it takes too much time to solve)

15.The equivalent compound ratio of 5:6::7:10::6:5 ( question of this type this is not exact question).

16.work can be done by 8 men and 10 women in 25 days, the same work can be done by 10 children and 5 women . in how many days 2 children and 3 men (similar to this)

17.One Cannot Take the address of a Bit Field

b.bit fields cannot be arrayed

c.Bit-Fields are machine Dependant

d.Bit-fields cannot be declared as static

Which of the Following Statements are true w.r.t Bit-Fields

A)a,b&c B)Only a & b C)Only c D)All

18.What is the function of ceil(X) defined in math.h do?

A)It returns the value rounded down to the next lower integer

B)it returns the value rounded up to the next higher integer

C)the Next Higher Value

D)the next lower value

19. A shopkeeper labels the price of article 15% above the cost price. If he allow Rs 51.20 discount on an article of Rs 1024, find his profit percent.

1) 10%

2) 8%

3) 12%

4) 9%

5) 9.25%

20.Which of the following numbers are completely divisible by 11?

A. 3245682

B. 283712

C. 438416

D. 36894

1) Only A

2) Only B

3) Only C

4) Only D

5) All are divisible