Вы находитесь на странице: 1из 9

DBSS -----This paper is containing the Aptitude and Programming parts.

APTITUDE PART ------------(1)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? (2) Two pumps fill atan in 20 hrs. One pump fills the same tan 10hrs. faster than the other pump. In what time the other pump fills the tan ? (3) X men in Xhrs/day finish a wor in x days. Y men in y hours per day finish the wor in (a) X**2/Y**2 (b)X**3/Y**2 (c) Y**2/X**2 (d) Y**3/X**2 (4)8 men + 2 boys finish a wor in 16 days. 2 men + 5 boys finish a wor in 20 days. 8 men and 8 boys finish the same wor in how many days? (5)A & B are two trains, travell from X & Y stations to Y & X stations after crossing each other A ta es 4 hrs.48 mins. to reach Y station. B ta es 3hrs.20 mins. to reach X station. The speed A is 45 mph. Speed of B is ? (6) 5 questions on series (a) ab--bbc---ac----accc (b) &(c) li e 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 bac ground 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 bac ground 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 ta es 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)Multitas ing 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. lin 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 wor ing directory B. will ma e the home directory as current directory C. will as 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 ey 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. Blan 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<stdio.h> //print the sum of the series 1/5+1/4+.... static int =5; main() { int sum=0; do { sum+=(1/i); }while(0<i--); printf("sum of the series is %d",sum); }

a)it will b)it will c)it will d)none of

print the sum of the series 1/5+1/4+....+1/1 produce a compolation error produce a runtime error the above

4)study the following program #include<stdio.h> main() { intoldvar=80;newvar=-80; int swap(int,int); swap(oldvar,newvar); printf("numbers are %d\t%d",newvar ,oldvar); } int swap(intolval,int neval) { int temval=olval; olval=neval; neval=temval; } the output of the program is a)numbers are 80-80 b)numbers are 80 80 c)numbers are -80 80 d)numbers are -80 -80 5 STUDY THE PROGRAM BELOW, WHICH OF THE FOLLOWING STATEMENT WILL MAKE PROGRAM WORK :main () { int *! = 10 , *j=20; i=i*j; } A) B) C) D) Replace i = i*j; as i = (int) ((int) i * (int)j); No error Replacei= i*j;as i = (int*) ((int)i*(int)j); Replace i+i*j ; as i = (int) i* (int)j;

6 Study the following program #include<stdio.h> enum mode = {green,red,orange,blue ,white}; main () { green = green +!; printf("%d,%d",green,red ); } The output of the program will be :A) 1,1 B) 0,1 C) No output, error in compilation d) None of the above 7 Study th following statements.

#define DELAYTIME 1000 volatile extern int ; intj;

for (i=0;i<DELAYTIME;i++); j= ;

Study the following program :

#include<stdio.h> main() { char buff[] = "this is a test"; int i, *ptr; ptr = (int*)buff; for (i=0;*ptr; i++); printf("%c",*ptr++); } The following will be the output

9 A) B) c) D) 10

Select the explanation for the following declaration itn (*(*ptr)(int)) (void) ptr is apointer pointing to a integer function that ta es an intvalues returns an integer which will points to a function with no argument. ptr is pointer to function that ta es an int value returns a pointer to a function with ano argument which returns a integer This is not a valid C statement. None of the above. Study the following program

# include <stdio.h> char *c[] ={ "FILE", "EDIT", "SEARCH", "COMPILE", }; HAR **cp[] = {c+3,c+2,c+1,c}; char ***cpp = cp; main() { printf("%s", **cpp); printf("%s"< *--*++cpp+3); printf("%s", *cpp[-2]+3); printf("%s\n",cpp[-1][-1]+1); } The output of this program is

A) This is a test D) None of the above

B) It'll print jun

C) Compilation error

meaningless for the variable above.

since

A) Volatile is B) Volatile is and can change C) Volatile is D) None of the

meaningless for the variable meaningful for the variable since

is external is loop invariant

A) SEARCHFILEEDITCOMPILE C) SEARCHEPILEDIT 11

B) SEARCHCOMPILEEDIT D) None of the above

What is the size of ptr1 and ptr2.

struct x { int j; char [100]; unsigned i; }; int *ptr1: struct X *ptr2; A) Same depending on the model used C) 2, Undefined for memory is not allocated 12 If

i = i * 16; Which of the following is a better approach to do the operation A) Multiply i by 16 and eep it B) Shift left by 4 bits C) Add i 16 times D) None of the above 13 What is the output of the following program

#include<stdio.h> main() { int i = 0; switc(i) { case 0 : i++; case 1 : i++2; case2 : ++i; } printf("%d",i++); } output of the program :A) 1 B) 3 C) 4 D) 5 14 In the following , where means

lsee (fd,0L,SEEK_END); where = tell(fd); A) End of file. B) Head of file D) In between head and end of file.

15 Assuming that you are using IBM PC ,you have to a file of 128 intergers into a character array of 256 characters . Which statement you use ? char buf[256]; int word[128]' int i; i varies from 0 to 255 in steps of 2 a) b) c) d) word[i]=buf[i+1]*0x100 + buf[i]; word[i]=buf[i]*0x100 +buf[i+1]; word[i/2] = buf[i] *0x100 + buf[i+1]; word[i/2]=buf[i+1]*0x100 +buf[i];

B) 2,104 D) 2,4

C) Cannot be defined

16

If i=5, what is the output for printf( " %d %d %d", ++i,i,i++); b) 6,6,7 c) 7,6,5 d) 6,5,6

a) 5,6,7 17

For the following code how many times the printf function is executed

int i,j ; for(i=0;i<=10;i++); for(j=0;j<=10;j++); printf("i=%d,j=%d\n",i,j); a)121 b) 11 c) 10 d) None of the above

18 What is the output generated for the following code #define square (a) (a*a) printf("%d",square(4+5)); a) 81 19 int p = p = p = p = b) 4 C) 29 D) None of the above

For the following statement find the values generated for p and q? p = 0, q =1; q++; ++q; q--; --q;

The value of p and q are:a) 1,1 b) 0,0 c) 3,2 D) 1,2 20 What is the output generated by the following program ? #include<stdio.h> main() { int a , count; int func(int); for (count = 1 ;count <=5;++count) { a = func(count); printf("%d", a); } } int func(int x) { int y; y=x*x; return(y); A) 1234567 b) 2516941 C) 9162514 D) 1491625

1. Helmet:Head::? ans: Brea plate:chest 2. Writer:Pen::? ans:Carpenter:Saw 3. cargo:lorry::? 4. In one shoc ing instance of ________________ research, one of the nations influential researchers in the field of genetics reported on experiments that were never carried out and published deliberately

_________ scinetific papers on existed wor . ans: Fradulent- deceptive 5. We need more men of culture eligitent we have too many ____ among us ans: philistines 6. Hide-bound choose nearest antonym ans: Open minded 7. She has been in her Bonnet She cantell ______ ans:Anto 8.If x-2y=2;2x+y=4 which of the following is right ans:d 9. If 2men and 7boys can do a wor in 16days.3men and 8boys cand do in 12 days 8menand 8boys ? ans;6 10. Aperson wants 30% discount. But shopper gave 20% and 12%succesively discount then the person gets ans:29.6 11. The distance between A and B stations is 110 m. apart on a st.line. One train starts at A at 7am. and travels towards B at 20 mph. Another starts at B at 8am.and travels towards A at a speed of 25 mph. AT what time they will meet? ans:10am. 12. 2,2,6,52.5,157.5,630 find the wrong number ans:replace 52.5 by 45 13. 02,12,28,722,152,312,632 find thef wrong number ans. replace 28 by 32 14. Air resistance is proportional to square of the velocity at a speed of 3 mph. the resistance is 0.000045 gm/cm. An aeroplance is travelling at a speed of 250 mph. What is the air resistance offered in g/mit ans:0.03125 15. A person gives 10% discount and he revenues 10% in bargaining. The printed price is 330. What is actual price? ans:270 16. For what period of time for 1800 at 5% interest will give interest of 390% ans:13/3 17. 10 years bac thef father age is 7 times of his son. After 2 years twice the age of the father is equal to 5 times of the son. What are their ages? ans;f->38,S->14 18. Train travels 100 m. in first 2hrs. and 200 m. in 3hrs. and 150 m. in 2.5hrs. What is the avg. speex? ans;60 mph 19. A number when divided by 342 gives remainder 47 When the same number is divided by 19,what would be the remainder ? ans:9 20. A and B can do wor in 6 days. B alone can do in 16 days. After 3 days of combined wor B left. In how many days further A completes remaining wor ? ans:24/5 days 21. In a par ing place there are 36 vehicles. After first one scooter is there. AFter 2nd car two scooters, after 34d car and so on.... How many scooters are there in second half of the row? ans; (YOU PLEASE DO THIS PROBLEM) 22. How many times do the hands of cloc concide in a day? ans;22 23. Fraction and simplification one problem is there. The exact answer is 7/13.(this damn correct) 24. The least/greatest 4 digit numbers which when divided by 15,27,35, 42 leaves in each case a remainder 7 is

ans: 1897,9457 THERE IS SEPERATE SECTION FOR CRITICAL REASONING(GMAT TYPE) 6 QUESTIONS LIKE THE FOLLOWING. 25. All fans are vans. No vans are fans ans : 26.All young scientists are optimistic. All optimists are open minded. ans: 27. Assertion: Comets belong to the solar family. REason: Comets burst into pieces and revolve around the sun ans; Both A&R are true but R is not Correct the sentence questions 4. 8 figures are there. Among these for 4 problems you have to find the next figure. for remaing you have find odd figure.(ALL ARE EASY ) ONE ANALYTICAL QUESTION AS FOLLOWS (THIS ALSO VERY EASY) five people in a family named A,B,C,D,E. probable answers confirm by reading the question carefully. ans: A,B -sons doctor C -daughter officer D - daughter in law ie. wife of B using this you have to solve five questions. that is very easy if you confirm the above. ie. don't confuse with the sentance who learns music. he clearly mension that daughter in law is offcier. he also mension that A is brother in law of officer. And C is a doctor. *************************888888888888*******************************************

Вам также может понравиться