| 1. Number of null pointers in any binary tree = n+1
2. max(t1,t2,…tn) = pipelining
3. 50% -DBETXXXXXX - density
4. print (Head(T)) Traverse(left(T)) print (Head(T)) Traverse(right(T)) - ans: none of the above
5. CPU scheduling based questions
11. if even x/2 else p(p(3x+1))
2^k + 1: 3 . 2^(k-1) clarify this with sans
6. Compiler - related Qn.
7. LAN frames - ? related Qn.
8. sliding window protocol
9. kernel mode - deallocate resource
10. Combinatorics related
11. priority scheduling
12. cobegin begin x = y; x= x+1; y= x begin x =y; z= z+1; y= z coend
ans. Number of values possi = 2
13. 2 bits flip / 2 bits exchange
ans : the word with one ‘1′
14. any addr K^+ v(a) + 2I - 2a
clarify with SANS.
15.Least no. when divide by [7 gives remainder 6,6gives 5,5 gives 4 and soon ans;419
16,What compilation do (ans source code to obj)
17.Artficial language is provided which of the language (Lisp) check
18. 241 change its equivalent octal ?
19. for cube and sphere 3 views are similarly draw one such figure?
20. Write a program to exchange two variaables without temp
21. Fortran cannot have value by reference
22. 4,6,8,__
23. success is to failure, joy is to
24. MEANING OF JOLLY?
25. opposite to essential?
26.”Raw” means
27. To be good “Wrestler ” one should have?
28. “Command” opposite?
29. genuine opposite?
30. Sum of two consecutive nos is 55, larger one is?
31. A person goes 4/5 of his usual speed reaches 10min lateto his destinaton, time taken?
32. 80% pass in english, 70%pass in maths , 10%fail in both , 144 pass in both . How many all appeared to the test?
33. To get a parabola if you cut a section of?
34. Bird is flying 120km/hr b/w B to R. two trians at B to R at 60 kmph The distance trvelled by the bird before it is killed.Ans.120
35. meaning of inert
|
Monday, November 17, 2008
c++ quesfor placement / aptitude / interview/assessment/multiple choice/career/campus
* What is a container class? view answer
* What is an orthogonal base class? view answer
* What is a node class? view answer
* Name some pure object oriented languages. view answer
* What are proxy objects? view answer
* What are the conditions that have to be met for a condition to be an invariant of the class? view answer
* Define precondition and post-condition to a member function. view answer
* What do you mean by Stack unwinding? view answer
* What is class invariant? view answer
* What is a Null object? view answer
* What is an adaptor class or Wrapper class? view answer
* Differentiate between the message and method. view answer
* What is a dangling pointer? view answer
* *i=0; view answer
* int *i=0x400 // answer = ? view answer
* What is an incomplete type? view answer
* List out some of the object-oriented methodologies. view answer
* List out some of the OODBMS available. view answer
* What is an Iterator class? view answer
* What is the use of ?using? declaration. view answer
* Define namespace. view answer
* When does a name clash occur? view answer
* Differentiate between a template class and class template. view answer
* What is an accessor? view answer
* What is a modifier? view answer
* How do you find out if a linked-list has an end? (i.e. the list is not a cycle) view answer
* How do you write a function that can reverse a linked-list? view answer
* Can a copy constructor accept an object of the same class as parameter, instead of reference of the object? view answer
* What is a local class? Why can it be useful? view answer
* hat is a nested class? Why can it be useful? view answer
* What are the access privileges in C++? What is the default access level? view answer
* What is multiple inheritance(virtual inheritance)? What are its advantages and disadvantages? view answer
* How do you access the static member of a class? view answer
* What does extern "C" int func(int *, Foo) accomplish? view answer
* What are the differences between a C++ struct and C++ class? view answer
* Can you overload a function based only on whether a parameter is a value or a reference? view answer
* Can you think of a situation where your program would crash without reaching the breakpoint which you set at the beginning of main()? view answer
* What is Virtual Destructor? view answer
* How can I handle a destructor that fails? view answer
* How can I handle a constructor that fails? view answer
* What is the difference between const char *myPointer and char *const myPointer? view answer
* How are prefix and postfix versions of operator++() differentiated? view answer
* What is the difference between a pointer and a reference? view answer
* What is name mangling in C++?? view answer
* What happens when you make call "delete this;" ?? view answer
* What is "this" pointer? view answer
* What is Overriding? view answer
* What is overloading?? view answer
* What is inline function?? view answer
* What is a container class? What are the types of container classes? view answer
* Name the operators that cannot be overloaded?? view answer
* What do you mean by Stack unwinding? view answer
* What is a dangling pointer? view answer
* What is an Iterator class? view answer
* What is the use of 'using' declaration? view answer
* What problem does the namespace feature solve? view answer
* What is Memory alignment?? view answer
* What is pure virtual function? or what is abstract class? view answer
* What is virtual function? view answer
* When are temporary variables created by C++ compiler? view answer
* When do use "const" reference arguments in function? view answer
* What is reference ?? view answer
* What are storage qualifiers in C++ ? view answer
* What is the diff between "new" and "operator new" ? view answer
* What is diff between malloc()/free() and new/delete? view answer
* What is conversion operator?? view answer
* What is conversion constructor? view answer
* What is assignment operator? view answer
* What is copy constructor? and copy constructors called? view answer
* What is default constructor? view answer
* What is destructor? view answer
* What is constructor or ctor? view answer
* What is Polymorphism?? view answer
* What is inheritance? view answer
* What is encapsulation?? view answer
Quantitative Aptitude for placement / aptitude / interview/assessment/multiple choice/career/campus
Quantitative Aptitude
1. Five boys were climbing a hill. J was following H. R was just ahead of G. K was between G & H. They were climbing up in a column. Who was the second?
Answer 1: G.
Explanation: The order in which they are climbing is R – G – K – H – J
2-5 John is undecided which of the four novels to buy. He is considering a spy
thriller, a Murder mystery, a Gothic romance and a science fiction novel. The books are written by Rothko, Gorky, Burchfield and Hopper, not necessary in that order, and published by Heron, Piegon, Blueja and sparrow, not necessary in that order.
(1) The book by Rothko is published by Sparrow.
(2) The Spy thriller is published by Heron.
(3) The science fiction novel is by Burchfield and is not published by Blueja.
(4)The Gothic romance is by Hopper.
2. Pigeon publishes ____________.
3. The novel by Gorky ________________.
4. John purchases books by the authors whose names come first and third in alphabetical order. He does not buy the books ______.
5. On the basis of the first paragraph and statement (2), (3) and (4) only, it is possible to deduce that
1. Rothko wrote the murder mystery or the spy thriller
2. Sparrow published the murder mystery or the spy thriller
3. The book by Burchfield is published by Sparrow.
Answer:
Novel Name Author Publisher
Spy thriller Rathko Heron
Murder mystery Gorky Piegon
Gothic romance Burchfield Blueja
Science fiction Hopper Sparrow
Explanation:
Given
Novel Name Author Publisher
Spy thriller Rathko Heron
Murder mystery Gorky Piegon
Gothic romance Burchfield Blueja
Science fiction Hopper Sparrow
Since Blueja doesn’t publish the novel by Burchfield and Heron publishes the novel spy thriller, Piegon publishes the novel by Burchfield.
Since Hopper writes Gothic romance and Heron publishes the novel spy thriller, Blueja publishes the novel by Hopper.
Since Heron publishes the novel spy thriller and Heron publishes the novel by Gorky, Gorky writes Spy thriller and Rathko writes Murder mystery.
6. If a light flashes every 6 seconds, how many times will it flash in ¾ of an hour?
Answer: 451 times.
Explanation: There are 60 minutes in an hour.
In ¾ of an hour there are (60 * ¾) minutes = 45 minutes.
In ¾ of an hour there are (60 * 45) seconds = 2700 seconds.
Light flashed for every 6 seconds.
In 2700 seconds 2700/6 = 450 times.
The count start after the first flash, the light will flashes 451 times in ¾ of an hour.
7. If point P is on line segment AB, then which of the following is always true?
(1) AP = PB (2) AP > PB (3) PB > AP (4) AB > AP (5) AB > AP + PB
Answer:
(4)
Explanation:
P
A -----------> B
Since p is a point on the line segment AB, AB > AP
8. All men are vertebrates. Some mammals are vertebrates. Which of the following conclusions drawn from the above statement is correct.
(a)All men are mammals
(b)All mammals are men
(c)Some vertebrates are mammals.
(d)None
Answer: (c)
9. Which of the following statements drawn from the given statements are correct?
Given:
All watches sold in that shop are of high standard. Some of the HMT watches are sold in that shop.
a) All watches of high standard were manufactured by HMT.
b) Some of the HMT watches are of high standard.
c) None of the HMT watches is of high standard.
d) Some of the HMT watches of high standard are sold in that shop.
Answer: (b) & (d).
1. It was calculated that 75 men could complete a piece of work in 20 days. When work was scheduled to commence, it was found necessary to send 25 men to another project. How much longer will it take to complete the work?
Answer 1: 30 days.
Explanation:
Before:
One day work = 1 / 20
One man’s one day work = 1 / ( 20 * 75)
Now:
No. Of workers = 50
One day work = 50 * 1 / ( 20 * 75)
The total no. of days required to complete the work = (75 * 20) / 50 = 30
2. A student divided a number by 2/3 when he required to multiply by 3/2. Calculate the percentage of error in his result.
Answer 2: 0 %
Explanation: Since 3x / 2 = x / (2 / 3)
3. A dishonest shopkeeper professes to sell pulses at the cost price, but he uses a false weight of 950gm. for a kg. His gain is …%.
Answer 3: 5.3 %
Explanation: He sells 950 grams of pulses and gains 50 grams.
If he sells 100 grams of pulses then he will gain (50 / 950) *100 = 5.26
4. A software engineer has the capability of thinking 100 lines of code in five minutes and can type 100 lines of code in 10 minutes. He takes a break for five minutes after every ten minutes. How many lines of codes will he complete typing after an hour?
Answer 4:
250 lines of codes
5. A man was engaged on a job for 30 days on the condition that he would get a wage of Rs. 10 for the day he works, but he have to pay a fine of Rs. 2 for each day of his absence. If he gets Rs. 216 at the end, he was absent for work for ... days.
Answer 5:
7 days
Explanation:
The equation portraying the given problem is:
10 * x – 2 * (30 – x) = 216 where x is the number of working days.
Solving this we get x = 23
Number of days he was absent was 7 (30-23) days.
6. A contractor agreeing to finish a work in 150 days, employed 75 men each working 8 hours daily. After 90 days, only 2/7 of the work was completed. Increasing the number of men by ________ each working now for 10 hours daily, the work can be completed in time.
Answer 6: 150 men.
Explanation:
One day’s work = 2 / (7 * 90)
One hour’s work = 2 / (7 * 90 * 8)
One man’s work = 2 / (7 * 90 * 8 * 75)
The remaining work (5/7) has to be completed within 60 days, because the total number of days allotted for the project is 150 days.
So we get the equation
(2 * 10 * x * 60) / (7 * 90 * 8 * 75) = 5/7 where x is the number of men working after the 90th day.
We get x = 225
Since we have 75 men already, it is enough to add only 150 men.
7. what is a percent of b divided by b percent of a?
(a) a (b) b (c) 1 (d) 10 (d) 100
Answer 7 : (c) 1
Explanation:
a percent of b : (a/100) * b
b percent of a : (b/100) * a
a percent of b divided by b percent of a : ((a / 100 )*b) / (b/100) * a )) = 1
8. A man bought a horse and a cart. If he sold the horse at 10 % loss and the cart at 20 % gain, he would not lose anything; but if he sold the horse at 5% loss and the cart at 5% gain, he would lose Rs. 10 in the bargain. The amount paid by him was Rs._______ for the horse and Rs.________ for the cart.
Answer 8 : Cost price of horse = Rs. 400 & the cost price of cart = 200.
Explanation:-
Let x be the cost price of the horse and y be the cost price of the cart.
In the first sale there is no loss or profit. (i.e.) The loss obtained is equal to the gain.
Therefore (10/100) * x = (20/100) * y
X = 2 * y -----------------(1)
In the second sale, he lost Rs. 10. (i.e.) The loss is greater than the profit by Rs. 10.
Therefore (5 / 100) * x = (5 / 100) * y + 10 -------(2)
Substituting (1) in (2) we get
(10 / 100) * y = (5 / 100) * y + 10
(5 / 100) * y = 10
y = 200
From (1) 2 * 200 = x = 400
9. A tennis marker is trying to put together a team of four players for a tennis tournament out of seven available. males - a, b and c; females – m, n, o and p. All players are of equal ability and there must be at least two males in the team. For a team of four, all players must be able to play with each other under the following restrictions:
b should not play with m,
c should not play with p, and
a should not play with o.
Which of the following statements must be false?
1. b and p cannot be selected together
2. c and o cannot be selected together
3. c and n cannot be selected together.
Answer 9 : 3.
Explanation:
Since inclusion of any male player will reject a female from the team. Since there should be four member in the team and only three males are available, the girl, n should included in the team always irrespective of others selection
10. Five farmers have 7, 9, 11, 13 & 14 apple trees, respectively in their orchards. Last year, each of them discovered that every tree in their own orchard bore exactly the same number of apples. Further, if the third farmer gives one apple to the first, and the fifth gives three to each of the second and the fourth, they would all have exactly the same number of apples. What were the yields per tree in the orchards of the third and fourth farmers?
Answer 10 : 11 & 9 apples per tree.
Explanation:
Let a, b, c, d & e be the total number of apples bored per year in A, B, C, D & E ‘s orchard.
Given that a + 1 = b + 3 = c – 1 = d + 3 = e – 6
But the question is to find the number of apples bored per tree in C and D ‘s orchard. If is enough to consider c – 1 = d + 3.
Since the number of trees in C’s orchard is 11 and that of D’s orchard is 13. Let x and y be the number of apples bored per tree in C & d ‘s orchard respectively.
Therefore 11 x – 1 = 13 y + 3
By trial and error method, we get the value for x and y as 11 and 9
Send the answer as soon as possible to sandeepkumar@sandeepinfo.com
First five correct answer sender's name will be displayed on main page of sandeepinfo.com
Please send your college and branch name also with your answer.
All the Best
Posted by SandeepInfo at 8:37 PM 0 comments
Labels: Aptitude
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)
Links to new Blogs
* Interview Questions
* Puzzle World
* Expert Comments
* Great Shayari
* SMS World
* Jokes (Don't Laugh)
Click here to join campus_online
Click to join campus_online
Usful Links
* Home
* Puzzle World
* Interview Questions
* Send Free SMS
* Great Shayari
* Jokes (Don't Laugh)
* SMS World
* Problem Solver
Your Ad Here
Blog Archive
* ▼ 2007 (15)
o ▼ May (13)
+ Urgent
+ Campus_14
+ Campus_13 (C Question)
+ Campus_12 (Math - Aptitude)
+ Campus_11
+ Campus_10 (C Question)
+ Campus_9 (C Interview Questions)
+ Campus_8 (OS question)
+ Campus_7 (FAQ's)
+ Campus_6 (Quantitative Aptitude)
+ Campus_5( C Questions)
+ Campus_4 (C,C++ questions)
+ Campus_3(Quantitative Aptitude)
o ► April (2)
+ Campus_2(SQL - Question)
+ Campus_1 (C++ Question)
Labels
* Aptitude (4)
* C (4)
* C Interview Question (3)
* C++ (1)
* C++ Interview Questions (1)
* Operating System (1)
* SQL Question (1)
INFOSYS-PAPER9
INFOSYS-PAPER9
INFOSYS-PAPER10
INFOSYS-PAPER10
| | |
| 1. int a=2; f1(a++); } f1(int c) { printf(”%d”, c); } 1)fallacy f() { int a; void c;f2(&c,&a);
2)a=0; b=(a=0)?2:3; a) What will be the value of b? why b) If in 1st stmt a=0 is replaced by -1, b=? c) If in second stmt a=0 is replaced by -1, b=?
3)char *a[2] int const *p; int *const p; struct new { int a;int b; *var[5] (struct new)
4)f() { int a=2; f1(a++); } f1(int c) { printf(”%d”, c); } c=?
5)f1() { f(3);} f(int t) { switch(t); { case 2: c=3; case 3: c=4; case 4: c=5; case 5: c=6; default: c=0;} value of c?
6)Fallacy int *f1() { int a=5; return &a; } f() int *b=f1() int c=*b; }
7)a)Function returning an int pointer b)Function ptr returning an int ptr c)Function ptr returning an array of integers d)array of function ptr returning an array of integers (See Scham series book)
8)fallacy int a; short b; b=a;
9)Define function ?Explain about arguments?
10)C passes By value or By reference?
11)Post processed code for abc=1; b=abc1; (1 or 2 blank lines are given) strcpy(s,”abc”); z=abc;
12)difference between my-strcpy and strcpy ?check
13)f() { int *b; *b=2; }
14)Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.(Study)Check
15)Calling refernce draw the diagram of function stack illustrating the variables in the —–then were pushed on the stack at the point when function f2 has been introduced type def struct { double x,double y} point; main( int argc, char *arg[3]) {double a; int b,c; f1(a,b);} f1(double x, int y) { point p; stack int n; f2(p,x,y)} f2(point p, double angle) { int i,j,k,int max) } |