Wikipedia

Search results

HP-hewlett packard

HP  Questions

This section consist of some aptitude and technical questions generally asked in written test:

a) Aptitude Questins with Answers

1. Lucia is a wonderful grandmother. Her age is between 50 and 70.Each of her sons have as many sons as they have brothers. Their combined number gives Lucia’s age. What is the age?

a) 60
b) 65
c) 64
d) 66

Answer: c
Explanation:
Let the no. of Lucia’s sons = n
No. of brothers for each son = n-1
No. of sons for each of Lucia’s son = n-1
Lucia’s age  = n-1 * n-1
    = a perfect square between 50 and 70
    = 64

2. Two trains running in opposite directions cross a man standing on the platform in 27 seconds and 17 seconds respectively and they cross each other in 23 seconds. The ratio of their speeds is:

a) 1 : 3
b) 3 : 2
c) 3 : 4
d) None of these

Answer: b

3. A train passes a station platform in 36 seconds and a man standing on the platform in 20 seconds. If the speed of the train is 54 km/hr, what is the length of the platform?

a) 240 m
b) 120 m
c) 300 m
d) None of these


Answer: a

4. A can do a work in 15 days and B in 20 days. If they work on it together for 4 days, then the fraction of the work that is left is:

a) 1/4
b) 1/10
c) 7/15
d) 8/15

Answer: d

5. On selling 17 balls at Rs. 720, there is a loss equal to the cost price of 5 balls. The cost price of a ball is:

a) Rs. 45
b) Rs. 50
c) Rs. 55
d) Rs. 60

Answer: d

6. Grass in lawn grows equally thick and in a uniform rate.It takes 40 days for 40 cows and 60 days for 30 cows to eat the whole of the grass.How many days does it take for 20 cows to do the same?

a) 125
b) 110
c) 120
d) 130

Answer: c
Explanation:
g - grass at the beginning
r - rate at which grass grows, per day
y - rate at which one cow eats grass, per day
n - no of cows to eat the grass in 96 days
   g + 40*r = 40 * 40 * y------- 1
   g + 60*r = 30 * 60 * y------- 2
   g + n*r = 20 * n * y-------- 3
   from 1 and 2
   r=10y g=120r
   from 3
   nr=120r
   Solving, n = 120

7. When a plot is sold for Rs. 18,700, the owner loses 15%. At what price must that plot be sold in order to gain 15%?

a) Rs. 21,000
b) Rs. 22,500
c) Rs. 25,300
d) Rs. 25,800

Answer: c

8. A, B and C can do a piece of work in 20, 30 and 60 days respectively. In how many days can A do the work if he is assisted by B and C on every third day?

a) 12 days
b) 15 days
c) 16 days
d) 18 days

Answer: 2

b) Technical Questions wih Answers

1. How many such pairs of letters are there in the word DISTURB, each one has as many letters between its two letters in the word as there are between them in the English alphabet?

a) 4
b) 5
c) 3
d) 2
e) None of these

Answer: a

2. What are the types of linkages?

a) Internal and External
b) External, Internal and None
c) External and None
d) Internal

Answer: b

3. Which of the following is not a type of constructor?

a) Copy constructor
b) Friend constructor
c) Default constructor
d) Parameterized constructor

Answer: b

4. If C and G interchange their positions, which of the following will indicate A’s position?

a) To the immediate right of G
b) 4th to the right of C
c) 2nd to the left of G
d) to the immediate left of C
e) none of these

Answer: d

5. Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1?

a) rem = 3.14 % 2.1;
b) rem = modf(3.14, 2.1);
c) rem = fmod(3.14, 2.1);
d) Remainder cannot be obtain in floating point division.

Answer: c

6. main( )
{
unsigned int i=3; freshersworld.com
while( i >=0)
printf( “%d”, i–);
}
how many times will the printf stmt be executed?

a) 0
b)3
c)4
d)infinite

Answer: d

7.  Which of the following type of class allows only one object of it to be created?

a) Virtual class
b) Abstract class
c) Singleton class
d) Friend class

Answer: c

8. Which of the following stores pictures or graphics?

a) Frame Buffer
b) Sdram
c) Mbr
d) Mar

9. Choose the odd man out

a) IDM
b) SIM
c) GSM
d) GPRS

10. Find the output of the following C program.

Main
{int x,j,k;
J=k=6;x=2;
X=j*k;
Printf(“%d”,x);

11. Which of the following is the correct size of a long integer?

a) Compiler dependent
b) 8 bytes
c) 4 bytes
d) 2 bytes

12. From the below mentioned option, which is not an IM client?

a) MSN
b) AOL
c) XINGC
d) JABBER

13. How much space does an IP Address occupies?

a) 8 bytes
b) 6 bytes
c) 16 bytes
d) 4 bytes

14. Choose the correct option, which cannot be used across Files?

a) Static
b) Volatile
c) Constant
d) Extern

15. Choose the odd man out:

a) TOMCAT
b) JBOSS
c) BLUESTONE
d) WEBSPHERE

c) Verbal Aptitude Questions

1. Choose the correct antonym of: ADEPT

a) Incompetent
b) Dexterous
c) Whiz
d) Savvy

2. Choose the correct synonym of : EDACITY

a) Aversion
b) Gluttony
c) Voraciousness
d) Relish

3. Choose the correct option which will be compulsory a part of the below given word.

Language

a) Words
b) Tongue
c) Writing
d) Slang

4. Complete the following series

CMM, EOO, GQQ, ? KUU

a) ITT
b) GRR
c) ISS
d) GSS

5. Express the following as rate percent.

1. 6
2. 0.004
3. 23/46

How many times should you role a dice to get the probability of number 4 and 6 being faced on the dices is divided at the same time?

a) 7/18
b) 6/19
c) 2/14
d) 1/15

6. How much loss will you incur if you bought a radio for 490 rupees and sold it for 465.50 rupees?

a) -5%
b) 5%
c) .5%
d) 0.5%

7. Find the average of 40 natural numbers that come first.

a) 15.5
b) 19.5
c) 19
d) 20.5

8. choose the correct option that represents the meaning of the proverb:
To cry wolf
a) To turn pale
b) To listen eagerly
c) To give false alarm
d) To keep off starvation

HP Technical Paper

1. Which of the following about the following two Declaration is true
i) int *F()
ii) int (*F)()
Choice:
a) Both are identical
b) The first is a correct declaration and the second is wrong
c) The first declaration is a function returning a Pointer to an Integer and the second is a pointer to function Returning int
d) Both are different ways of declaring pointer to a function
Answer: c

2. What are the values printed by the following program?
#define dprintf(expr) printf(#expr "=%d\n", expr)

main()
{
int x=7;
int y=3;
printf(x/y);
}

Choice:
a) #2 = 2 b) expr=2 c) x/y=2 d) none
Answer: c

3. Which of the following is true of the following program?

main ()
{
char *c;
int *p;
c =(char *)malloc(100);
p=(int *)c;
free(p);
}
Ans: The code functions properly releasing all the
memory
allocated


4. Output of the following.
main()
{
int i;
char *p;
i=0X89;
p=(char *)i;
p++;
printf("%x %x\n",p,i);
}
*
Ans: 0X8A

5. Which of the following is not a ANSI C language keyword?
Ans: Function.

6. When an array is passed as parameter to a function, which of the following statement is correct
Choice:
a) The function can change values in the original array
b) In C parameters are passed by value. The function cannot change the original value in the array
c) It results in compilation error when the function tries to access the elements in the array
d) Results in a run time error when the function tries to access the elements in the array
Answer: a

7. The type of the controlling expression of a switch statement cannot be of the type
a) Int
b) Char
c) Short
d) Float
e) None
Answer: d

8. What is the value of the expression (3^6) + (a^a)?

a) 3 b) 5 c) 6 d) a+18 e) None
Answer: b

9. What is the value assigned to the variable X if b is 7? X = b>8? b <<3: b>4? b>>1: b;

a) 7 b) 28 c) 3 d) 14 e) None
Ans: 3

10. Which is the output produced by the following program
main()
{
int n=2;
printf("%d %d\n", ++n, n*n);
}

a) 3, 6 b) 3, 4 c) 2, 4 d) cannot determine

Answer: b) 3,4

11. What is the output of the following program?
int x= 0x65;
main()
{
char x;
printf("%d\n",x);
}

a) Compilation error
b) 'A'
c) 65
d) Unidentified

12. What is the output of the following program?
main()
{
int a=10;
int b=6;

if(a=3)
b++;
printf("%d %d\n",a,b++);
}
a) 10, 6 b) 10, 7 c) 3, 6 d) 3, 7 e) none
Answer: d) 3,7

13. What can be said of the following program?
main ()
{
enum Months {JAN =1,FEB,MAR,APR};
Months X = JAN;
if(X==1)
{
printf("Jan is the first month");
}
}

a) Does not print anything
b) Prints: Jan is the first month
c) Generates compilation error
d) Results in runtime error

Answer: b

14. What is the output of the following program?
main()
{
char *src = "Hello World";
char dst[100];
strcpy(src, dst);
printf("%s",dst);
}
strcpy(char *dst,char *src)
{
while(*src) *dst++ = *src++;
}
a) "Hello World"
b)"Hello"
c)"World"
d) NULL
e) unidentified
Answer: d) NULL

15. What is the output of the following program?

main()
{
int l=6;
switch(l)
{ default : l+=2;
case 4: l=4;
case 5: l++;
break;
}
printf("%d",l);
}
a) 8 b) 6 c) 5 d) 4 e) none
Answer: c) 5

16. What is the output of the following program?
main()
{
int x=20;
int y=10;
swap(x,y);
printf("%d %d",y,x+2);
}
swap(int x,int y)
{
int temp;
temp =x;
x=y;
y=temp;
}

a)10, 20 b) 20, 12 c) 22, 10 d)10, 22 e)none
Answer: d) 10, 22

17. What is the output of the following problem?
#define INC(X) X++
main()
{
int X=4;
printf("%d",INC(X++));
}
a) 4 b) 5 c) 6 d) compilation error e) runtime error
Answer: d) compilation error

18. What can be said of the following?
struct Node {
char *word;
int count;
struct Node left;
struct Node right;
}

a) Incorrect definition
b) Structures cannot refer to other structure
c) Structures can refer to themselves. Hence the statement is OK
d) Structures can refer to maximum of one other structure
Answer :c)

19. What is the size of the following union?
Assume that the size of int =2, size of float =4 and size of char =1.
Union Tag{
int a;
flaot b;
char c;
};

a) 2 b) 4 c) 1 d) 7

20) What is the output of the following program? (has been used to indicate a space)
main()
{
char s[]="Hello,.world";
printf(%15.10s",s);
}

a) Hello, World...
b)....Hello,. or
c) Hello,. or....
d) None of the above

0 comments:

Post a Comment