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




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?



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



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



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



A. Pier

B. Berth

C. Depot

D. Station



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



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


A.        Quarrelsome

B.        Rash

C.        Disrespectful

D.        Noisy



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


A.        Divine

B.        Immortal

C.        Spiritual

D.        Eternal



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.


A.        Leonardo:music

B.        Fresco:painter

C.        colours:pallet

D.        art:appreciation



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.


A.        tongue

B.        slang

C.        writing

D.        words



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

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.

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



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



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



Questions on C


1. Find the output of the program











2. Which of following is correct:

a)For loops can be nested

b)For Loops may use the same Index

c)For loops



3. Find the output




int a=6,y=3,z;

float t=4.55;




a. 3

b. 3.00000

c. 3.55



Ans: D


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


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



int x;

float g;

g=int x





5. What will the following program print

Main ()


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



a)will not compile successfully

b)prints a

c)prints m

d)prints garbage

Ans: b


6. Find the output



Int i=100;

Int M();




Int M(x)

Int x;




a)prints 100

b)prints 101

c)prints error

d)prints 1013


7. Find the output



Int i=7









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:




int x=20,y=35;

x=y++ + x++;

y= ++y + ++x;





Answer : 5794   


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


int x;

int modifyvalue()





int changevalue(int x)





void main()


int x=10;





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




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


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



Answer: 12 , 13 , 13


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


#define TRUE 0 // some code





// 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



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



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



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

A.        Addition, Subtraction, Multiplication, Division

B.        Division, Multiplication, Addition, Subtraction

C.        Multiplication, Addition, Division, Subtraction

D.        Addition, Division, Modulus, Subtraction



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

1. !

2. sizeof

3. ~


A 1, 2

B. 1, 3

C. 2, 4

D. 1, 2, 3



16. In which stage the following code


gets replaced by the contents of the file stdio.h

A.        During editing

B.        During linking

C.        During execution

D.        During preprocessing



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



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+”);

A.        Reading

B.        Writing

C.        Appending

D.        Read and Write



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

A.        printf(“\n”);

B.        echo “\n”;

C.        printf(‘\n’);

D.        printf(“\n”);



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()



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



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



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



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

A.     “Compile and Go” loader

B.     Boot loader

C.     Bootstrap loader

D.     Relating loader

E.      None of the above



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



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



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



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

B.     multi threading

C.     broadcasting

D.     time sharing

E.      None of the above



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



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



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



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




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




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.



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



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

A.     Router

B.     Bridge

C.     Repeater

D.     Modem



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



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



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



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



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 (&&)



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



35. The number 5.5e3 is a _____ constant

A.     character literal

B.     named literal

C.     numeric literal

D.     string literal



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;



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)



38. Which of the following are never inherited?

A.     public data members

B.     constructor functions

C.     void functions

D.     overloaded + operators



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

A.     address

B.     pointer

C.     structure

D.     header



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


Leave a Reply0

Your email address will not be published.