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

Aptitude Questions iNautix Technologies India Limited SECTION A 25 Questions Directions : For each question in this section, select

the best of the choices given

1. #define AND && #define OR || #define LE <= #define GE >= main( ) { char ch = D; if((ch GE 65 AND ch LE 90) OR (ch GE 97 AND ch LE 122)) printf(Alphabet); else printf(Not an alphabet); } a) No Alphabet 2. main( ) { int n[25]; n[0] = 100; b) Alphabet c) error d)None

n[24] = 200; printf(%d %d, *n, *(n + 24) + *(n + 0)); } a) 200 100 b) 100 300 c) 100 200 d) None

3. main( ) { int arr[ ] = { 0, 1, 2, 3, 4}; int i, *ptr; for(ptr = arr + 4; ptr = arr; ptr--) printf(%d, *ptr); } a) 0 1 2 3 4 4. main( ) { struct employee { char name[25]; int age; float bs; }; struct employee e; e.name = Hacker; e.age = 25; printf(%s%d, e.name, e.age); } b) 4 3 2 1 0 c) 1 2 3 4 0 d)None

a) Hacker, 25 b) Error message 5. #define NULL 0 main( ) { struct node {

c) 25 Hacker d) None

struct node *previous; int data; struct node *next; }; struct node *p, *q; p = malloc(sizeof(struct node)); q = malloc(sizeof (struct node)); p->data = 75; q->data = 90; p->previous = NULL; p->next = q; q->previous = p; q->next = NULL; while(p!=NULL) { printf(%d\n, p->data); p =p->next; } }

a) 90 75 6. main( ) { int i=3; i=i++;

b) 75 90

c) 90 90

d) None

printf(%d,i)); } a. 3 b. 4 c. undefined d. Error

7 . What error would the following function give on compilation. f (int a,int b) { int a; a=20; return a; } a. Missing parantheses in return statement. b. The function should be defined as int f(int a,int b) c. Redeclaration of a. d. None of the above. 8. . #define sqr(x) (x*x) main( ) { int a,b=3;

a=sqr(b+2); printf(%d,a); } a. 25 b. 11 c. Error d. Garbage value

9. #define str(x) #x #define Xstr(x) str(x) #define oper multiply main( ) { char *opername=Xstr(oper); printf(%s,opername); } a. oper 10. main( ) { printf(%c,abcdefgh[4]); } a. a 11. main( ) { printf(%d %d %d,sizeof(3),sizeof(3),sizeof(3)); } a. 1 1 1 b. 2 2 2 c. 1 2 2 d. 1 1 1 b. e c. Error d. None b. multiply c. Error d. None

Note: Assume size of int is 2 bytes. 12. main( )

{ struct emp{ char n[20]; int age;} struct emp e1={david,23}; struct emp e2=e1; if(e1= = e2) printf(structures are equal); } a. structures are equal b. No output c. Error d. None 13. main( ) { char a[ ]; a[0] = A; printf(%c, a[0]); } a) Compilaltion Error b) No output c) A d) None 14. main( ) { int x = 5;

printf(%d %d, x++, ++x); return 0; } a) Error 15. main( ) { int z = 4; printf( %d, printf( %d %d , z, z)); } a) 4 4 3 16. int i = 0; main( ) { printf(i = %d, i); i++; val( ); printf(After i=%d, i); val( ); } val( ) { i =100; printf(vals i=%d\n, i); i++; } b) 4 4 5 c) 4 4 4 d) Error b) 6, 6 c) 5, 7 d) 7, 6

a) i =0 vals i=100 i =1 vals i =100 17. main( ) {

b) i=0 vals i =100 i=101 vals i =100

c) Error

d) None of the above

int a[ ] = { 10, 20, 30, 40, 50}; int j; for (j = 0; j < 5; j++) { printf( \n %d, * a); a ++; } } a) 0..5 b) 0..4 c) Error d) None of the above

18. main( ) { int a[5] = {2, 4, 6, 8, 10); int i, b =5; for(i=0; i<5; i++) { f(a[i], &b); printf(\n %d %d, a[i], b); } }

f(int x, int *y) { x = *(y) +=2; } a) 2 7 4 9 6 11 8 13 10 15 19. main ( ) { int n=20, i = 0; while(n- - >0); i = i +n; } The end value of i is (a)210 20. main( ) { int i = 0; char ch = A do { printf(%c, ch); } while (i++ <5| | ++ch < =F); } The output of above program is (b) 20 ( c) -1 (d) 200 b) 4 9 6 11 8 13 10 15 12 17 c) 7 2 9 11 13 15 4 6 8 10 d) Error

(a) ABCDEF (b) AAAAAA BCDEF (c) A will be displayed infinitely (d) None of the above 21. Assume that a,b,c are integer variables. Values of a,b and c are 2,3 and 1 respectively. Which of the following statement is correct regarding the assignment d = a < b < c - 1;

(a) Above statement is syntactically not correct (b) Value zero will be stored in variable d (c) Value one will be stored in variable d (d) Value -1 will be stored in variable d 22. int count, sum; main( ) { for(count = 4; sum + = - - count); printf(%d, sum); } (a) Programs goes into an infinite loop (b) 356653 will be displayed (c) 354453 will be displayed (d) None of the above 23. What will be the result of executing following program main( ) { char *x="New"; char *y="Dictionary"; char *t; void swap (char * , char *); swap (x,y);

printf("(%s, %s)",x,y); char *t; t=x; x=y; y=t; printf("-(%s, %s)",x,y); } void swap (char *x,char *y) { char *t; y=x; x=y; y=t; } a).(New,Dictionary)-(New,Dictionary) b).(Dictionary,New)-(New,Dictionary c).(New,Dictionary)-(Dictionary,New) d).(Dictionary,New)-(Dictionary,New) 24. main( ) { static float a[ ] = { 13.24, 1.5} float *j, *k; j = a; k = a + 2; j = j * 2;

k = k/2; printf(%f%f , *j, *k); } a) Error b) Some value c) No output d) None of the above

25. main( ) { static char s[ ] = Rendezvous; printf(%d, *(s+ strlen(s))); } a) 0 b) Rendezvous c) 0 d) Error

SECTION B 15 Questions Directions: For each question in this section, select the best of the answer choices given

26. a. b. c. d.

A logic gate is an electronic circuit which Makes logic decisions Allows electron flow in only direction Works on binary algebra Alternates between 0 and 1

27. The process of converting analog signal into digital signals so they can be processed by a receiving computer is referred to as a. b. Modulation Demodulation

c. d.

Synchronizing Desynchronizing

28. A distributed data processing configuration in which all activities must pass through a centrally located computer is called a. b. c. d. 29. a. b. c. d. 30. a. b. c. d. 31. a. b. c. d. 32. a. b. Ring Network Spider network Hierarchical Network Data control Network Multiprogramming was made possible by Input/Output units that operate independently of the CPU Operating Systems Both c and d Neither a and b What is the alternative name for application software? Utility software Specific software End-user software Practical software Compared with the secondary storage, the primary storage is: slow and inexpensive fast and inexpensive fast and expensive slow and expensive EBCDIC ca code up to how many different characters? 8 16

c. d. e. 33. a. b. c. d. 34. a. b. c. d. 35. a. b. c. d. 36. a. b. c. d. 37. a.

32 64 256 A program written in machine language is called as ___________ program Assembler Object Computer Machine A factor in the section of source language is Programmer skill Language availability Program compatibility with other software All the above An integrated circuit is A complicated circuit An integrating device Much costlier than single transistor Fabricated in a single silicon chip Data integrity refers to Privacy of data The simplicity of data The validity of data The security of data Which data communication method is used for sending data in both directions at the same time? Super duplex

b. c. d.

Simplex Half duplex Full duplex

38. What is the usual number of bits transmitted simultaneously in parallel data transmission used by microcomputers? a. b. c. d. 39. a. b. c. d. 6 9 8 7 In the IBM PC - AT, What do the words AT stand for Additional Terminal Advance Technologies Applied Technologies Advanced terminology

40. Different components on the motherboard of a PC processor unit are linked together by sets of parallel electrical conducting lines. What are these lines called? a. b. c. d. Conductors Buses Connectors Connectivity

SECTION C 20 Questions Directions : The following set of Questions is based on a brief premise and a set of rules. For each question, select the best answer from the five choices.

A particular seafood restaurant serves dinner Tuesday through Sunday. The restaurant is closed on Monday. 5 entrees Egg, Chicken, Mutton, Fish and Lamb are served each week according to the following restrictions. y y y y y y 41. Chicken is served on 3 days each week, but never on a Friday Mutton is served on 1 day each week Fish is served on 3 days each week but never on consecutive days Chicken and Egg are both served on Saturday and Sunday Lamb is served 5 days each week No more than 3 different entrees are served on any given day On which of the following pairs of days could the restaurants menu of entrees be identical? a. b. c. d. e. Friday and Sunday Tuesday and Wednesday Saturday and Sunday Wednesday and Friday Thursday and Friday

42. Which of the following is a complete and accurate list of the days on which Chicken and Mutton may be served? a. b. c. d. e. 43. a. b. c. d. Tuesday, Thursday Tuesday, Wednesday, Thursday Monday, Tuesday, Wednesday Tuesday, Wednesday, Thursday, Friday Tuesday, Wednesday, Thursday, Saturday If Fish is served on Saturday, it could be true that Egg and Fish are both served on Sunday Egg and Chicken are both served on Tuesday Mutton and Chicken are both served on Thursday Lamb and Egg are both served on Saturday

e.

Mutton and Egg are both served on Friday

44. Which of the following statements provide sufficient information to determine on which 3 days Chicken is served? a. b. c. d. e. Fish and Mutton are served on same day Mutton and Egg are both served on Tuesday Lamb is served on Saturday and Mutton is served on Tuesday Fish is served on Saturday and Egg is served on all but one of the six days Lamb is served on Sunday and Egg is served on Tuesday and Thursday

Directions : For each questions in this section, select the best of the answer choices given.

Numbers All numbers are real numbers 45. Which word inside the brackets is always part of the word outside the brackets? Trigonometry (a. Solids, b. Calculus, c. Progressions, d. algebra, e. angles) 46. One man can dig a trench in 2 hours A second man can dig a trench in 3 hours A third man can dig a trench in 5 hours A fourth man can dig a trench in 6 hours How many hours will it take to dig a trench if they all work together at their own speeds? a. 0.43, 47. b. 0.63 c. 0.83 d. 1.03 e. 1.23

A B C D E F G H Which letter is two to the right of the letter immediately to the

left of the letter three to the right of the letter immediately to the left of the letter E? a. C, 48. b. D c. A d. H e. G

How many minutes past 11a.m. is it, if two hours ago it was three times as many minutes past 8 a.m.? a. 55 minutes d. 1 hour b. 35 minutes e. 30 minutes c. 25 minutes

49. How many minutes before 12 noon is it, if one hour ago it was three times as many minutes after 8 am? a. 30 minutes b. 25 minutes c. 35 minutes e. 40 minutes

d. 45 minutes 50. Insert the missing number below.

a. 156

b. 34

c. 124

d. 40

e. 104

51. The recipe for a cake called for 2/3 cup of sugars. How many cakes did Jane bake for a baked goods sale if she used 4 cups of sugar? a. b. c. d. e. 2 3 4 5 6

52. A new copy machine can run off 1,500 workbooks in 8 hours, while it takes an older copy machine 12 hours to do the same job. What is the total number of hours that it would take both copy machines working at the same time, but independently, to run off the 1,500 workbooks? a. b. c. d. 4.4 4.6 4.8 5

e.

10

53. If the width of a rectangle is increased by 10% and the length is decreased by 20% by what percent does the area decrease? a. b. c. d. e. 2% 12% 16% 20% 21%

54. Suppose half of the people on a bus exit at each stop and no additional passengers board the bus. If on the third stop the next to last person exits the bus, then how many people were on the bus? a. b. c. d. e. 20 16 8 6 4

55. A car traveled 75% of the way from town A to town B by traveling at T hours at an average speed of V mph. The car travels at an average speed of S mph for the remaining part of the trip. Which of the following expressions represents the average speed for the entire trip? a. b. c. d. e. .75V + .25S .75T + .25S VT / (3S) 4VT / (T+S)/3 4VS / (3S+V)

56. If you had a piece of paper that was 0.001 inches thick, how tall a pile would it make if it were folded in half 10 times? a. b. c. 2.047 1.024 1.023

d. e.

0.512 2.048

57. When he was a child, Gopal wanted to buy his mother 3 red roses for her birthday. He decided to start saving on the first day of the month. On the first day, he put ONE paise in his piggybank; on the second day he put TWO paise, on the third day he put THREE paise and so on. a. b. c. d. e. 13 day of the Month 19th day of the Month 24th day of the Month 30 day of the Month 21 day of the Month
th th st th th

58. Mary was both 13 highest and the 13 lowest in a spelling contest. How many people were in the contest? a. b. c. d. e. 13 25 26 27 28

59. At an international party all the Indian guest ate 2 sandwiches, each American guest ate 4, each Australian ate 8, and all Russians guests ate 12. There had been a total of 234 sandwiches served. The number of guests from each country was equal. How many guests in total were in the party? a. b. c. d. e. 60. 12 24 36 48 9 A B C D E F G H

Which letter is immediately to the right of the letter three to the left of the letter immediately to the right of the letter which is four to the right of the letter which comes midway between the letters A and C?

a. b. c. d.

F G E D

Aptitude Questions SECTION A: (10 Questions) 1) 2) 3) What is Context Switch? What is file descriptor? What is not there in Control unit? a)fetch unit b)decode unit c)Instruction register d)status register 4) one question like coverting binary into decimal 10110.11010 to decimal value 5)Simplification of expression like ABCD+aBcD+AbCd.. where A,B,C,D are

compliment of a,b,c,d respectively.. 6) Interrupt is used for? 7)one question likethere are 132 instr set in microprocessor and 12 addr register out of these 14 using addr register then what is the minium number of bits used by instr reg(I Don tknow exactly)

8) one question like calculating performance they gave cache read and hit ratio) 9)what is the complexity of binary search(like o(n),o(n^2),o(log n)) 10) switch circuit uses which gate NAND ,NOR only,AND,OR,NAND.

Section B 20 Questions

1)find the odd one out 1,6,11,22,33,46,61 ANS:11 2) some Questions based on diagrams like what will be the next diagram 3) 42 (44) 38 23 (?) 28

a)33 b)22 c)55 d)44

4)Distance btwn A and B is 200 km ,x starts fromat 7 am at 20kmph and B starts form opposite end at 8 am at 25kmph at when And where they will meet ans :100 from a(may be) 5)A gives half of his salary to his wife and half of the remaining to his son and 1/3 of the remaining to his daughter finally he had RS 500,then what will be his monthly salary

Ans:3000 6)20% A of is equal to 80% of B then what is A+B Ans:1.25a(may be)

7)Age of mother is & Daughter is 7:3 after five years their ages are 2:1 What are the ages of mothers & daughter

8)In a Workshop a mechanic repairs 16cars in 8 hr day another mechanic does it in (I dont remember exactly its a work time problem ) 9) (early in the morning)A stands in a garden B came and met him opposite to that of A and found that Bs shadow was right of him which direction A is facing 10)Some questions are mental ability 11)a word SCRIPT is coded as TCQIQT then code for DIGEST is ans:EIFETT 12)TWO days before the day before tomorrow is Monday then what day is today?

13)16 man scan do a work in 12 days a woman 2times as man a child 2 times as woman

how many days will 32 woman & 64 child take to finish the work

SECTION C : 20 QUESTIONS

(all are coding only and asking for errors, outputs etc)

Aptitude Questions 1.inode is used in case of(ANS:file)

2.order of the binary search tree?

3.why the boundary values are alwaya tested?

4.which of the (four options given)

following

is

not

true

about

i/o

mapped

i/o?

5.I there If 14 of each 1.132 2.8 3.11 4.64

are the

132 instruyctions in a processor and there are ins share the address of the regiters then the no inst will

7 of

registers. bits in be?

6.If there are 12 added ,then the no 1.2 2.2 3.2 4.2 ans: 2 power 11

address lines and if 2 more i/o devices are to be of address lines (excluding the circuit for the i/o devices is power 12-2 power 12 power 11 power 10

7.context switching means..

8.abCD+abcD+abCd+... compliment of ans:ab

is

A(similar

type

of

qa)

9.conversion of a binary number to base 7.

10.Which 1.ICMP 2.UDP 3.SNMP 4.RFC ans:RFC

of

the

following

is

not

protocol?

SECTION 2:

(APTITUDE)-20 ENTIRELY ASKED 1.There are the qa two 1. ans: mathur FROM eight qa R.S.AGGARWAL(16 QA) and flats(storeyed).8 people is about based EDGAR are critical on

Qestions THORPE(4 QA) living there. reasoning this

2. ans :3

3.A man is moving 50 m north.He turns left and walks 30 m.again he turns left and walk for 50 m.He turns left and walks 50.What is the distance from his starting point? 1.25m 2.50m 3.35m

4.none of the above(ans)

4.Reshma is standing in front of her room.Ramu is coming from north towdars her and he can see his shadow falling on his right.In which direction she is standing? 1.north east 2.east 3.south east 4.west ans:west

5.one qa based on boats and stream

6.Two qa on the age problems

8.what is the prob of getting more than 8 when throwing two dice?

9.Instead of multiplying by 53,Narmada multiplied it by 35 and got the answer as 1206.What is the exact number to be multiplied? 1.77 2.67 3.87 4.97 ans:67

10.If 'mafaja' means 'Happy birth day','pamaja' means Happy new year',then what is for 'birth'?(I cant remember the qa correctly) ans:ja

11.8I,11L,14O,17R.. 1.20U 2.21U 3.20V 4.21V ans:20U

12.Karthik is selling a product at a rate 0f 200.If he lost 10% in selling ,what is the rate he should sell inorder to get 20%gain? ans:240

13.There is an amount of 330.110 boys share it with each boy getting rs 3.50 and each girl is getting rs 2.40.Then the no of girls are? ans:50

14.Find 42 23 1.66 2.44 3.55 4.33

the 44 ?

missing

no: 38 28

15.Find the correct sequence from the four given figures(2 qa based on this)

17.one qa related to area of the cube

18.one qa from percentage

19.one

qa

from

time

and

work.

20.one qa from numbers . SECTION 3: (C 1.Declaration 2.Function 3.C preprocessor - 1 qa 1 2 PROGRAMMING) qa qa

4.Pointers - 3 qa

5.Arrays - 3 qa

6.Structure - 2 qa

7.String - 3 qa

8.Macro - 2 qa

9.Memory allocation - 2 qa

10.Bitwise AND is used for 1.comparison 2.Masking 3.Shifting 4.Deleting no questions are asked from "test ur c skills" by kanetkar.I think u can better refer pointers in C by kanetkar,Let us C and schaum series. C qa are quite tough. Some qa (more than five qa) occupied more than a page!.

Aptitude Questions Q. A man leaves office daily at 7pm A driver with car comes from his home to pick him from office and bring back home One day he gets free at 5:30 and instead of waiting for driver he starts walking towards home. In the way he meets the car and returns home on car He reaches home 20 minutes earlier than usual. In how much time does the man reach home usually?? Ans. 1hr 20min Q The following truth table is given What is Y equal to?? A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 Y 1 1 0 0 0 0 1 1

Ans. (A')(B')(AB) , where ' stands for complement.

Q. A works thrice as much as B. If A takes 60 days less than B to do a work then find the number of days it would take to complete the work if both work together? Ans. 22days Q. How many 1's are there in the binary form of 8*1024 + 3*64 + 3 Ans. 4 Q. In a digital circuit which was to implement (A B) + (A)XOR(B), the designer implements (A B) (A)XOR(B) What is the probability of error in it ?

Q. A boy has Rs 2. He wins or loses Re 1 at a time If he wins he gets Re 1 and if he loses the game he loses Re 1. He can loose only 5 times. He is out of the game if he earns Rs 5. Find the number of ways in which this is possible? Ans. 16 Q. If there are 1024*1280 pixels on a screen and each pixel can have around 16 million colors Find the memory required for this?

Ans. 4MB

Q. On a particular day A and B decide that they would either speak the truth or will lie. C asks A whether he is speaking truth or lying? He answers and B listens to what he said. C then asks B what A has said B says "A says that he is a liar" What is B speaking ? (a) (b) (c) Truth (d) Cannot be determined Ans. (b) Q. What is the angle between the two hands of a clock when time is 8:30 Ans. 75(approx) Q. A student is ranked 13th from right and 8th from left. How many students are there in totality ? Q. A man walks east and turns right and then from there to his left and then 45degrees to his right.In which direction did he go Ans. North west Q. A student gets 70% in one subject, 80% in the other. To get an overall of 75% how much should get in third subject. Q. A man shows his friend a woman sitting in a park and says that she the daughter of my grandmother's only son. What is the relation between the two Ans. Daughter Truth Lie lies

when

Technical Questions

main() { char **p=="Hello"; printf("%s",**p); } Ans: Garbage or nothing main() { Garbage Value main() x==5; main() ); } main() p; e; o; ); main() 0); { struct { printf("%d%c\n"); printf("%d%c\n"); } Ans:

int printf("%d%d",x++,++x); { int x==4; Ans: 4 4 5 union { { char }w; Ans: 4 { i+==n; int i;

Ans==6 6

printf("%d",printf(" %d %d ",x,x)

char int t; };

char printf("%d\n",sizeof(l)

int i==0,n==6; printf("%d\n",i); } char printf("%c\n",*a++);

while(n-Ans: -1

ain() a[]=="Hello"; Error

Ans:

a=3,b=2,c=1; 1; Ans: 0 main() a=3; a); while(a0); }

What,s the value of k?

k== a< b < c-

{ do a=-1; Ans: 3

int { } printf("%d",

It is not "exact" Question; But the given Answers is: a) PASS1 PASS2 b) PASS1 FAIL1 c)FAIL1 FAIL2 PASS2 main() { char c==-32; i==-64; unsigned u==-

d)FAIL1 int

26; c) "); ;
efreshers.com

if(ci) printf("PASS1"); printf("PASS2"); else if(i<U) printf("PASS2"); else } Ans: PASS1 PASS2 PASS1 { { int i==0; for( i==0; i<= switch(i) { case 0: case 1: i+==2; case 2: i+==5; break; } printf("%d",i); } Ans: 16 21

if( i < printf("FAIL1 printf("FAIL2")

main() ;i++) i+==5; i+==4;

default:

main() { int i==4; switch(i) { case 1: printf("HEllo"): case default: // "case" should not come with "default" printf("****"); } } Ans: Error main() { int sum==0,count; } Ans: Error

for(count==1;sum+==count)

printf("%d\t",sum);

define cond(a) a=e && a<=0 ar s==,R,; if( cond(s) ) printf("UPPER CASE"); else printf("LOWER CASE"); main() { static int i==5; printf("%d\t",i--); i) main(); } Ans: 5 4 3 2 1

main() } if(

ch

Ans:UPPER CASE

main() { char *a1=="new",*a2==" dictionary ",*t; swap(a1,a2); printf("(%s%s)",a1,a2); t=; a1 =; a2==t; printf("-(%s%s)",a1,a2); } swap( char * s1 ,char *s2) { char *temp; s1=s2; s2=s1; temp=s1; } Ans: (newdictionary)(dictionarynew) *p++? Ans: increments Address main() { int a[]=={ 10,20,30,40,50}; char*p==(char*)a; ( (int *) p+4); printf("%d", * } Ans: 50

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