IBM -Technical Questions I

1 Draw a flowchart to find a number from an array.

2. What is vector processing Subscribe
A vector processor, or array processor, is a CPU design that is able to run mathematical operations on a large number of data elements very quickly. This is in contrast to a scalar processor which handles one element at a time – the vast majority of CPUs are scalar (or close to it)

3. Best sorting if elements are already sorted Subscribe
insertion sort is the best sort when the list is already sorted as the no of comparision reduces its complexity is n.quick sort is best when the pivot variable is in the middle of the list

4. Insertion sortSoftware configuration management

5.x-=y+1 is equivalent to..
x=x-y-1 because it is interpreted as x=x-(y+1)

6. What happens when we open a file in r+ mode Subscribe
- 'r+' opens the file for both reading and writing.
- 'r' should be used when the file will only be read.

7. If you get error in adapter which device will u use?

8. If you type in the command nohup sort employees > list 2 > error out & and log off ,the next tim
If you type in the command nohup sort employees > list 2 > error out & and log off ,the next time you log in . the output will be
a). in a file called list and the error will de typed in a file error out
b). there will be no file called list or error out
c). error will be logged in a file called list and o/p will be in error out
d). you will not be allowed to log in
e).none of the above
ans nohup is a Unix command that is used to run another command while suppressing the action of the HUP (hangup) signal, enabling the command to keep running after the user who issues the command has logged out. It is most often used to run commands in background as daemons. Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected.
ans (a) chk it

9. In UNIX, What is files i-node
It is a data structure that defines all specifications of a file like the file size ,number of lines to a file ,permissions etc.


10. The UNIX shell is....
a).does not come with the rest of the system
b).forms the interface between the user and kernel
c) does not give any scope for programming
d) does not allow calling one program from with in another
e) all of the above
ans b

11 The command

grep first second third /usr/you/myfile

a) prints lines containing the words first, second or third from the file /usr/you/myfile

b) searches for lines containing the pattern first in the files

second, third, and /usr/you/myfile and prints them

c) searches the files /usr/you/myfiel and third for lines containing

the words first or second and prints them

d) replaces the word first with the word second in the files third and /usr/you/myfile

e) None of the above

Ans) b

Comments