# Grapecity Technical Questions

Posted on :19-03-2016

Q1. Which is right way to call with integer argument I?

void quiz(int w)
{
if(w>1)
{ quiz (w/2);
quiz(w/2);
}
printf(“*”);
}

How many asterisks are printed by the function call quiz(5)?

a. 3
b. 4
c. 7
d. 8

Q2. What is the output?

void test_a (int n)
{
printf(“%d”,n);
if(n>0)
test_a(n-2);
}
test_a(4)?

a . 0 2 4
c. 0 2
d. 2 4
e. 4 2
f. 4 2 0

Q3. What is the output?

char string=”abcdefg”;
*string=;
printf(“%s”,string);

a. compiler error
b. run-time error
c. no o/p, but no error
d. creates bcdefg

Q4. What is the output?

char string=”abcdefg”
printf(“%s ”,string +3);

a. abcdefg
b. abc
c. defg
d. cdefg

Q5.

main()
{ int I=-3, j=2,k=0,m;
m=++I&&++j||++k;
printf(“ %d%d%D”, I,j,k,m);

a. –2 3 0 1
b. –2 3 1 1
c. –2 3 1 0
d. –2 3 0 0

Q6.
main()
{
int I;
for(;;)
{
printf(“%d”,I++)
if(I>10)
break;
}
}
a. condition in a for-loop is mudt
b. no error
c. 2 ; should be dropped

Q7. Which is the correct way to call go

void goop ( int z[]);//prototype
int x;

a. goop(x);
b. goop(x[]);
c. goop(x);
d. goop(&x);
e. goop(&x[]);

Q8. What is the output?

int a=3,b=17;
a=b%a;
b=++a+5;
printf(“a,b);

a. 2 8
b. 2 7
c. 3 7
d. 2 8
e. none

Q9. How many time shello will be printed?

FILE *fp=fopen(“test.txt”,w)
Fprintf(fp,”hello”);
Fork();

a. 1
b. 2
c. 0
d. none

Q10. What is the output?

int a;
int b=0;
while(a)
{
{ a&=a-1;
b++;
}
a &b

a. 0 & 15
b. 1 & 16
c. 0 & 16
d. none

Q20. What is the output?

class A
{
public:
static int a;
A() {a=10};
};
int main()
{
A b;
Printf(“%d”,b.a);
Return 0;
}

a. Yes
b. No

NUMERICAL ABILITY:

Q1. A salesman marks an item 60% above the cost price & offers 2 successive discounts of 25% & 15% on the marked price. His profit is:

a. 15%
b. 2%
c. 7.5%
d. 10
e. none

Q2. Had it been sold at 55% loss, SP would have been Rs. 10.80. The C.P is;

a. Rs 26
b. 28
c. 36
d. 24
e. none

Q3. If 18 men can build a wall 140 mtrs. In 42 days . In how many days can 15 men be able to construct a similar wall 100 mtrs . long?

a. 36
b. 60
c. 60
d. 33
e. none

Q4. Successive discounts of 15% & 20% on any goods amount to a total discount of :

a. 50 %
b. 35%
c. 34%
d.32 %
e. none

Q5. In a km race A beats B by 40 m or 7 secs. As time (in secs) over the cource is:

a.180
d. 280
e. 168
f. 175
g. none

Q6. A widow & a son are to receive Rs 20000 and Rs 10,000 respectively frm inheritance of Rs. 70,000. The rest is 2 be divide so that the widow recives 3/2 times as much of it as the son. Then the amount received by (widow,son) pei9r in thousands of rs. Is:

a. (44,26)
b. 42,28
c. 40,30
d. 45,30
e. none

Q7. The demand for a commodity linearly decreases by 0.5 unit for each unit increase in price & it vanishes when the price is set at 60 . The supply of the commodity vanishes when the price is set at 25 & equals the square root of the price in excess of this threshold price. Then the equilibrium at which the supply coincides with the demand is:

a. 45
b. 50
c. 55
d. 62+/-3 under-root86
e. none

Q8. gre type column questions:
area of triangle pqs is 45:
PQ=12 P

QR=20

Col. A : length of segment PS
COL. B: Length of SR

a. if A is greater
b. if B is greater
c. if both equal
d. d. cant determined

Q9. Col. A: (0.82)^2(0.82)^3
Col. B: (0.82)^6

Q10. t is a positive integer
4/7 = t/s

Col. A: s
Col. B: 7

Q11. Col. A 1-1/27
Col. B: 8/9+1/81

Q12. How many hrs. does it take 2 produce x units of o/p , with both m/cs A &B working together?

a. (4x +!)/4x
b. 5/4
c. 3/(5x)
d. 3/5

Q13. 4 more m/cs are installed with their capacities lying between those of m/cs A & B . Wchi of the following cant be the average no. of hrs. per m/c for producing x units of output?

a. 1.05
b. 1.15
c. 1.25
d. 1.35

Problem Solving (14-16)

Q14. if 0

a. s<-1 & t>0
b. s<-1 & t<-1
c. s>-1& t<-1
d. s>1 & t<-1
e. s>1 & t>1

Q15. To reproduce an old photograph , a photographer charges x dollars to make negative , 3x/5 dollars for each of the first 10 prints, & x/5 dollars for each print in excess of 10 prints . If \$45 is the total charge to make a negative & 20 prints from an old photograph, what is the values of x?

a. 3
b. 3,5
c. 4
d. 4.5
e. 5

Q16. A certain cake reciepe states that the cake should be baked in a pan 8 inches in diameter . If Jules want to make a cake of the same depth but 12 inches in diameter , by what factor shud he multiply the recipe ingredients?

a. 2 & half
b. 2 & one-fourth
c. 1 & half
d. 1 & 4/9
e. 1 & a/3

Data interpretation 17to23

ANALYTICAL ABILITY

A farmer plants only 5 diff. Vegetables-beans, corn, kale, peas& squash. Every year the farmer plants exactly 3 kinds of vegetables as follows:]
If the farmer plants corn, the farmer also plants beans that year.
If he plants kale 1 year, he does not plant it next year
In any year, farmer plants no more than one of the vegetable the farmer planted in the previous year.

Q17. Which of the following is possible combinations plant in 2 successive years?

a. beans, corn, kale,; corn, peas, squash
b. beans,corn,peas; beans,corn,squash
c. beans, peas,squash; beans,corn.kale
d. corn,peas, squash; beans,kale,peas
e. kale, peas, squash; beans, corn,kale

Q18. If he plants beans, corn & kale in 1st year , which must be planted in 3rd year?

a. beans, corn, kale
b. peas, corn & kale
c. beans, kale , peas
d. beans, peas, squash
e. kale, peas , squash

In a game exactly 6 inverted cups stand side by side ina straight line & each exactly has 1 ball hidden under it. The cups are numbered consecutively 1 thro 6. Each of the balls is painted a single solid color. The colors of the balls are green, magenta, orange ,purple,red & yellow. The balls have been hidden under following conditions:

The purple ball must be hidden under a lower-numbered cup than the original ball.
The red ball must be hidden under a cup immediately adjacent 2 the cup under which the magenta ball is hidden
The green ball must be hidden under cup 5.

Q19. Which of the following could be colors of balls from 1 to 6?

a. green, yellow, magenta,red, purple, orange
b. magenta, green , purple, red, orange, yellow
c. magenta, red , purple, yellow, green , orange
d. orange, yellow. Red, magenta, green, purple
e. red, purple, magenta, yellow, green, orange

Q20. If red ball is under cup4 ? howmany sequences are possibl;e

a. 0
b. 1
c. 2
d. 3
e. 4

Q21. Which is true?

a. green ball is under lower-numbered than the yellow ball.
b. orange ball is under lower-numbered than the green ball.
c. purple ball is under lower-numbered than the green ball.
d. purple ball is under lower-numbered than the RED ball.
e. Red ball is under a lower- numbered cup than the yellow ball

Q22. If red & orange ball are kept 0of adjacent to each other, how many valid sequences re possible?

a. 1
b. 2
c. 3
d. 4
e. 5

Q23. If the magenta is bill is under cup, 1 balls of which of the following colors must be under cops immediately adjacent to each other?

a. green & orange.
b. Green & yellow
c. Purple & red
d. Purple & yellow
e. Red & yellow

Q24. Karim is exactly twice as old as Rahim. Karims age 10 yrs. Ago was 2 times saleems present age.

a. saleem is 5 yrs. Younger than rahim
b. rahim is twice as old as saleem
c. saleem is the same age as rahim
d. saleem is 10 yrs. Younger than rahim

Q25. X & Y are +ve integers. The sum of X&Y is less then their product

a. atleast one of X & Y is not 1
b. both X & Y are greater than 2
c. neither takes value 1
d. atleast one of X & Y is greater than 2

Logical Reasoning

Q26. He greatest chance for the existence of extraterrestrial life is on a planet beyond our solar system. This is bcoz the Milky Way galaxy alone contains 100 billion other suns, many of which could be accompanied by planets similar enough to make them suitable abodes of life.
The argument above assumes which of following?

a. living creatures on another planet would probably have the same appearance as those on earth
b. life cannot exist on other planets in solar system
c. if the appropriate physical conditions exist, life is an inevitable consequence
d. more than one of the suns in the galaxy is accompanied by an earth like planet
e. it is likely that life on another plane would require conditions similar to those on earth

Register