HP:Aptitude


Aptitude Questions

General section 
Computer science general
c/c++ section
Java section 

The question paper had 48 questions to be answered in 1hr. Time will be quite sufficient. They have different sets of question papers. 

Some questions  are...................
1>General section : computer science general knowledge 

2> Computer science general: simple questions 

1) HP acquired this company in 2002. Which is the company
a)Compaq b)Dell c)option 3 d) Option4
Ans: a

2) what does 3G denote 
a) 3rd generation mobile communication b) 3rd generation computer languages c) option 3 d) option4
Ans: a

3)an application program that is used by the users to get the inofrmation from the backend of some application like databases:
a) application server b)proxy server c)database server d)option 4
Ans: database server  

4) which of the following is not true about the e-mail
a) it can be accessed by a client program using POP 
b) it can be accessed by a client program using imap protocol
c) option 3 
d) option 4


5) Some quesion regarding the company and who developed it ( the thing to remember is that Apple produce Macintosh computers).

5) What is X.25?
a)option 1 b)option 2 c)option 3 d)option 4
Ans: find out??:-)

3> c/c++ section: questions on c/c++, programs o/p etc.

1) 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
Ans: I think the answer is infinite, b'cos 'i' is an unsigned integer and it will not decrement below '0' and hence end up in an infinite loop.(yes, i checked and it is getting stuck in an infinite loop)

2) main( )
{
int x,y, z;
x=2;
y=5;
z= x+++y;
printf("%d %d %d", x, y z);
}
a)3 5 7 b)option 2 c)option 3 d)option 4
Ans: a

3) # define swap(a,b) temp=a; a=b; b=temp;
main( )
{ freshersworld.com 
int i, j, temp;
i=5;
j=10;
temp=0;
if( i > j)
swap( i, j );
printf( "%d %d %d", i, j, temp);
}
Ans: On compiling i got ans 10, 0, 0. I did not understand the concept. Please expalin this to me.

4>Java section: questions on java related stuff.

1) Java was initially code named as:
a)Oak b)green c)miller d)option4
Ans: Oak

2) what is not true about the following statements about java.
a) it is compiled using javac compiler
b) the compiled files have .class extension.
c) such files cannot be transfered from one comp to another.
d) they use the java interpreter freshersworld.com 
Ans: c

3) Why is the synchronize used?
a) to initialize multiple objects b)to lock an object c)option3 d)option 4
Ans: b (probably)
.................
. 
From 70s 80s Company producing
mouse,GUIs............a)Dell b)IBM c) Xerox d) HP


3)an application program that is used by the users to get the inofrmation from the backend of some application like databases:
a) application server b)proxy server c)database server d)option 4
Ans: database server 


8.Database quesns Stored procedures
Trigger strategy
9.Bandwidth measured in ?
10.Term assoc with Context Transaction


2)ICQ stands for ans)--------------------


class A
{
A(int x)
{
System.out.println(" x=" + x );
}
A(int x,int y)
{
System.out.println(" x=" + x + " y =" + y);
}
}
class HPTest4
{
public static void main(String args[])
{
A a=new A(1);
A b=new A(2,3);
A c=new A();
}
}

Another HP question paper


1. Which of the foll is not a protocol.

HTTP PIM PSI

A> PSI (check)

2> Which of the foll does not help security.

Good Password 
Update Antivirus
VLAN

A> VLAN

3> What was the prob with Intel Processor

Cache 
FPU 
NONE
A> FIND OUT AND LET ME KNOW

4> What does MIME stand for

A> Multipurpose Mail Exchange Protocol

5> What does XP stand for in WIN-Xp
A> Experience

6> Who is associated with C
A> Dennis Ritchie

7> Which of the foll is not a IM client

AOL
MSN
JABBER
XINGC
A> XINGC

8> What does ERP stand 4

A> Enterprise resource planning.

9> Who is associated with HOTMAIL

SABEER Bhatia and Jack Smith
SABEER Bhatia and Bill Gates

A>SABEER Bhatia and Jack Smith


10> What does UNIX stand 4???
Find out

11> Which of the foll is not a app server
BLUESTONE
WEBSPHERE
TOMCAT
JBOSS

A> BLUESTONE


GENERAL CSE Q's

12> What do u call software embbedded in ROM

BIOS
FIRMWARE
SHAREWARE
FREEWARE
A> BIOS (Verify and plz let me know)

13> What is semaphore used 4????

14> Integral Constraint helps in???

A> Solving Inconsitent Data prob.

15> PING uses

A> ICMP

16> IP ADDRESS occupies 
4 bytes
8 bytes
16 bytes
6 bytes

A> I wrote 8. correct ans 4

17> Which DataStructure helps Searching
STACK
LINKED LIST
HASH
A> HASH

18> Q on Binary tree Depth?
2^n
2^n - 1
log n

19> Database shud hav
A> ACID properties.

20> VPN stands 4
A> virtual private n/w

21> what does fork() return 2 parent
child pid
0
A> 0 


22> What do u call the relationship b/e a table and its columnz
A> Schema

12Q on c & c++

23> What is true about c++
A> IT can hav virtual constuctors

24> result of i=6; printf("%d",i++*i++)
36
54
cant say
A> Can't say (compiler dependent)


25> output of
char str[20] = "SANJAY"

printf("%d%d",sizeof(str),strlen(str))

ANS> 20,6

26> Which of the foll cannot b used accross files
extern
volatile
static
const
A> static. (i wrote volatile)

27> union u{ int i; char c;};
sizeof(u);
A> 4 (I got damm irritated when i read this q. I marked 4 and wrote UNDER UNIX next 2 the answer. How can such a dumb q which gives diff values under DOS and UNIX b asked????????????)


28> Idenitify err
5[[a]
5["abc"]
A> 5["abc"]

12Q on JAVA


29> Java alloctaes mem in
STACK 
HEAP
A> HEAP

30> Can u call Garbage collector explicitly

A> S . Find out the syntax. It was asked

31> What does this mean X = Y

A> Object X refers to the contents of Y.

32> Q on Null pointer Exception

33> Synchronize is used 4???

Another HP question paper

1. Which of the foll is not a protocol.

HTTP PIM PSI

A> PSI (check)

2> Which of the foll does not help security.

Good Password 
Update Antivirus
VLAN

A> VLAN

3> What was the prob with Intel Processor

Cache 
FPU 
NONE
A> FIND OUT AND LET ME KNOW

4> What does MIME stand for

A> Multipurpose Mail Exchange Protocol

5> What does XP stand for in WIN-Xp
A> Experience

6> Who is associated with C
A> Dennis Ritchie

7> Which of the foll is not a IM client

AOL
MSN
JABBER
XINGC
A> XINGC

8> What does ERP stand 4

A> Enterprise resource planning.

9> Who is associated with HOTMAIL

SABEER Bhatia and Jack Smith
SABEER Bhatia and Bill Gates

A>SABEER Bhatia and Jack Smith


10> What does UNIX stand 4???
Find out

11> Which of the foll is not a app server
BLUESTONE
WEBSPHERE
TOMCAT
JBOSS

A> BLUESTONE


GENERAL CSE Q's

12> What do u call software embbedded in ROM

BIOS
FIRMWARE
SHAREWARE
FREEWARE
A> BIOS (Verify and plz let me know)

13> What is semaphore used 4????


14> Integral Constraint helps in???

A> Solving Inconsitent Data prob.

15> PING uses

A> ICMP


16> IP ADDRESS occupies 
4 bytes
8 bytes
16 bytes
6 bytes

A> I wrote 8. correct ans 4

17> Which DataStructure helps Searching
STACK
LINKED LIST
HASH
A> HASH

18> Q on Binary tree Depth?
2^n
2^n - 1
log n

19> Database shud hav
A> ACID properties.

20> VPN stands 4
A> virtual private n/w

21> what does fork() return 2 parent
child pid
0
A> 0 


22> What do u call the relationship b/e a table and its columnz
A> Schema

12Q on c & c++

23> What is true about c++
A> IT can hav virtual constuctors

24> result of i=6; printf("%d",i++*i++)
36
54
cant say
A> Can't say (compiler dependent)


25> output of
char str[20] = "SANJAY"

printf("%d%d",sizeof(str),strlen(str))

ANS> 20,6

26> Which of the foll cannot b used accross files
extern
volatile
static
const
A> static. (i wrote volatile)

27> union u{ int i; char c;};
sizeof(u);
A> 4 (I got damm irritated when i read this q. I marked 4 and wrote UNDER UNIX next 2 the answer. How can such a dumb q which gives diff values under DOS and UNIX b asked????????????)


28> Idenitify err
5[[a]
5["abc"]
A> 5["abc"]

12Q on JAVA


29> Java alloctaes mem in
STACK 
HEAP
A> HEAP

30> Can u call Garbage collector explicitly

A> S . Find out the syntax. It was asked

31> What does this mean X = Y

A> Object X refers to the contents of Y.

32> Q on Null pointer Exception

33> Synchronize is used 4???

HCL:Aptitude Questions


Aptitude Questions

1. Which of the following involves  context switch,
(a) system call 
(b) priviliged instruction
(c)  floating poitnt  exception
(d) all the above
(e) none of  the above

Ans: (a)

2.  In OST, terminal emulation is done in
(a) sessions layer 
(b) application layer 
(c) presentation layer 
(d) transport  layer

Ans: (b)

3.  For 1 MB memory, the  number of address lines required,
(a)11 
(b)16 
(c)22 
(d) 24

Ans.  (b)

4. Semaphore is used for
(a) synchronization 
(b) dead-lock avoidence
(c) box 
(d) none

Ans. (a)

5. Which holds true for  the following statement
     class c: public A, public  B
a) 2 member in class A, B should not have same name
b)  2 member in class  A, C should not have same name
c) both 
d)  none

Ans. (a)

6.Preproconia.. does not  do which one of the following
(a) macro
(b) conditional  compliclation
(c) in type checking 
(d)  including load file
Ans. (c)

7. Piggy backing is a  technique for
a) Flow control 
b) Sequence 
c) Acknowledgement 
d)  retransmition
Ans. (c)

8. Given the following statement
      enum day = { jan = 1 ,feb=4, april,  may}
     What is the  value of may?
(a) 4 
(b) 5 
(c) 6 
(d) 11
(e)  None of the above

Ans (e)

9.  Find the output for the following C program
i=20,k=0;
for(j=1;j9 && Y++!=10 && Y++>10)
{printf("%d",  Y);
else 
printf("%d", Y);
} 

Ans.  13

12. Find the output for the following C program
f=(x>y)?x:y
a)  f points to max of x and y
b) f points to min of x and y
c)error

Ans. (a)

13. What is the sizeof(long  int)
(a) 4 bytes 
(b) 2 bytes 
(c) compiler dependent 
(d) 8  bytes
 
Ans: (a) or (c)

14.1.  a=2, b=3, c=6 
    Find the value of c/(a+b)-(a+b)/c
Ans : 0.3 or 3/10

15..  What does the hexanumber E78 in radix 7.
(a) 12455 
(b)  14153 
(c) 14256 
(d) 13541 
(e) 131112 

Ans. (d)

16.. 10 : 4 seconds :: ?  : 6 minutes

Ans.  900

17.. From the following statements determing  the order of ranking 
� M has double the amount as D 
� Y  has 3 rupess more than half the amount of D 
Ans. Data insuffiecient

Questions  18 - 22 are to be answered on the following data 
� A causes  B or C, but not both 
� F occurs only if B occurs 
� D occurs  if B or C occurs 
� E occurs only if C occurs 
� J occurs  only if E or F occurs 
� D causes G,H or both 
� H occurs  if E occurs 
� G occurs if F occurs 
18. If A occurs  which of the following must occurs
I.  F and G
II. E  and H
III. D
(a) I only
(b) II only 
(c) III only 
(d) I,II, & III
(e) I & II (or) II & III but  not both
Ans. (e)

19. If B occurs which must occur
(a) D 
(b)  D and G 
(c) G and H 
(d) F and G 
(e) J
Ans. (a)

20.  If J occurs which must have occured
(a) E 
(b) either  B or C 
(c) both E & F 
(d) B 
(e) both B & C
Ans. (b)

21.  Which may occurs as a result of cause not mentioned
I. D 
II. A 
III. F
(a) I only 
(b) II only 
(c)  I & II 
(d) II & III 
(e)  I,II & III
Ans. (c)
22. E  occurs which one cannot occurs
(a) A 
(b) F 
(c) D 
(d) C 
(e) J 
Ans.  (b)
[ Draw table and see ] 

23.A man fixed an appointment to meet the manager, Manager asked him to come two days after the day before
  the day after tomorrow. Today is Friday. When will the manager expect him? (repeated from previous papers) 
 Ans: Monday 
[Don't confuse it with Tuesday.the correct answer is Monday]
 
24.A man said he spent 1/6 of his as a child, 1/12 as salesman in a liquor shop, 1/7 and 5 years as a politician
  and a good husband respectively. At that time Jim was born. Jim was elected as Alderman four years back.when he 
  was half of his age. What is his age? (repeated from previous papers) 
 
Ans: 84 years 
 
     [Assume that he lived x years. 
      X/6 + x/12 + x/7 + 5 + 4 + x/2 = x. Solving x= 84, Same as Question in Shakundala Devi book]
 
25.Jack,Doug and Ann, 3 children had a running race while returning from school.Mom asked who won the race.
  Then Jack replied" I wont tell u.I wil give u a clue,When Ann takes 28 steps Doug takes 24 steps, meantime
  I take 21 steps. Jack explained that his 6 steps equals Droug's 7 steps and Ann's 8 steps. Who won the race? (repeated from previous papers) 
 
Ans: Doug 
 
[ Ann steps = 8,16,24,28 --- finished by 3 & half full steps 
  Doug steps=7,14,21,24 --- finished before 3 & half full steps
  Jack steps= 6,12,18,21 --- finished  by 3 & half full steps
  So Doug won the race ]
 
26. Every day a cyclist meets a car at the station.The road is straight and both are travelling in the same direction. 
   The cyclist travels with a speed of 12 mph.One day the cyclist comes late by 20 min. and meets the car 5miles before
   the  Station. What is the speed of the car?
 
Ans: 60 mph 
 
[Very similar to Shakuntala Devi puzzles to puzzle you problem no: 38 ] 
 
 
27.A lady goes for shopping. She bought some shoestrings. 4 times the number of shoestrings, she bought pins and 8 times,
  handkerchiefs. She paid each item with their count as each piece's cost. She totally spent Rs. 3.24.How many handkerchiefs
  did she buy? (repeated from previous papers) 
 
28. Complete the series : 
 
a)      3,6,13,26,33,66,____(repeated from previous papers) 
b)      364,361,19,16,4,1,___( "                    "                "    )
 
Ans :  a) 63 
          b) 1



29. 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?

Ans: 64

30.There are two towers A and B. Their heights are 200ft and 150ft respectively and the 
foot of the towers are 250ft apart. Two birds on top of each tower fly down with the same 
speed and meet at the same instant on the ground to pick a grain. What is the distance 
between the foot of tower A and the grain?
 
Ans:90ft

31. 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?

Ans: 120

32. Four tourists A,B,C,D and four languages English, German, French and Italian.
They are not able to converse among themselves in one language.
Though A does not know English he can act as an interpreter between B and C.
No one spoke both French and German. A knows German and was able to converse with D 
who doesn�t know a word in German. Only one language was spoken by more than two persons.
Each spoke two languages. Find who spoke what.

Ans : A- German,Italian
      B- French,Italian
      c- German,English
      D- Italian,English



33. There is a five digit number. It has two prime digits (1 is not a prime number).
Third digit is the highest. Second digit is the lowest. First digit is one less 
than the third digit. The fifth digit is half of the fourth. The sum of 4th and 5th is 
less than the first. Find the number.

Ans � 71842

34.    Four persons A, B, C and D are playing cards. Each person has one card, laid down 
on the table below him, which has two different colours on either side.
No card has the same color on both sides. The colours visible on the table are Red, 
Green, Red and Blue respectively. They see the color on the reverse side and give the 
following comment.
 
A: Yellow or Green
B: Neither Blue nor Green
C: Blue or Yellow
D: Blue or Yellow
 
Given that out of the 4 people 2 always lie find out the colours on the cards each person.

Ans: A- Yellow
     B- Yellow
     C- Green
     D- Red
 
35.    A 1 k.m. long wire is held by n poles. If one pole is removed, the length of the gap 
       becomes 12/3m. What is the number of poles initially?
 

Ans:6km

36.    Find the digits X,Y,Z
            X  X  X  X
            Y  Y  Y  Y  +
            Z  Z  Z  Z
           --------------
          Y  X  X  X  Z
          ----------------
Ans:   X Y Z
       9 1 8

37.  A man starts walking at 3 pm . ha walks at a speed of  4 km/hr on level ground and at a speed of 
     3 km/hr on uphill , 6 km/hr downhill and then 4 km/hr on level ground  to reach home at 9 pm. 
     What is the distance covered on one way?
      
Ans: 12 km
   
38.   A grandma has many sons; each son has as many sons as his brothers. What is her age if it�s the product
     of the no: of her sons and grandsons plus no: of her sons?(age b/w 70 and 100).  

Ans: 81 
 
39.   An electric wire runs for 1 km b/w some no: of poles. If one pole is removed the distance b/w each pole 
     increases by 1 2/6  (mixed fraction). How many poles were there initially?
  
40.   There is a church tower 150 feet tall and another catholic tower at a distance of 350 feet from it which 
     is 200 feet tall. There is one each bird sitting on top of both the towers. They fly at a constant speed 
     and time to reach a grain in b/w the towers at the same time. At what distance from the church is the grain?
  
Ans: 90 
  
41. A person wants to meet a lawyer and as that lawyer is busy he asks him to come three days after the before day 
    of the day after tomorrow? on which day the lawyer asks the person to come?

ans: thursday

42. A person is 80 years old in 490 and only 70 years old in 500 in which year is he born?

ans: 470

43.A person says that their speed while going to a city was 10mph however while returning as there is no much
   traffic they came with a speed of 15mph. what is their average speed?

ans: 12mph

45. There is a peculiar island where a man always tells truth and a women never says two 2 consecutive truth
    or false statements that is if she says truth statement then she says false statement next and vice versa.
    A boy and girl also goes in the same way. one day i asked a child " what r u a boy or a girl" however the 
    child replied in their language that i dint understand but the parents knew my language and one parent replied 
    that " kibi is a boy" the other one said that "no kibi is a girl, kibi lied".
          a: is kibi a boy or a girl
          b: who ansered first mother or father?

ans: kibi is a girl and mother answered first.

46.  The boy goes to school reaches railway station at his 1/3 of his journey& mill at 1/4 of his journey the time
     taken him to walk between railway station & mill is 5 mins. Also he reaches railway station at 7.35amwhen he 
     started from house& when he reaches school?

Ans: 7:15to8.15

47. if a person is sitting in a exam having 30 questions (objective type)
the examiner use the formula to calculate the score is S=30+4c-w here c is number
of correct answer and w is number of wrong answer , the examiner find the score
is more than 80, tell how may questions are correct ? if the score is little less
but still more than 80 then u wont be able to answer.

ans :- 16


48. if a person having 1000 rs and he want to distribute this to his five children 
in the manner that ecah son having 20 rs more than the younger one , what will
be the share of youngest child 

ans- 160

49.raju having some coins want to distribute to his 5 son , 5 daughter and driver
in a manner that , he gave fist coin to driver and 1/5 of remaining to first
son he again gave one to driver and 1/5 to 2nd son and so on....
at last he equally distributed all the coins to 5 daughters.
how many coins raju initially have??? 

ans:-881

50. if ravi binded his book and the binder cut the pages of the book , ravi 
decided to mark the pages by himself own , what he found that number of three
appears 61 times find of number of pages answer 

ans - 300


51. a painter went in a exhibition to purchases some pictures where T,U,V,W,X,Y,Z 
pictures were remaining , he want to buy only five in the condition on that 
if T is there then X should not be there, 
if U is there than y should be there
if if v is there then X should be there

which is the combination the painter can have
(a) T,U,V,W,Y
(b)T,Z,U,W,X
(c)T,X,U,V,W
(d)T,U,Y,W,Z 

ans (d)

52.There are 100 men in town. Out of which 85% were married, 70% have a phone, 75% own a car, 80% own
   a house. What is the maximum number of people who are married, own a phone, own a car and own a house ? ( 3 marks) 

Sol: 15% 
  
53. There are 10 Red, 10 Blue, 10 Green, 10 Yellow, 10 White balls in a bag. If you are blindfolded
   and asked to pick up the balls from the bag, what is the minimum number of balls required to get a 
   pair of atleast one colour ? ( 2 Marks) 

Sol :6 balls.
  
54. Triplet who usually wear same kind and size of shoes, namely, Annie, Danny, Fanny. Once one of them
  broke a glass in kitchen and their shoe prints were there on floor of kitchen. When their mother asked 
  who broke Annie said, �I didn�t do it�; Fanny said �Danny did it�; Danny said �Fanny is lieing�;
  here two of them are lieing, one is speaking truth. Can you find out who broke it ? (3 Marks) 

Sol : Annie
  
55. 4 players were playing a card game. Cards had different colours on both sides. Neither of cards had
 same colour on both sides. Colours were 2 Red, 2 Blue, 2 Green, 2 Yellow. Cards were lying in front of
 each player. Now, each player knew the colour on other side of his card. They are required to tell their colour. 
Statement given by each of them was :
 Annie : Blue or Green
 Bobby : Neither Blue nor Green
 Cindy : Blue or Yellow
 Danny : Blue or Yellow
  colours of cards that are visible to all were Red, Blue, Green, Blue in order of their names.
  Exactly two of them are telling truth and exactly two of them are lieing. Can you tell the colour
  on other face of card for each player ? (6 Marks)

Sol : Annie : Yellow (Lieing)
 Bobby : Yellow (Telling truth)
 Cindy : Blue (Telling truth)
 Danny : Green (Lieing)
  
56. In a game i won 12 games, each game if i loose i will give u one chocolate, You have 8 chocolates how
    many games played.

Ans : 32

57. 75 persons Major in physics, 83 major in chemistry, 10 not at major in these subjects
     u want to find number of students majoring in   both subjects

Ans 68.

58. if A wins in a race against B by 10 mts in a 100 Meter race. If  B is behind of A by 10 mts.
    Then they start running race, who will won?

Ans A

59. A+B+C+D=D+E+F+G=G+H+I=17
    given A=4.Find  value of G and H?
  
Ans : G = 5 E=1

60. One guy has Rs. 100/- in hand. He has to buy 100 balls. One football costs Rs. 15/, One Cricket ball
    costs Re. 1/- and one table tennis ball costs Rs. 0.25 He spend the whole Rs. 100/- to buy the balls. 
    How many of each balls he bought? 

ans :F=3,T=56,C=41
  

61. The distance between Station Atena and Station Barcena is 90 miles. A train starts from Atena towards 
     Barcena. A bird starts at the same time from Barcena straight towards the moving train. On reaching the
    train, it instantaneously turns back and returns to Barcena. The bird makes these journeys from Barcena to 
    the train and back to Barcena continuously till the train reaches Barcena. The bird finally returns to Barcena and rests. Calculate the total distance in miles the bird travels in the following two cases:  
    (a) The bird flies at 90 miles per hour and the speed of the train is 60 miles per hour.  
    (b) the bird flies at 60 miles per hour and the speed of the train is 90 miles per hour 

Ans: time of train=1hr.so dist of bird=60*1=60miles


62. A tennis championship is played on a knock-out basis, i.e., a player is out of the tournament when
    he loses a match. 
           (a) How many players participate in the tournament if 15 matches are totally played?  
           (b) How many matches are played in the tournament if 50 players totally participate? 

Ans:  (a)16
      (b)49

63.When I add 4 times my age 4 years from now to 5 times my age 5 years from now, I get 10 times my 
   current age. How old will I be 3 years from now?   

Ans:Age=41 years.

64.A rich merchant had collected many gold coins. He did not want anybody to know about them.
   One day, his wife asked, "How many gold coins do we have?" After pausing a moment, he replied,
   "Well! If I divide the coins into two unequal numbers, then 37 times the difference between the
   two numbers equals the difference between the squares of the two numbers."  The wife looked puzzled.
    Can you help the merchant's wife by finding out how many gold R

Ans:37

66. A set of football matches is to be organized in a "round-robin" fashion, i.e., every participating
    team plays a match against every other team once and only once.  If  21 matches are totally played,
    how many teams participated? 

Ans :7

66. Glenn and Jason each have a collection of cricket balls. Glenn said that if Jason would give him
     2 of his balls they would have an equal number; but, if Glenn would give Jason 2 of his balls, 
     Jason would have 2 times as many balls as Glenn. How many balls does Jason have? 

Ans: 14

67.  Suppose 8 monkeys take 8 minutes to eat 8 bananas. 
       a) How many minutes would it take 3 monkeys to eat 3 bananas? 
      (b) How many monkeys would it take to eat 48 bananas in 48 minutes      

Ans: a)48
     B)6

68.  It was vacation time, and so I decided to visit my cousin's home. What a grand time we had!
     In the mornings, we both would go for a jog. The evenings were spent on the tennis court. Tiring 
     as these activities were, we could manage only one per day, i.e., either we went for a jog or played
     tennis each day. There were days when we felt lazy and stayed home all day long. Now, there were 12
     mornings when we did nothing, 18 evenings when we stayed at home, and a total of 14 days when we jogged 
     or played tennis. For how many days did I stay at my cousin's place? 

Ans : 22 days

69   A 31" x 31" square metal plate needs to be fixed by a carpenter on to a wooden board. The carpenter
      uses nails all along the edges of the square such that there are 32 nails on each side of the square.
      Each nail is at the same distance from the neighboring nails. How many nails does the carpenter use?  

Ans :124

70. Given that  A,B,C,D,E each represent one of the  digits between 1 and 9 and that the  following multiplication holds:
    A B C D E
              X 4
    --------------
    E  D C B A
    --------------      what digit does E represent ?
   a) 4
  b)  6
  c)  8                                                                                                       
   d) 7
 Ans: c
71. (16)HCL  prototyping machine can make 10 copies every 4 seconds. At this  rate, How many  copies can the machine make in 6 min.?
  a)  900
  b) 600
  c)  360
  d) 240
  e) 150
Ans:  a

72.(18)10^2(10^8+10^8) =--------------  10^4 
    a) 2(10)^4
   b) 2(10)^6
   c) 10^8
   d)  2(10)^8                                                                                            
    e)  10^10 
 
Ans: b

73.Worker W  produces n units in 5 hours. Workers V and W,  workers independently but at  the same time, produce n units in  2 hours.
how long would it take V alone to  produce n units?
       a)  1 hr 26 min
       b) 1 hr 53 min
       c)  2 hr 30 min
       d) 3 hr 30 min
       e)  3 hr 20 min
Ans:  d     
74.. 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

 Ans : d) compilation error

75. 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
 Ans  :c)

76. 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
   
Ans : a) 10,6

77. 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
           
Ans: b) Prints  :  Jan..

78. 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++;
                         }
                       ) "Hello World"  b)"Hello" c)"World" d) NULL e) unidentified

Ans: d)  NULL
.  
79.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
Ans :  a) 8

80.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
Ans:b)20,12
81. 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 declaraion 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 declarin pointer  to a function 
     Ans : c) 

82. What  are the values printed by the following  program?                                            
          #define  dprint(expr) printf(#expr "=%d\n",expr)
          main()
             {
               int x=7;
              int y=3;
               dprintf(x/y);
          }
          Choice:
            a) #2 = 2 b)  expr=2 c) x/y=2 d) none
  Ans: c)x/y=2

83. Which  of  the following is true of the following program
        main()
             {
             char *c;
              int  *p;
             c =(char *)malloc(100);
              ip=(int  *)c;
             free(ip);
            }
   Ans: The code  functions properly releasing  all the memory allocated

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

85. which  of the following is not a ANSI C language keyword?  ans:Function.

86. 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 funciton cannot  change the  original value in  
           the array 
       c) It results in compilation  error when the function tries toaccess the elements in the array
        d)  Results in a run time error when the funtion tries to access  the elements in the  array
        Ans: a) 

87. 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
        Ans : d)float

88. What  is the value of the expression (3^6) + (a^a)?
     a) 3      b) 5    c) 6      d) a+18       e) None
      Ans : 5
89.  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: c)
Questions 90-94
Six knights - P,Q,R,S,T  and U - assemble for a long journey in Two  ravelling parties.  For security, each travellingparty Consists of at least two  knights.  
The two parties travel by separate routes, northern and southern.  After  one month, the routes of the northern and southern groups  converge for a brief 
 time and at that point the knights can, if  they wish, rearrange their travelling  parties before continuing,  again in two parties along separate northern and  
southern routes.  Throughout the entire trip, the composition of traveling  parties  must be in accord with the following conditions P and R are deadly  enemies 
and, although they may meet briefly,can never travel together.  p must  trave in the same party with sQ cann't travel by the southern  route U cann't  change. 

90. If  one of the  two parties of knights consists of P and U and two  other knights and travels by  the southern route,the other members  of this party besides P and U must  be
    a) Q and S
     b) Q and  T                                                                                                             
     c) R and S
    d) R and T
    e) S and T 
     Ans:  e

91.If each of the  two  parties of knights consists of exactly three members, which of the  following  is not a possible  travelling party and route?
   a)  P,S,U by the northern  route
   b) P,S,T by the northern route
   c)  P,S,T by the southern  route
   d) P,S,U by the southern  route
   e) Q,R,T by the southern route 
   Ans: b

92.If one of the  two parties of knights consists  of U and two other knights and travels by the  northern route,  the other memnbers of this party besides
    U must be
   a) P  and S
   b) P and T
   c) Q and R
   d) Q and  T                                                                                             
   e)  R and T 
    Ans: c
93.If each of the  two parties of knights consists of exactly  three members of different parties,  and R travels by the northern  route,then T must travel by the
a) southern  route with P and  S
b) southern route with Q and R
c) southern route with R  and U
d) northern route with Q and R
e) northern route with  R and U 
Ans: a

94.if,  when the  two parties of knights encounter one another after a  month, exactly one knight  changes from  one travelling party  to the other travelling 
    party, that knight  must be
a) P
b)  Q
c) R
d)  S                                                                                                             
e)  T 
Ans: e
95. How  many of the integers between 25 and 45 are even ?
       (A)21 (B)20  (C)11 (D)10  (E)9
       Ans:d)10

96. If  taxi fares were Rs 1.00 for the first 1/5 mile and Rs 0.20 for  each 1/5 miles  thereafter.  The  taxi fare for a 3-mile ride  was
        (A)Rs 1.56       (B)Rs  2.40        (C)RS 3.00           (D)Rs 3.80           (E)Rs 4.20
        
 Answer :d)Rs  3.80
97.  A  computer routine was developed  to generate two numbers (x,y) the first being a  random  number  between 0 and 100 inclusive, and the 
       second being less than or  equal  to the square root of the first. Each of the followin pair satisfies  the  routine EXCEPT
        (A) (99.10) (B) (85.9) (C) (50.7) (D) (1.1)  (E)  (1.0)                                           
        
Answer  : A) (99.10)

98.A  warehouse  had a square floor with area 10,000 sq.meters. A rectangular addition  was built along one entire side of the warehouse that increased
    the floor by  one-half as much as the original floor. How many  meters did the addition extend  beyond the original buildings  ? 
       (A)10 (B)20 (C)50 (D)200 (E)500
      
 Ans:  c)50

99.A  digital wristwatch was set accurately at 8.30 a.m and then lost  2 seconds every  5 minutes. What time was indicated on the watch  at 6.30 p.m 
     of the same day if  the watch operated continuously  that time ?
      (A)5:56      B)5:58           (C)6.00       (D)6.23        (E)6.26
      Ans :E) 6.26

100.A  5 litre jug contains 4 litres of a salt water solution that is  15 percent salt.  If 1.5 litres of the solution spills out of  the jug, and the jug is then filled
       to capacity with water, approximately  what percent of the resulting solution  in  the jug is salt? 
     (A)7.5%      (B)9.5%       (C) 10.5%         (D)12%         (E)15%

101.)A  merchant sells an item at a 20 percent discount. but still makes  a gross profit  of 20 percent of the cost.What percent of cost  would be gross profit
        on the item  have been if it had been sold  without the discount?
     (A)20%           (B)40%            (C)50%            (D)60%           (E)66.6%
     Ansr  :c)  50%

102.A  millionaire  bought a job lot of hats 1/4 of which were brown. The millionaire  sold 2/3 of the hats including 4/5 of the brown hats. What fraction  of the  
         unsold hats were brown.
      (A)1/60       (B)1/15         (C)3/20          (D)3/5        (E)3/4
      Ans :c)3/20

103.How  many integers n greater than  and less than 100 are there such that,if the digits  of n are reversed,   the resulting integer is n+9 ?
      (A)5       (B)6         (C)7        (D)8     (E)9
      Ans :D)8

104.An  investor purchased a shares of stock at a certain price.If the  stock increased  in price Rs 0.25 per share and the total increase  for the x shares
       was Rs 12.50,  how many shares of stock had been  purchased ?
      (A)25         (B)50           (C)75         (D)100       (E)125
      Ans :B)50
105.At  a special sale, 5 tickets  can be purchased for the price of 3 tickets. If 5  tickets are  purchased at the sale, the amount saved will be 
       what percent  of the  original price of the 5 tickets?
     (A)  20%           (B)   33.3%          (C)      40%          (D)      60%            (E)    66.6%
     Ans  :c)40%

106.Working  independently,  Tina can do a certain job in 12 hours. Working independently, Ann  can do the same job in 9 hours. If Tina Works 
        independently at  the job for 8  hours and then Ann works independently, how many  hours will it take Ann to  complete the remainder of the jobs?
      (A)       2/3          (B)     3/4 (C)  1  (D)      2         (E)      3                                    
       Ans  :E)3

107.A  decorator bought a bolt of  d m number of red chips in any one stack ?
        (A)    7    (B)     6      (C)  5         (D)          4      (E)     3
          Ans :C)  5

DELL:Aptitude Questions



DELOITTE QUESTIONS


1) I have 20 rupees. I bought 1, 2, 5 rupee stamps.
   They are different in numbers by the reason of no change, 
   the shop keeper gives 3 one rupee stamps. So how many stamp(s) I have.
    Ans: 10
2) An Engine length 1000 m moving at 10 m/s. 
   A bird is flying from engine to end with x kmph and coming back at 2x.
   Take total time of bird traveling as 187.5 s. Find x and 2x.

3) All persons know either swimming or rowing.
   There are 14 persons who know only swimming and 14 persons
   who know only rowing. 8 tickets sold for rowing. 
   How many people are there for swimming?
   
4) Which polygon has no. of sides = diagonal (Eg. Pentagon)

5) One Cigar can be made from 7 bits.
  If there are 16 Cigars then how many bits collected?
 Ans: 4

6) A, B, C, D went to a hotel and planned to share the bill equally.
  But afterwards they changed their plan and to pay proportional to 
  consumption A paid 240, B & C paid equally, D paid only half
  the amount that he should have paid based on the first plan.
   What is the amount paid by B?

7) There is a point P on the circle. A and B started running in two
   constant different speeds. A in Clockwise and B in Anti-clockwise. 
   First time 500 m in Clockwise from P then 400 Anti-clockwise. 
   If B is yet to complete one round, What is the circumference of the circle?

8) There are 5 Sub with equal high marks.
   Mark scored by a boy is 3:5:6:7:8 (Not sure).
   If his total aggregate if 3/5 of the total of the highest score,
   in how many subjects has he got more than 60%?

9) There are 11 lines in plane. 
   How many intersections (Maximum) can be made?

10) There are 3 Sections with 5 Qns each.
    If three Qns are selected from each section, 
    the chance of getting different Qns is________

11) There is a 20 X 20 array.
 In Each row , the tallest person is called and among them,
 the tallest person is A. In Each column, the shortest person
 is called and among them, the shortest person is B. Who is taller?

12) P # Q = (P-Q)(Q-P) = - 1. Then Which is true?

    P = 3, Q = 2    P = 2,Q = 3     P = -1,Q = 1    P = 1, Q = -1  

 Ans: I & II only

13) 7 Pink, 5 Black, 11 Yellow balls are there. 
    Minimum no. atleast to get one black and yellow ball           

 Ans: 17

14) A, B, C and D are four people.
    There are four houses Red, Yellow, Blue, White.
    P, Q, R and S are four sections not in same order

            Conditions like 

            Three are sisters

            B comes from Red

            C comes from Blue

            Qns were asked based on that

15) A Father is willing his estates like this. 
If a boy is born, wife has 1/3 part and remaining for boy. 
If a girl is born, Wife has 2/3 and remaining for the girl. 
But twins (Boy + Girl) are born. What is the share that the daughter would get?

16) If          1 - Married 

                   0- Not Married and

                        M-1    N-0

                        N-1    L-0

                        L-0      M-1

            Who is married? 

Ans: N

CTS-APTITUDE QUESTIONS


CTS QUESTIONS

1) Diameter of circle is d, Find length of string.(outer string that covers the circle)
Ans: d (pi + 3)

 2) Diamond\ s value is proportional to its weight2 .When the diamond 
   broke wts of pieces in ratio 1:2:3;4:5.Total loss in value is 85,000.
   What is the value of the diamond twice the wt of the original diamond.

Ans : 45,000

 3)In an island there r tribals who speak lang of atmost 4 words.
  Lang consists of 4 alphabets.How many words can be formed in that language? 
   
Ans 340

 4) It was found that the cause for the malaria was the swamp marsh and so r swamps were drained .
Mosquito the real cause for malaria due to lack of breeding grounds (Swamps) also was wiped out.
 What does this illustrate?

Ans : (Possible) when many conditions form a result eradication of one cause also eradicates the result)

 5)An officer kept files on his table at various times in the order 1,2,3,4,5,6 .
  Typist can take file from top whenever she has time and type it.
  What order she cann t type.?

 Ans : 4,5,6,2,3,1
 
6)40 shots taken.50p for a hit.10p for a miss.(he have to give).
  Finally he has Rs.5.How many hits.? 

Ans 15

7) 4 weights r weighed in pairs. 
    Weights of pairs are determined as 103,105,106,106,107,109
    What is the min wt?

Ans 51

 8) 20 members avg =10.5. 3 memb of 11.5,12.5,13.5 left and 
     3 memb of 10.5,12.5,14.5 joined along with a teacher of 21 yr.Now avg =  
 Ans 11. 

9) Solid cube of 6 * 6 * 6. This cube is cut into to 216 small cubes.
  (1 * 1 * 1).the big cube is painted in all its faces.
  Then how many of cubes are painted at least 2 sides.

 Ans 56

 
10) A Bacteria is doubling at every 4 min.
    After 40 min 1024 bact. Then 256 when
 
 Ans : 32 min

 11)  A bag contains 3 balls of 11 different colors each. 
     Find the min no of chances to find at least 3 balls of same color?

 Ans : 23 

12) A work in 12 days b in 15 days. 
Find the no of days if they work on alternate days. 

Ans 13 

13) A,B,C r positive int.Out of them 2 r odd. Then 52a + ( b-5)3 (c-3)2 = ?

 Ans : always odd.

14) A squarer side is 5cm.
If a square of side 10cm is hinged @ the center of the prev square. 
when they r rotated common area to both squares 

(Ans : Does not change)

15) A lady has to feed a dog for the one week from Monday to Sunday .She has food types M,N,O,P,Q,R,S .
   MNOP ` protein enriched RS -` vitamin enriched. Vitamin enriched cannot be fed on consecutive days.

 Conditions given : M should be fed before S.
                    M should be fed before Q. 
                    R Should be fed before S.
                    Before N and Q there should be four types.
Based on this 3 ?s are asked.All r easy to answer 

16) A man bought at the cost of 5 plums a rupee and 2 oranges a rupee.
   He sells 10 plums and 6 oranges at the selling price of 4 plums a rupee and 3 oranges a rupee.
   What is his gain or loss? 

Ans loss of 50p.

17) Two solutions have milk & water in the ratio 7:5 and 6:11.
   Find the proportion in which these two solutions should 
   Be mixed so that the resulting solution has 1 part milk and 2 parts water?

 Ans :c

 18. If all the 6 are replaced by 9,
   then the algebraic sum of all the numbers from 1 to 100(both inclusive) varies by

 Ans: 330

19. The total no. of numbers that are divisible by 2 or 3 between 100 and 200(both inclusive) are

 Ans:67

20.From a pack of cards Jack, Queen, King & ace are removed. 
  Then the algebraic sum of rest of the cards is 

Ans:216

21. The average temperature of days from Monday to Wednesday is 37 degree Celsius 
   and that of from Tuesday to Thursday is 34 degrees. The temperature of Thursday is 4/5th of Monday. 
   Then the temperature of Thursday is 

Ans: 36 degrees 

22. Swetha, Tina, Uma and Vidya are playing a gambling.
    In this different people lose in different games-in the reverse alphabetical order.
    The rule is that if one loses she should double the amount of others.
    At the end of 4th game each of them have same amount of money (Rs.32).
 Which one of them started with the least amount? 

(a) Which one of them started with the largest amount of money?

(b) At the end of the 2nd game what is the amount of money with uma? 

Ans: Vidya, Swetha, Rs.8

23. A cube of 12 mm is painted on all its side. 
    If it is made up of small cubes of size 3mm.
    If the big cube is splitted into those small cubes, 
    the number of cubes that remain unpainted is 

Ans: 8

24. B is 50% faster than A. If A starts at 9 A.M. and B starts at 10 A.M.
   A travels at a speed of 50 km/hr. If A and B are 300 kms apart,
   The time when they meet when they travel in opposite direction is

 Ans:12 noon

25. You are having 31kg of rice.
    You are provided with a 1kg stone for weighing.
    In how many weights the 31kg of rice can be weighed. 

Ans: 5

26. Dia of the circle 4cm.The shaded part is 1/3 of the square area.
    What is the side of the square. 

 Ans: root of 3pi 

27.The ratio of white balls and black balls is 1:2.
   If 9 gray balls is added it becomes 2:4:3. 
   Then what is number of black balls.

 Ans:12

28. If [x] indicates integral of x i.e is the largest integer less than
    x and |x| indicates absolute value of x then what is the maximum value
    of [x]/|x|.
    A. 1  B. 0  C.-1  D. None of these 

 Ans: A

29. In the above question what is the minimum value of [x]/|x|.
    A. 1  B. 0  C.-1  D. None of these 

 Ans: D

30) If the clock(Conventional clock with numbers from 1 to 12 in order) is
    cut into 3 pieces such that the sum of numbers on each piece are in
    Arithemetic Progression(A.P) with a common difference of 1.

30. What is the sum of even numbers in the group where 5 is present?
  A. 4  B.10 C.12  D.14 

 Ans: B


31. What is the count of numbers in each
   piece.
  A. 2,2,5  B. 5,5,2  C. 3,4,5  D. 6,4,2

 Ans: C

32. What is the sum of the numbers in the group wher 9 is
   present(excluding 9)
 A.12  B. 20.  C.18  D.21 

Ans C

33. There is a circular track of length 400 mts. If A and B Starts at
    the same point but in opposite direction with a speeds of 8 m/sec and 12
    m/s respectively.Then at what time after the begining they will meet
    for the second time.
  A. 1hr 40 sec   B. 20 sec  C. 40sec   D. 3hr 20 sec

 Ans: C

34. In the above question when will they meet for the first time at the
    starting point.
A. 1hr 40 sec  B. 20 sec  C. 40sec  D. 3hr 20 sec 

 Ans: A

35. If the vertices of the triangle are A(1,2), B(-2,-3) and C(2,3)
    then which is the largest angle?
A. Angle(ABC)  B.Angle(BAC)  C.Angle(ACB)  D.None

 Ans:B

36. If [x] indicates integral of x i.e is the largest integer less than
    x and |x| indicates absolute value of x then fin d the value of
    [1.99]+[-2.99]+[1.03]+[2.50]
   A. 2   B.1   C.-2   D. -5

Ans: A

 Watch the below Algorithm for 4 digit number X.
 
Step1: Add all the numbers
Step2: If it is less than 10 STOP, else go to Step1.

37. If X=6724 then what is the end
    result after applying the above
    algorithm.
  A. 19   B.10   C.1   D. None 

Ans:C

38. If the 4 numbers are arranged in all possible orders then how
    many solutions are possible.
A. ONE  B. TWO  C.THREE D. NONE 

Ans A

CISCO APTITUDE QUESTIONS

Aptitude Questions


1)The starting location of an array is 1000. If the array[1..5/...4] is
stored
in row major order, what is the location of element [4][3]. Each work
occupies
4 bytes.
2)If the number of leaves in a binary tree are N, then the total number of
internal nodes........(Assume complete binary tree)


ANS: N-1


3)The locality of reference means.............


4) If two ausigned 8 bit numbers are multiplied what is the memory space
required...............


5)The vector address of RST 7.5 is ............


ANS: 003C (multiply 7.5 by 8 and convert to hex)


6)int b = 0xAA;
b>>4;
printf("%x",b);


What is the output of the above program....


7) struct s1 { struct { struct {int x;}s2}s3}y;


How to access x? ANS: y.s3.s2.x




8)Why there is no recursion in Fortran?


ANS: There is no dynamic allocation


9) What is the worst case complexity of Quick sort?


ANS: O(n^2)


10) Quick sort uses..............


Ans: Divide and conquer


11) In a sequential search, the time it takes to search through n elements
is




12) What is the size of the array declared as double * X[5]


ANS: 5* sizeof (double *)


13) A binary search tree is given and asked to write the preorder traversal
result.


14) If size of the physical memory is 2^32-1, then the size of virtual
memory......


15> S-> A0B
A-> BB|0
B-> AA|1 How many strings of length 5 are possible with the above
productions??


16) (3*4096+15*256+3*16+3). How many 1's are there in the binary
representation
of the result.


ANS: 10


17) In memory mapped I/O how I/O is accessed.............


ANS: Just like a memory location (Means, I/O devices can be accessed using
the instructions like mov A,M etc...)


18) What is the use of ALE in 8085.......


ANS: To latch the lower byte of the address.


19) If the logical memory of 8 X 1024 is mapped into 32 frames, then the
number
of bits for the logical address ......


ANS: 13


20) Context free grammar is useful for...


ANS: If-then structures.


21) In ternary number representation, numbers are represented as 0,1,-1.
Here
-1 is represented as - (1 bar). Then how is 352/9 represented......
1


22) There are processors which take 4,1,8,1 machine cycles respectively. If
these are executed in round robin fashion with a time quantum of 4, what is
the
time it take for process 4 to complete....


ANS: 9


23) The minimum frequency of operation is specified for every processor
because......




24) In memory mapped I/O, what will happen if a device is identified with a
16
bit address and enabled by memory related control signals.....




25) The reason for preferring CMOS over NMOS is....


Ans: Low power consumption.


26) Two binary numbers A,B are given and asked to find out A-B.


27) Each character is represented by 7 bits, 1 bit is used to represent
error
bit and another bit for parity. If total number of bits transmitted is
1200bits, then number of symbols that can be transmitted.......




28) One question about the setassociativity of cache..


29) Write the postfix form of the following expression...


A+[[(B+C)+(D+E)*F]/G]

































30) What is the function of the linker......


31) void f(int y)
{
struct s *ptr;
ptr = malloc (sizeof (struct)+ 99*sizeof(int));
}


struct s{
int i;
float p;
};


when free(ptr) is executed, then what will happen??




system concepts:


1.int a[5,6]
how much memory will be allocated


2.char p[6];
char *d[10];
ans:d=(char*)p


3.using LFU algorithm,how many page faults will occur of the pages r
1,2,1,3,4.
ans:1,4


4.in which layer the bridges r used.
a)data link layer
b)session layer
c)physical layer
d)network layer


5.#define d 10+10
main()
{ printf("%d",d*d);
}


6.in a complete binary tree if the number of levels r 4 then the number of
nodes will be,


7.if we delete a node from a balanced binary tree,how can we retain the
properties of balanced binary tree.
ans: by rotation at the nodes.


8.in a k-way search tree with N keys, the number of node/no. of leaves=


9.s->;A0B
A->BB|1
B->AA|0
how many string can be constructed with length 5.


10.in which of the following regular expression the srting contains
atleast 2 concetive 1's.
ans:(0+10)*||(0+1)*


11.int i,j=1;
for(i=0;i<10;i++); { j=j+1; } printf("%d %d",i,j); ans:10 11 12.static char *i; i=malloc(sizeof(char)); find the error; ans:malloc returns void 13.virtual memory address capacity depends on-- 14.main() { int i=1; fork(); fork(); fork(); printf("%d",i); } how many times i will be printed ans:8 15.question on threads 16.int i=0xaa char *p; p=(char *)i; p=p>>4;
printf("%x",p);
ans:0x000000a;


17.union
{ char *p;
int i;
char b;
}
main()
{
--
p=(char*)malloc(8*sizeof(char));
}
what is the size of union?


18.enum{sunday=-1,monday,...saturday}
printf("%d %d",sizeof(wednesday),wednesday);


19.struct x{
struct{
struct{
char ch;
} x;
}};
ans:definition wrong


20.struct *s;
s=(struct *)malloc(10*sizeof(struct)+90*sizeof(int));
free(s);
ans:total memory deallocated


21.one alogrithm is given:
ans:10395


22.func()
{ int x=1;
if(x=1)
x=1000;
else
x=10;


return x;
}
what is the return value?
ans:1000