You are on page 1of 10

Technical

1. Declare a function pointer and call it for the function void fun { printf(MCA2k11); } 2. What would be output? main() { char str[] = JNUMCA2k11; int a; printf(a>10 ? %5s : %s, str); } 3. What would be output? int main() { float a = 0.25; if(a < .25) { printf("greater than"); } else if(a == .25) { printf("equal"); } else { printf("less than"); } } 4. Write a macro print(x, y, z) to print the following. x=4 y=5 z=6 main() { int x = 4, y = 5, z = 6; print(x,y,z);

5.

6.

7. 8.

} Explain: int a = 5; const int *p = &a; int * const p = &a; const int * const p = &a; int const *p = &a; What will be output main() { char *ptr; *ptr = (char *)malloc(30); strcpy(ptr, JNUMCA); strcat(ptr, 2k11); printf(%s, ptr); free(ptr); } Explain f: void (* f)(int, void (*)()); What will be output #include<iostream> using namespace std; #define PI 3.14 int squareArea(int &a) { return a*=a; } double circleArea(int &r) { return PI*r*r; } int main() { int a = 10; cout<<squareArea(a)<<endl; cout<<circleArea(a)<<endl; return getchar();

} 9. Output: #include<iostream> using namespace std; class Alpha { int data; public: Alpha(int num) { data=num; } Alpha(Alpha &a) { data=a.data; cout<<"copy constructor\n"; } void display() { cout<<"value of data is "<<data<<endl; } void operator=(Alpha &a) { data=a.data; cout<<"assignment operator"<<endl; } }; int main() { Alpha a1(37); Alpha a2(2); a2.display(); a2=a1; a2.display(); Alpha a3(a1); a3.display(); }

10. Write a template function to swap int, char, double values. #include<iostream> using namespace std; //template function definition main() { int a = 5, b = 7; double d = 4.5, e = 5.6; char x = 'x', y = 'y'; swapargs(a,b); swapargs(d,e); swapargs(x,y); } 11. Pankaj stores n data elements in a hash table. He is able to get the best efficiency achievable by a hash table. What is the time complexity of accessing any element from this hash table? Option 1 : O(1) Option 2 : O(n2) Option 3 : O(log n) Option 4 : O(n) 12. How many comparisons are needed to sort an array of length 5 if a straight selection sort is used and array is already in the opposite order? Option 1 : 1 Option 2 : 10 Option 3 : 50 Option 4 : 20 13. The best sorting methods if number of swapping done is the only measure of efficiency is Option 1 : Bubble Option 2 : Selection Option 3 : Insertion Option 4 : Quick 14. A hash table can store a maximum of 10 records. Currently there are records in locations 1, 3, 4, 7, 8, 9, 10. The probability of a new record going into location 2, with a hash function resolving collisions by linear probing is Option 1 : 0.6 Option 2 : 0.1 Option 3 : 0.2 Option 4 : 0.5

15. Jaswinder has a book of tickets and wants to store ticket numbers in a data structure. New tickets are added to the end of the booklet. Ticket at the top of the stack is issued to the customer. Which data structure should Jaswinder use to represent the ticket booklet? Option 1 : Queue Option 2 : Stack Option 3 : Array Option 4 : Graph

16. Solve the recurrence T(n) = T(n-2) + n2. 17. There is an array of size n initialized with 0. Akanksha has to write a code which inserts the value 3k at position 3k in the array, where k=0,1(till possible). Akanksha writes an efficient code to do so. What is the time complexity of her code? 18. What is a shell? A: It is a hardware component. B: It is a command interpreter. C: It is a part in computer. D: It is an application program. 19. Divide logical memory into blocks with the same size as frames are called: 20. The chunks of memory is known as A: Sector B:Offset C:Page D: Frame 21. is the structure of the database. a. b. c. d. Table Relation Schema None of these

22. Meta data is A: Small amount of data B: Large amount of data C: Redundant data D: None of these 23. A functional dependency is a relationship between or among: A: tables B: Rows C: Relations D: Attributes

24. Which of the following describe router functions? A: Packet Switching B: Packet filtering C: Internetwork communication D: Path selection E: All of the above

25. The ________ protocol is the transmission mechanism used by the TCP/IP suite. A) ARP B) IP C) RARP D) none of the above

Aptitude:
1. Rs.460 was divided among 41 boys and girls such that each boy Rs.12 and each girl got Rs.8. What is the number of boys? A. 33

B. 30 C. 36

D. 28 2. How many litres of water must be added to 16 liters of milk and water contains 10% water to make it 20% water in it A. 4 litre

B. 2 litre

C. 1 litre

D. 3 litre

3. Series: 2,7,24,77,... 4. A candidate appearing for an examination has to secure 40% marks to pass paper i. But he secured only 40 marks and failed by 20 marks. What is the maximum mark for paper i? 5. A man in a train notices that he can count 21 telephone posts in one minute. If they are known to be 50 metres apart, then at what speed is the train travelling? A. 55 km/hr B. 57 km/hr C. 60 km/hr D. 63 km/hr

6. A can finish a work in 18 days and B can do the same in half the time taken by A. Then, working together , what part of the same work they can finish in a day? A. 1/6 B. 1/9 C. 2/5 D. 2/7 7. The true discount on Rs.2562 due 4 months hence is Rs.122. The rate percent is A. 12 % B. 13 % C. 15 % D. 14 % 8. Three unbiased coins are tossed.What is the probability of getting at least 2 heads? A. 1/2 B. 1/4 C. 1/3 D. 1/8

9.

In a certain code: 'il be pee' means 'roses are blue' 'sik hee' means 'red flowers' 'pee mit hee' means 'flowers are vegitables' so red is written as:

10. arun said "this girl is the wife of the grandson of my mother". who is arun to the girl. 11.a walks 10 m in front and 10 m to the right. then everytime turning his left, he walks 5,15,15 meters respectively.how far is he noe from starting point? 12.choose the odd one out: BDW,DFU,FHS,GIQ,IKP 13. statements: some toms are jerrys, some jerrys are pumbas, no pumba is timon. conclusions: some toms are timons. no timon is jerry. some pumbas are timons. all toms are pumbas. (more than 1 answers are possible).

14. if A interchanges its position with B, C with D,...... Y with Z. then which letter ll come at 7th position from the left? 15. R * T J L 2 $ D = M # 8 C % B < K 1 & A W ? P E + Q @ 7 F 6 how many such numbers are there in the above sequence, each of which is immidiately preceed by a constant and immidiately followed by a symbol. 16. if 100 cats kills 100 mice in 50 days then 4 cats will kill how many mice in 10 days? study the following information carefully and answer ques from 17 to 20: there is group of 5 persons A,B,C,D,E.one of them is hotriculturist,one is physicst,one is journalist,one is industrialist,one is advocate. three of them A,C and advocate prefer tea to coffee and two of them B and the journalist prefer coffee to tea.the industrialist and D and A are friends to one another but two of them prefer coffee to tea.Hotriculturist is C's brother. 17. who is the hotricuturist? 18. who is industrialist? 19. which of the following includes a person who likes tea bur is not an advocate? 20. who is a physicist? 21.

synonym: ABUNDANT A. Ripe B. Cheap C. Plenty D. Absent 22 Antonym: AUTONOMY A. Slavery B. C. Dependence D.

Subordination Submissiveness

23. choose the correct order: 1. at 2. it 3. take 4. once 5. away A. 23514 B. 14352 C. 32514 D. 53214 E. 42315 24. Given that the passage starts with sentence s1 and ends with s6.find the proper orderinng of sentence. S1: Calcutta unlike other cities kepts its trams. P: As a result there horrendous congestion. Q: It was going to be the first in South Asia. R: They run down the centre of the road S: To ease in the city decided to build an underground railway line. S6: The foundation stone was laid in 1972. The Proper sequence should be: A. PRSQ B. PSQR C. SQRP D. RPSQ 25.Pick out the best one which completes the sentence given below: He tames animals because he ...... A. is fond of them B. hates them C. is afraid of them D. want to set them free E. seldom loves them 26. choose the proper sequencing: He was so kind and generous that P: he not only Q: made others do so

R: S:

but also helped them himself

The Proper sequence should be: A. PSRQ B. SPQR C. PRSQ D. QPRS 27. You haven't had your lunch yet, ...... you? A. are B. aren't C. have D. haven't 28. choose the part of the sentence having an error in it: A. C. 29. We went P: along the railway line Q: and had a right to R: where other people not allowed to go S: but daddy belonged to the railway The Proper sequence should be: A. RPQS B. PRSQ C. RSQP D. PRQS 30. how many questions have you solved correctly of this paper? He loved B. none but his neighbour's daughter. D.

No error.