-- cts ------
This paper is containing the Aptitude and Programming parts.
APTITUDE PART
-------------
(1)A man sold two horses for Rs.924 each one horse for
15% profit and the other for 15% loss.What is the net gain?
2.25 loss
(2) Two pumps fill atank in 20 hrs. One pump fills the same
tank 10hrs. faster than the other pump. In what time the
other pump fills the tank?
(3) X men in Xhrs/day finish a work in x days. Y men in y hours
per day finish the work in
(a) X**2/Y**2 (b)X**3/Y**2 (c) Y**2/X**2 (d) Y**3/X**2
x**3/y**2
(4)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?
9 3/13 days
(5)A & B are two trains, travell from X & Y stations to Y & X
stations after crossing each other A takes 4 hrs.48 mins. to
reach Y station. B takes 3hrs.20 mins. to reach X station.
The speed A is 45kmph. Speed of B is ?
54 kmph
(6) 5 questions on series
(a) ab--bbc---ac----accc
(b) &(c) like this 5.
(7)5 questions on alfabets.
(8) 10 questions on English Grammer.
(9) 20 questions on reasoning.
PROGRAMMING
-----------
Section 1.
---------
1. To display the contents of a executable file the following
command can be used
(a) cat (b) od (c) vi (d) ed ans : b
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
(a) 9 (b) 10 (c) 11 (d) undefined. ans : b
3. If one wants the output of one command( command1) to be
printed inthe printer as well as to be added to another file
(outfile) which one of the following is a currect command
he can give?
(a) $command1 outfile|tee lpr
(b) $tee -a command1 | lpr
(c) $ command1 | tee outfile | lpr
(d) $ command | tee -a outfile |lpr ans : d
(4) In the shell program set -x will cause
A. Execution of the commands in the background
B. Execution of the commands in verbose mode
C. Exit from the shell program.
D. Exit from the shell program after executing the next command
(5) ACL in UNIX refers to
A. Acces Control List
B. Action Control List
C. Application Command Language
D. Advanced C lanuage
(6) The command echo*
A. will print * on the screen
B. will print contents of all the files in the current
directory
C. will list the files in the current directory
D. will print the contents of all shell variables
(7) ls || date will
A. print the name of the files in the current directory
B. print today's date and time
C. (A) followed by (B)
D. none of the above
(8) The built-in shell variable $$ refers to
A. printing numbers in dollar format
B. proces id_ of last command
C. proces id_ of last background command issued
D. proces-id of current shell
(9) dd is mainly used for
A. dealing with raw, unformated data, whatever the source
B. dealing with data dictionary
C. deleting a directory
D. none of the above
(10) vis in UNIX is
A. a command that takes only one input
B. a command for deleting strange or unwanted charectors that
may have crept into files.
C. points non-printable characters in understandable format
D. all of the above
(11) Which of the following is true regarding the UNIX
(i) Multiuser Operating System
(ii)Multitasking Operating System
(iii) Real timing Operating System
A. i only B. i and ii only C. i and ii and iii only
D. i and ii
(12) ln command is used to
A. link object codes into a executable code
B. give two names to the same file
C. set line numbers for the file
D. none of the above
(13) nohup command is used for
A. protecting the execution of programmes from aborting when
hangup signal is received
B. changing the execution priority of the programes
C. not hanging up of the modem
D. disconnecting a node from the system
(14) SCCS is a
A. Tool for maintaining large programmes in a production
environment
B. Communication Protocol
C. Shell Programming Language
D. String processing utility
(15) Which one of the following is true as long as UNIX is
concerned
A. One can do programming in C only
B. It can support terminals capable of printing only uppercase
characters
C. The text files are sorted as it is in MS-DOS
D. None of the above
(16) Inside vi editor to replace the string /10/$/94 with
10/$$/92 globally the following command can be used
A. :1,$ s/\/10\/\$\/94/10\/\$\$\/92/g
B. :1,$ s/\/10\/\$\/94/10\/\$\/$92/
C. :s/10/$/94/10/$$/92/g
D. :1,$ s/\/10\/$\/94/10\/$$\/92/g
(17) The ed command without any argument
A. will print the current working directory
B. will make the home directory as current directory
C. will ask for the directory to be used as the current
directory
D. will go to the previous directory
(18) nice command is used
A. to increase/decrease execution priority of a command
B. to compress a file
C. to run a programme at latter time
D. to set the key board responce slower
(19) What will be the output of the following command sequence
$ x='I am x'
$sh
$echo $x
A. I am x B. Blank line C. x D. None of the above
(20) The command tr a-z 0-9 < x
A. converts all the digits to lowercase alphabets
B. converts all the lowercase alphabets to digits
C. will give syntax error
D. none of the above
SECTION 2:
----------
1)study the following program
#define MAX(x,y) ((x)(y)?(x):(y)
main()
{
intx=5,y=5;
printf("maximum is %d",MAX(++x,++y));
}
the outpput of the programis
a)maximum is 7 (b)maximum is 5 (c)maximum is 6
d)none of the above
2)given the following definitions
int *p,*q,r;
int values[30];
p=&values[0];
q=values+29;
r=++q-p;
what will be the value of r ?
a)address of q minus p
b)number of elements in the array
c)(value pointed by q)+1-(value pointed by p)
d)none of the above
3)what will the output of the program?
#include