# November 2012

## Unix - Questions - Interview / Learning

1. To display the contents of a executable file the following command can be used

Ans : od

2. Assume the current directory contains 10 files and does'nt contain 'temp'. What will be the output of the follwing commands?

$ls > temp

$wc -l temp

Ans : 10

## Unix - Questions - Interview / Learning

13. What does chmod 654 stand for.

Ans : _rw_r_xr__

14. Which of following is used for back-up files?

(a) compress (b) Tar (c) make (d) all the above

Ans : b

15. what does find command do ?

Ans : search a file

16. The very first process created by the kernal that runs till the kernal process is haltes is

Ans : init

17. The UNIX shell is....

Ans : forms the interface between the user and the kernal

18. In UNIX a files i-node

Ans : is a data structure that defines all specifications of a file like the file size ,number of lines to a file ,permissions etc.

19. Which of the following is true

a)UNIX is a time sharing multi-user OS

b)UNIX has a device independent file system

c)UNIX is full duplex

d)UNIX has command interpreter

e)All of the above

Ans: e

20. Interprocess communication in UNIX can be achieved using

a)pipe

b)Message

c)Semaphores

d)Shared Memory

e)All of the above

Ans : e

21. Which of the following is true about fork()

Ans : causes the creation of a new process ,the CHILD process with a new process ID

22. until who|grep mary

do

sleep 60

done

a) is syntactically incorrect

b) waits 60 seconds irrespective of Mary being logged in or not

c) waits until Marry is logged in

d)waits till Mary exited

e)None

Ans : c

## Unix interview / Learning Questions

23.If a directory contains public files which should not be altered,the most liberal permissions that can be given to the directory is

Ans 755

24. After the following command is executed

$ ln old new

a listing is performed with the following output

$ ls -li

total 3

15768 -rw-rw-rw- 2 you 29 Sep 27 12:07 old

15768 " " " " " " " " new

15274 " " 1 " 40 " " 09:34 veryold

which of the following is true

a)old and new have same i-node number,2

b) " " " " " " " , 15768

c)old and new have nothing yo do with each other

d)very old and new are linked

e)very old and old are linked

Ans: old and new have same i-node number, 15768

25. The command ......ln /bin/mail /usr/you/bin/m

a)will not be executed because you are linking files across different file systems

b)results ln /bin/mail being the same file as /usr/you/bin/m

c)results in 2 links to the file mail

d) " " " " m

e)none

Ans: b

26. In a standard directory lay out, /etc is the directory where

a) basic programs such as who and ed reside

b)various administrative files such as password file reside

Ans: b

27. The UNIX system call that transforms an executable binary file into

a process is

a)execl()

b)execv()

c)execle()

d)execve()

e)All of the above

Ans : d

## IITM - Campus Aptitude question paper

81. If x/y=2/3 then y**2/x**2 is equal to

82. The cordinates of A,b,c are respectively (2,3) ,(4,4) AND (0,-2). If abcd is a parallelgram. The coordinates of D are

83. A man bought two horses for Rs.924 each and sold one horse for 15% profit and the other for 15% loss.What is the net gain?

84. Two pumps fill a tank in 20 hrs. One pump fills the same tank 10hrs. faster than the other pump. In what time the other pump fills the tank?

85. X men in X hrs/day finish a work in x days. Y men in y hours per day finish the work in

86. 8 men + 2 boys finish a work in 16 days. 2 men + 5 boys finish a work in 20 days. 8 men and 8 boys finish the same work in how many days?

87. A train and A Cyclist reaches a station every day at the same time. One day the Cyclist starts 20 minutes late from his house. On his way to station the train crosses him at 5 miles before station. The speed of cyclist is >12mph. Find the speed of the train.

88. There is an element which triplicates in every hour. Each of these 3 items inturn reproduce exactly 3 other items. If a single compund is kept in a container at noon and the container is full by midnight. After how many hours is the container 1/3 full.

89. A person goes to a bank and Quotes x Rs and y paise on a cheque. The cashier misreads it and gives y Rs and x paise. The man comes out and donates 5 paise to a begger. Now, the man has exactly double the amount he has quoted on the cheque.

90. Pepsi, Fanta, Cola order either coffee or tea after dinner.

a) If pepsi orders coffee, Fanta orders the drink that is ordered by cola.

b) If fanta orders coffee, pepsi do not order the drink that is ordered by cola.

c) If cola orders tea, pepsi orders the same drink ordered by fanta. Who take the same drink every day.

## IITM Aptitude test

71. Find the next number in the series 1,2,5,10,17,26

72. sqrt(0.16)+cubic root(0.027) equals

73. if a,b>0 and a+b=2 then the max value of ab is

74. p and q are positive integers with their average 5. Find how many different values can p take

75. The hands of clock coincide after every 66 min of correct time. How much does the clock gain or lose in a day.

76. If x to the power of 5=4 and x to the power of 4=5/y , then x equals

77. The members a,b,12 form a geometric progression and the nos a,b,9 form an arithmetic progression. Find the value of a+b

78. If x,y,z are natural numbers, and if 2x=y and y=3z, what number equal to x+y+z

79. In a group of 15,7 can speak spanish, 8 can speak french, and 3 can speak neither. How much of the group can speak both french and spanish

80. Oranges are bought at 11 for Rs. 10 and sold at 10. for Rs. 11 the profit is

## IITM - Campus interview Aptitude question paper

91. Out of 1800 coins one is lighter than others and in how many attempts you can find that odd one?

92. out of 52 cards two are drawn consecutively. what is the probablility to get black king & black queen ?

93. 1,2,3,5,8, ..?

94. Out of 100 students in the class 60 take hindi ,55 social, 65 english. How many students passed in atleast 2 subjects?

95. O(n), O(n2), O(n3), O(n4) what is the overall complexity ?

96. Total distance is 120 km . Going by 60kmph and coming back by 40 kmph. what is the average speed?

97. A school have 30% from MAHARASTRA .Out of this 20% from BOMBAY students. Find the total percentage of BOMBAY

98. An equilateral triangle of side 3 inch is given. How many equilateral triangles of side 1 inch can be formed from it.

99. A/B = 3/5 15A = ?

100. Each side of a rectangle is increased by 100%.How much the percentage of area will be increased

## IITM - Campus interview Aptitude question paper

101. Perimeter of the back wheel is 9 feet, front wheel is 7 feet on a certain distance the front wheel gets 10 revolutions more than back wheel . what is the distance?

102. Perimeter of front wheel is 30, back wheel is 20. If front wheel revolves 240 times. How many revolutions will the back wheel take?

103. 205 of 6 liter solution and 60% of 4 liter solution is mixed. What percentage of the mixture of solution

104. City A population is 68000, decreasing at a rate of 80 per year. City B having population 42000 increasing at a rate of 120 per year. In how many years both the cities will have same population

105. Two cars, 15 km apart one is turning at a speed of 50kmph other at 40kmph . How will it take to two cars meet.

106. A person wants to buy 3 paise and 5 paise stamps costing exactly one rupee. If he buys which of the following number of stamps.He wont able to buy 3 paise stamps

107. There are 12 boys and 15 girls, How many different dancing groups can be formed.

108. Which of the following fractions is less than 1/3

109. Two circles , one circle is inscribed and another circle is outscribed over a square. What is the ratio of area of inner to outer circle.

110. At 6'o clock clock ticks 6 times. The time between first and last ticks was 30sec. How much time it takes at 12'o clock.

## Laptop Battery Long run

Submitted by sasikala on Sat, 11/24/2012 - 03:58Recently my laptop battery is not working. My laptop powers on only if it plugged in cable. It is not getting charged. I took it to service center, they replaced with battery and gave some tip for battery long life. I am sharing the tip with you all.

Charge the battery maximum level possible and unplug the cable. Work till it goes minimum level then recharge it back.

If you charge up to 80% or 90% or 95 or 100% and unplug it. Use the charged power till it goes to minimum level possible. So whatever input given,let it produce output.

If you keep input, output side capacity losses. for example if you power up to 90% and using it, when power goes to 50% or 60%, again if you recharge it. The output is not properly utilized so battery loss the capacity.

Try this idea maximum possible times. Don't go with 10% power for presentations and meetings to follow this idea :-), just kidding.