HP Written Test Pattern

HP Written Test Pattern,selection Procedure and previously aksed questions with answers

40 Que on cse subjects

They mainly concentrated on

OS(Important),FAFL,DBMS,SS,UNIX(only 2 que),c++,Network(Basic)

20 Que on c.

20 Que on Aptitude+English+Logical

Aptitude

1. find the average of first 40 natural numbers?

Ans- 20.5.

2. A train  100 metres long takes 6 seconds to cross a man walking at 5 kmph in the   direction  opposite to that of the train. Find the speed of the train.?

Ans-55 kmph

3. In a game of 80 points; A can give B 5 points  and C 15  points. Then how many points  B can give C  in a game of 60 ?

Ans-8 points

4. A and B can do a piece of work in 18 days; Band C can do it in 24 days A and C can do it in 36 days. In how many days will A, Band C finish it together and separately?

Ans-144 days

5. The ratio between a two-digit number and the sum of the digits of that

number is 4 : 1.If the digit in the unit’s place is 3 more than the digit in the ten’s place, what is the number?

Ans-36.

6. Express each of the following as rate percent :

(i) 23/36                       (ii) 6 ¾             (iii) 0.004

7. Two dice are thrown together .What is the probability that the sum of the number on the two faces is divided by 4 or 6

Ans-7/18

8. If the a radio is sold for rs 490 and sold for rs 465.50.find loss%.

Ans-5%

Question (9-10) Choose the word that best completes the analogy.

9. . PLANE : AIRPORT :: SHIP :

A. Pier

B. Berth

C. Depot

D. Station

10.. INEPT : SKILL :: FLIMSY :

A. Power

B. Weight

C. Strength

D. Thickness

11. In the question below, there is a sentence of which some parts have been jumbled up. Rearrange these parts which are labelled P, Q, R and S to produce the correct sentence. Choose the proper sequence.

Since the beginning of history

P :        have managed to catch

Q :       the Eskimos and Red Indians

R :       by a very difficulty method

S :        a few specimens of this aquatic animal

The Proper sequence should be:

A.        QRPS

B.        SQPR

C.        SQRP

D.        QPSR

Ans-D

12. Choose the word which best expresses the meaning of the given word.

CANTANKEROUS

A.        Quarrelsome

B.        Rash

C.        Disrespectful

D.        Noisy

Ans-A

13. choose the word which is the exact OPPOSITE of the given words.

MORTAL

A.        Divine

B.        Immortal

C.        Spiritual

D.        Eternal

Ans-B

14. Each question consist of two words which have a certain relationship to each other followed by four pairs of related words, Select the pair which has the same relationship.

SYMPHONY:COMPOSER

A.        Leonardo:music

B.        Fresco:painter

C.        colours:pallet

D.        art:appreciation

Ans-B

15. question has an underlined word followed by four answer choices. You will choose the word that is a necessary part of the underlined word.

language

A.        tongue

B.        slang

C.        writing

D.        words

Ans-D

16. Fill the blank in the middle of the series or end of the series.

CMM, EOO, GQQ, _____, KUU

A.        GRR

B.        GSS

C.        ISS

D.        ITT

Ans-C
17. Find the statement that must be true according to the given information.

Vincent has a paper route. Each morning, he delivers 37 newspapers to customers in his neighborhood. It takes Vincent 50 minutes to deliver all the papers. If Vincent is sick or has other plans, his friend Thomas, who lives on the same street, will sometimes deliver the papers for him.

A.        Vincent and Thomas live in the same neighborhood.

B.        It takes Thomas more than 50 minutes to deliver the papers.

C.        It is dark outside when Vincent begins his deliveries.

D.        Thomas would like to have his own paper route.

Ans-A
18. The question presents a situation and asks you to make a judgment regarding that particular circumstance. Choose an answer based on given information.

Mrs. Carson took a taxi to meet her three friends for lunch. They were waiting for her outside the restaurant when she pulled up in the car. She was so excited to see her friends that she left her tote bag in the taxi. As the taxi pulled away, she and her friends took notice of the license plate number so they would be able to identify the car when they called the taxi company.

#1: The four women seem to agree that the plate starts out with the letter J.

#2: Three of them agree that the plate ends with 12L.

#3: Three of them think that the second letter is X, and a different three think that the third letter is K.

The four license plate numbers below represent what each of the four women thinks she saw. Which one is most likely the license plate number of the taxi?

A.        JXK 12L

B.        JYK 12L

C.        JXK 12I

D.        JXX 12L

Ans-A

19. Here are some words translated from an artificial language.

agnoscrenia means poisonous spider

delanocrenia means poisonous snake

agnosdeery means brown spider

Which word could mean “black widow spider”?

A.        deeryclostagnos

B.        agnosdelano

C.        agnosvitriblunin

D.        trymuttiagnos

Ans-C

20. Here are some words translated from an artificial language.

migenlasan means cupboard

lasanpoen means boardwalk

cuopdansa means pullman

Which word could mean “walkway”?

A.        poenmigen

B.        cuopeisel

C.        lasandansa

D.        poenforc

Ans-D

Questions on C

1. Find the output of the program

.main()

{

a=5;

if(a=1)}

{

printf(“d”,a);

}

2. Which of following is correct:

a)For loops can be nested

b)For Loops may use the same Index

c)For loops

Ans-a,c

3. Find the output

)#include

main()

{

int a=6,y=3,z;

float t=4.55;

z=a/y+t+a/y-t+a-2*t;

printf(“%d”,z);

}

a. 3

b. 3.00000

c. 3.55

d.none

Ans: D

4. Find the type of error when the program is compiled

).#include

#define int printf(“#int(intv)”);

main()

{

int x;

float g;

g=int x

printf(“————-“);

}

Ans: COMPIER ERROR

5. What will the following program print

Main ()

{

Static char a[3][4]={“abcd”,”mnop” ,”fghi”}

Putchar(**a);

}

a)will not compile successfully

b)prints a

c)prints m

d)prints garbage

Ans: b

6. Find the output

main()

{

Int i=100;

Int M();

Printf(“%d”,(*M)(i));

}

Int M(x)

Int x;

{

Printf(“%d”,++x);

}

a)prints 100

b)prints 101

c)prints error

d)prints 1013

7. Find the output

main()

{

Int i=7

If(0==fork())

I+=10;

Else

{

Wait(0);

Printf(“%d”,i);

}

}

a)i+=10 is executed by child only

b)i+=10 is executed by parent only

c)The child can start executing only after the termination of the parent process.

d)none of the above

8. # What will be printed as the result of the operation below:

main()

{

int x=20,y=35;

x=y++ + x++;

y= ++y + ++x;

printf(“%d%dn”,x,y);

}

9. # What will be printed as the result of the operation below:

int x;

int modifyvalue()

{

return(x+=10);

}

int changevalue(int x)

{

return(x+=1);

}

void main()

{

int x=10;

x++;

changevalue(x);

x++;

modifyvalue();

printf(“First output:%dn”,x);

x++;

changevalue(x);

printf(“Second output:%dn”,x);

modifyvalue();

printf(“Third output:%dn”,x);

}

Answer: 12 , 13 , 13

10. # WHat will be the result of the following code?

#define TRUE 0 // some code

while(TRUE)

{

// some code

}

Answer: This will not go into the loop as TRUE is defined as 0.

11. When we mention the prototype of a function?

A.   Defining

B.   Declaring

C.   Prototyping

D.   Calling

Ans-B

12. Which of the following range is a valid long double ?

A.    3.4E-4932 to 1.1E+4932

B.    3.4E-4932 to 3.4E+4932

C.    1.1E-4932 to 1.1E+4932

D.   1.7E-4932 to 1.7E+4932

Ans-A

13. How many bytes are occupied by near, far and huge pointers (DOS)?

A.   near=2 far=4 huge=4

B.   near=4 far=8 huge=8

C.   near=2 far=4 huge=8

D.   near=4 far=4 huge=8

Ans-A

14. In mathematics and computer programming, which is the correct order of     mathematical operators ?

Ans-B

15. Which of the following are unary operators in C?

1. !

2. sizeof

3. ~

4.&&

A 1, 2

B. 1, 3

C. 2, 4

D. 1, 2, 3

Ans-D

16. In which stage the following code

#include<stdio.h>

gets replaced by the contents of the file stdio.h

A.        During editing

C.        During execution

D.        During preprocessing

Ans-D

17. What does the following declaration mean?

int (*ptr)[10];

A.        ptr is array of pointers to 10 integers

B.        ptr is a pointer to an array of 10 integers

C.        ptr is an array of 10 integers

D.        ptr is an pointer to array

Ans-B

18. Which of the following operations can be performed on the file “NOTES.TXT” using the below code?

FILE *fp;

fp = fopen(“NOTES.TXT”, “r+”);

B.        Writing

C.        Appending

Ans-D

19. How will you print \n on the screen?

A.        printf(“\n”);

B.        echo “\n”;

C.        printf(‘\n’);

D.        printf(“\n”);

Ans-D

20. Which of the following function is used to find the first occurrence of a given string in another string?

A.        strchr()

B.        strrchr()

C.        strstr()

D.        strnset()

Ans-C

Questions on Computer

1. What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem? –

2. What is DRAM?

3. What is a Real-Time System?

4. While running DOS on a PC, which command would be used to duplicate the entire diskette?

Ans- Diskcopy

5. What is the difference between a ‘thread’ and a ‘process’?

6. What is Marshalling?

7. Explain Memory Partitioning, Paging, Segmentation.

8. Which of the following is a block device

A.     mouse

B.     printer

C.     terminals

D.     disk

E.      None of the above

Ans-D

9. The problem of thrashing is affected significantly by:

A.     program structure

B.     program size

C.     primary-storage size

D.     all of the above

E.      None of the above

Ans-A

10. Advantage(s) of using assembly language rather than machine language is (are):

A.     It is mnemonic and easy to read.

B.     Addresses any symbolic, not absolute

C.     Introduction of data to program is easier

D.     all of the above

E.      None of the above

Ans-D

11. When a computer is first turned on or restarted, a special type of absolute loader is executed, called a

E.      None of the above

Ans-C

12. Which, of the following checks, cannot be carried out on the input data to a system?

A.     consistency check

B.     Syntax check

C.     Range check

D.     All of the above

E.      None of the above

Ans-B

13. A public key encryption system

A.     allows anyone to decode the transmission

B.     allows only the correct sender to decode the data

C.     allows only the correct receiver to decode the data

D.     does not encode the data before transmitting it

E.      None of the above

Ans-C

14. Capacity planning

A.     requires detailed system performance information

B.     is independent of the operating system

C.     does not depend on the monitoring tools available

D.     is not needed in small installations

E.      None of the above

Ans-B

15. A form of code that uses more than one process and processor, possibly of different type, and that may on occasions have more than one process or processor active at the same time, is known as

A.     multiprogramming

D.     time sharing

E.      None of the above

Ans-B

16. Which command is used to copy all files having the string chap and any two characters after that to the progs directory?

A.     cp chap?? progs

B.     cp chap* progs

C.     cp chap[12] /progs/*.*

D.     cp chap?? /progs/*

E.      None of the above

Ans-A

17. Which of the following special shell variables is used to process number of the last background job?

A.     \$!

B.     \$#

C.     \$0

D.     \$*

E.      None of the above

Ans-A

18. Which of the following command addresses all users who are currently hooked on?

A.     write

B.     mail

C.     wall

D.     mesg

E.      None of the above

Ans-C

19. Which of the following command addresses all users who are currently hooked on?

A.     write

B.     mail

C.     wall

D.     mesg

E.      None of the above

Ans-C

20. The filed separator in cut command is specified with

A.     -a option

B.     -d option

C.     -r option

D.     -x option

E.      None of the above

Ans-B

21. What is a Database system?

22. What are the disadvantage in File Processing System?

23. What is an Entity set?

24. What is DDL (Data Definition Language)?

25. What is SDL (Storage Definition Language)?

26. A primary key should be defined as:

A.     NULL.

B.     NOT NULL.

C.     Either of the above can be used.

D.     None of the above are correct.

Ans-B

27. A station in a network forwards incoming packets by placing them on its shortest output queue. What routing algorithm is being used?

A.     hot potato routing

B.     flooding

C.     static routing

D.     delta routing

E.      None of the above

ANS-A

28. Frames from one LAN can be transmitted to another LAN via the device

A.     Router

B.     Bridge

C.     Repeater

D.     Modem

Ans-B

29. Which of the following condition is used to transmit two packets over a medium at the same time?

A.     Contention

B.     Collision

C.     Synchronous

D.     Asynchronous

E.      None of the above

Ans-B

30.Which of the following technique is used for Time-To-Line (TTL)?

A.        a technique used in best-effort delivery system to avoid endlessly looping     packets.

B.        a technique used by protocols in which a lower level protocol accepts a message from a higher level protocol and places it in the data portion of the low level frame

C.        One of the pieces that results when an IP gateway divides an IP datagram into smaller pieces for transmission across a network that cannot handle the original datagram size.

D.        All of the above

E.         None of the above

Ans-A

31. What command is used with vi editor to delete a single character?

A.     x

B.     y

C.     a

D.     z

E.      None of the above

Ans-A

32. A default catch block catches

A.     all thrown objects

B.     no thrown objects

C.     any thrown object that has not been caught by an earlier catch block

D.     all thrown objects that have been caught by an earlier catch block

Ans-C

33.Format flags may be combined using

A.     the bitwise OR operator (|)

B.     the logical OR operator (||)

C.     the bitwise AND operator (&)

D.     the logical AND operator (&&)

Ans-A

34. The generic type in a template function

A.     must be T

B.     can be T

C.     cannot be T for functions you create, but may be for C++’s built-in functions

D.     cannot be T

Ans-B

35. The number 5.5e3 is a _____ constant

A.     character literal

B.     named literal

C.     numeric literal

D.     string literal

Ans-C

36. Which of the following declares and initializes an Integer variable named numltems?

A.     int numltems = 0;

B.     int numltems = ‘0’;

C.      integer numltems = 0;

D.      numltems int = 0;

E.       numltems integer = 0;

Ans-A

37.Which of the following tells C++ to display numbers with two decimal places?

A.     setdecimal(2)

B.     setiosflags(2)

C.     setiosflags(2.00)

D.     setprecision(2)

Ans-D

38. Which of the following are never inherited?

A.     public data members

B.     constructor functions

C.     void functions

Ans-B

39.In the expression p –> val,p is a(n)

B.     pointer

C.     structure

Ans-B

40. You define a structure type globally because

A.     you save many lines of code by not rewriting an identical structure definition         in each function that uses it

B.     you will never change its definition

C.     it is required in C++

D.     all of the above

Ans-A