Pages

Tuesday, December 27, 2011

Webyog Interview pattern Full

WEBYOG's written test.


At first, i received a mail to complete an assignment and submit it. I did the same and got shortlisted for the next round(written test).

The written test pattern was as follows:
I got Set- C, so i only know about that :mrgreen:

1. Which is your favorite algorithm? Why?
2. Which programming trick in C++/Java you like the most? Why?

And then there were 8 questions out of which 4 were to be answered (No issues on your selection of questions)

C/C++
1. WAP to delete the middle integer number from an array of size 10.
2. Write a function using pointers to reverse a string. (signature of function was provided).

Java
1. WAP to enter 2 integers from Command Line and add them.
2. WAP to reverse a string and display it.

Javascript
1. Write a function to delete the duplicate words in a given string. (A string was provided)
2. Write a function to delete the integers present in a string. (A string was provided)

And 2 questions on DotNet which i don't remeber as i didn't attempt :oops:

I advice you to study DBMS also along with brushing up any 3 of these languages as the pattern keeps on changing.
A little knowledge of Networking will also be handy...

Next Round:

They've called me up again on 5th Dec..

I went there yesterday at 3pm. Only 6 people were called.

Part 1.
The inteviewer came and asked me to come in at around 3:45 pm.
He is a nice guy, asks me my native place and then about my college and all...
Then he asked me why i chose java over c?? i explained...seems he was interested..
He said "Now lets check out how much you know about java"...
He starts with my answer sheet of the written test. He asked questions and also to dry run my programs.
Then he asked me to write a program to find a pattern match in java..i gave a good answer i think 
and then he asked me questions on threading and its life cycle..i explained with the diagram.. and also about the importance of run method...I gave a good answer...he is really impressed this time!!!
Then he asked me questions about constructors by writing a small program...and also about copy constructor and how to implement it in java... answered confidently...
Then he asked me about virtual functions and pure virtual functions and interfaces...explained all and the discussion went on for next 10 min..
He finally said "Okay Anubhav, we are not working on java in our company, now what will you do??" I answered confidently " Sir, I'm an Active learner, i'll have a good look at my profile and the with right guidance, i'll learn everything to make myself productive for the company in short time." He said "And if you aren't provided any guidance, then??" I said " Sir, it solely depends on me then, and i am confident that i will come up to the company's standards."
Then he said " Okay Anubhav, I'm done with you. Wait outside."
I thanked him and came out of the room. It was around 4:30 pm when i came out..

The other 2 girls and a boy were interviewed by a female interviewer, and they were sent back..i don't know what they were told...

Part 2.
I was waiting outside...The interviewer asked anothe boy to come in..but he sent him back in 15 min, and asked him to send me in..
I went in again..and at this point of time..i was blank 
He said " Boss, i forgot to ask you about your projects..come have a seat and tell me what projects you did.."
And I gave him a good smile and explained both of my projects in detail and with confidence.
By that time, he was writing something on my resume and my answer sheet he had with him..
He asked several questions and i answered those.
Finally, he said " Okay Boss, now i'm done with you, wait outside..and ask the last candidate to come in...."
I thanked him again and came out..
The time was 5:10 pm..

I was sitting alone at the reception.
It was around 6 pm when receptionist came and asked me to have a break of 10-15 min and come back.
I came out, had a cold drink and went back..

Part 3.
It was around 6:15 pm..
This time i think he is a Senior programmer.
He called me up, I wished him good evening and he asked me to sit.
Then he said " Why didn't you got placed on campus??" I explained him..
Then he said again " Why you chose java???" then again i put my points. He nodded.
Then he asked me about wrapper class and vector class. Explained..
He said " How good is your C and C++??"
I said " I'm good at both sir, and I'm proficient in java.."
Then he asked me 2 questions about pointers... I answered one correct and 1 wrong..
Then he asked me the difference between Group By, Having and Where clause...explained it..
At last he said, " Okay Anubhav, I want you to meet my colleague on 5th Dec, come around 3pm."
I thanked him and said "It was pleasure meeting you sir.." and came out at around 6:45 pm.

Please Please Please share your experiences with Webyog here. At least some will be benefited.

Sunday, November 20, 2011

TCS PATTERN & INTERVIEW

TCS conducted campus interviews for our college students . It follows 3 or 4 stages based on panel you were sent through the Selection Procedure. The stages may be

 1. Written Test
    common for everyone except for top 5 in circuit branches like ECE, CSE, IT, EEE, EIE
    Top 5 students in above mentioned branches can attend direct TECHNICAL INTERVIEW
  
    written test was held on 27th of November.
    The test was of duration 1hour 20 min containing 35 questions  with 1 mark for every positive response and one-third negative marks for wrong option chosen
    There will be different slots for the written test.
    The questions will be quantative aptitude only with a mix of logical reasoning and sometimes very lengthy questions but simple logic
    if you know the concept there will be sufficient time for the questions

          The better way deal the written test is to solve as many as previous papers possible. Form a study group and discuss the problems of previous papers throughly and know the concept in them. This is just enough to crack written exam why because TCS gives repeated  questions with just change in numbers. I give 100% assurance if you this method to crack the written exam.

I wrote my written test in the opening slot as per my TCS registration number. It is an online exam. Be careful with the controls (like button) and dont submit your test in a hurry manner as you may be disqualified. I answered questions randomly and tried to maximize my score with accuracy. After a complete overlook i picked one by one carefully and then answered them. Finally as the time is up i answered 33 questions and i have doubt on one question and for the other when i tried to attemped to it my time was over.

 The results were declared around 8pm. I got on to next round. Totally 383 students cleared the test from our college and 59 from our department (including top 5)      

2. Technical Interview
    
         As per my experience if you have minimum basics in your subjects it is easy to get through. you should be able to speak clearly in english with confidence.It is in your hands to get the interviewer into your field.

   My Interview was Technical-cum-Management Round
   i entered the room around 4 pm. He said me take your seat. I sat on chair before interviewer holding my file on my lap. Through out my interview i was positive, responsive and confident. the interviewer saw my name BHARGAVA RAM KOTI on my resume and said yours is very powerful name isnt' it ..he said. I said "yes sir"

 he asked what subject do you Know?

 i said only JAVA and nothing more than that. here one thing is important. if you know any subject very well whether if you 1 or 2 it doesnt
 matter. It becomes important  how you answer the questions. the dont care how many subjects you know. If you know even 1 subject perfect thats enough to crack the interview.

He asked me "Ok Bharagava Ram mention about urself "

   I started with my schooling ,intermediate and about my study in BEC .I mentioned my SUN CERTIFICATION IN JAVA. I also said that my college gave me enough exposure to give equal importance for extra-circular, co-circular activities (because i have won many prizes in various technical,literary events) and my academics. Additionally i said that i said my performance was consistent  from 10th to B.tech as percentage was very near.

after this,
He then asked me suddenly a managerial question "If you are in a institution, you have done enough hardwork and there is no recognition and other one is recognised.how will solve such Problem"?
I then replied "When i am in a team i want only work to be completed and i said i dont want recognition"
The interviewer said "You should definitely say me the solution"
I responded as "sir, at present i have never such problem .when i get into real corporate world my experience in the industry will solve such kind of Problems"
the interviewer said "ok very good"
He asked About JAVA
I said complete history of Java and how it was comparitvely evolved as of C and C++
He then asked me "give me the differences between c and java"
I replied as "platform independent,garbage collection, pointers"
he then said me to say new differences other than those.
i replied a bit different by explaining turbo c, c++ compilers in c and about javac compiler in JAVA and the information about how java was useful in EJB's  of enterprise applications and compared to C language
He suddenly asked the "What is EJB"?  so, be cautous about what you speak.!!!
I said about EJB (Enterprise Java Beans) as we have them in 4-1 semester as a part of our curriculum  and most recent one!!
He finally asked "When you many oppurtunities like MS and M.tech. Why do you prefer this job????"
I said i am a programmar in JAVA and i won many prizes in technical events.this wants me to established in software industry.My family conditions also compelled me to go to job due to fininancial problems.
he then said "thank you,all the best"

there were some students send to MR (Management Round) and then to Human Resources Round.

3. HR Interview

   It was around 2:15 pm on 29th Nov. Before i entered my interview room there was power loss. I reached the and i stopped at the door,but my interviewer called me in the dark  with a hand move. I went inside and he asked me to take mn theren y seat.

He then asked me "what man before u came inside why there is a power loss??"
I said as "exceptional case"
he then said "Elders say that when there is light they say something good will happen but what's this????"
I replied him as "when we are dedicated and such kind of obstacles dont have any effect and we have to carry on our own work as there will be problems in life."
"ok" he said
He asked me "Why TCS"?
. i said him few points and he asked me "have the biscuit on table"
I hesitated to take for 3 times as he was repeatedly asking and finally ate with answering the question
he then asked my family background and my sister edcation
I replied him by saying them
Now its the "chocolate turn" he asked asked to eat that but i refused and he said he would give  it to next member. I said "noproblem"
He finally asked me two weaknesses
I said my weakness
He said "ok Bhargav ALL THE BEST Thnk you"

MY Interview was over.

I came out and waited for result.

They declared results after 8:30pm and i got placed in TCS. 234 from our college and 35 from our department.

Here one thing is important. You should be very interactive and give positive reponse. My HR interview so strange when compared to others.you should be in a position to handle any situation. When they ask you to say about "Tell me about yourself". Be well prepared to say uninterruptedly.

Finally, ALL THE BEST for your future proceedings

HR interview with Infosys on 07 SEP 2011 in PATIALA

Following is an approximate narration of my HR interview with Infosys. The answers mentioned here need not be correct. But I managed to stay confident and somehow got selected. (I couldn’t remember all of it, but it’s nearly the same)

Note: Most of the questions are raised from your resume, so always have enough knowledge about each thing that you mention. I hope it can help.

“Good afternoon sir” v Good-afternoon, please have a seat.
“Thank you” v Fill up this sheet.
A sheet with columns for my rollno, name and signature was filled.
Give me your resume.
I opened the portfolio, took out the resume and handed over gently
So your father works in NTPC?
“No sir, my mother is a school teacher there and thus we are living in the quarter allotted to us. My father is a businessman”
What kind of business?
“He deals with plastic bottles and their marketing”
Only marketing? No manufacturing?
“Manufacturing as well, but not on that level”
Interviewer analyzes the resume
What is this KPS?
“It is Kalka Public School in New Delhi, I lived there in a hostel during my +1 and +2.”
So what difference did you find in the hostel life?
“I learned a lot of things in the hostel, being independent and understanding people are some of them. Also, as I am the only child of my parents, I learned sharing stuff and adjusting with my room-mates there.”
Other than the unavailability of home-cooked food, what problems did you face in the hostel?
“I missed the guidance of my father, because at home he was always there for me guiding me through every walk of life. This was somaething I had to learn to live without.”
I am talking about the problems in your hostel.
“Oh! In the hostel itself, brooming and washing my clothes was a new thing for me as I never did it at home.”
So how did you manage?
“I learnt it eventually as I had no other option; moreover all my fellow hostellers were facing the same problems so we all helped each other.”
After what time did you wash your clothes? Once a month or once a week?
“Once a week, because I had enough clothes with me to manage for that period of time”
So how did you get into this University, via AIEEE or what?
“Yes, I came here through AIEEE. There was a counselling organized by PTU and as my rank was good enough, I got the seat here.”
So where are you living now?
“I live outside the university in a rented room as I couldn’t get the hostel in the first place due to the shortage of rooms”
How many roomies do you have?
“Earlier I was living alone, but now there are 3 of us.”
Who does the cleaning here? Do you have any turns for that?
“No sir, we don’t do it by turn. All three of us clean the room together once a week by dividing the work. Like… one of us would be brooming while the other would be cleaning the stuff, etc”
And what about the food; who cooks?
“None of us can cook, so we have our food outside. As the university allows us to open an account at the hostel mess, we used to eat there but these days we are relying on the outside restaurants and Dhabas, because we found that the food quality is good here.”
You didn’t find the food quality good in Delhi?
“We have all kind of food in Delhi and with pretty good quality as well. But the hygiene and quantity was not that good as compared to Punjab if we talk about it at the student level. I mean within my budget.”
And what kind of problems did you find here?
“I didn’t find many problems here, as the people are very helping and friendly. I made friends quickly and managed well. Of course the language problem was there at first because I didn’t know Punjabi, but I got over it soon.”
So how many friends do you have here?
“Well I don’t have an exact count of them coz there are many, actually I have been hanging out with a lot of people”
And what about good friends?
“Again there are many and for my birthday if I treat all of them, the count reaches about 40 easily. But if being together all the time is your concern, then there are just 3 of us.”
Which stream do you have here?
“Computer science”
You had it by choice or by default?
“By choice sir!”
Which is the mother branch of computer science?
“I am not sure about that, but it is a kind of science. So maybe the mother branch is Science only”
(Please email me the correct answer at kushal.ashok@gmail.com)

So where did you do your summer training?
“I had my summer training at HCL CDC Ghaziabad and made a project using Dot NET, but I really enjoyed my training at MSME in Delhi, when I learned Mobile Phone repairing. We learned how to check all the components, by using the circuit diagram and a lot of other things.”
Do we have the same circuit diagram for all brands of mobile?
“No sir, each model has a different circuit diagram. Of course the components are mostly the same, but knowing the circuit is very important for repairing.”
Where do you get this circuit diagram from?
“All these are easily available at Gaffar market in Carol Bagh, Delhi. Rather one can buy the whole mobile repairing kit from there as it is the hub for mobile phones.”
So if we bring a mobile from America, can we make it work here in India?
“Yes sir, we can make it work, because the technology used behind is the same these days. The only difference might be coz of the radio frequencies. If the phone supports enough frequency bands, we can make it happen. Also, there are certain codes and methods which can unlock the phone and make it work in a different scenario.”

What are the main causes of defects in a mobile?
“There are three major causes… moisture, dust and shock. For those with shock, we mostly need to check the components but we can try getting rid of the dust and moisture by cleaning the mobile with acetone.”

And you like motorcycling?
“Yes sir, it is my favourite hobby. I have joined a club in Delhi and we organize various trips which are open to all. Generally the motorcycling clubs have some restrictions like… you need to own a particular kind of bike like Royal Enfield. But we never had such restrictions in our club.”
But one still need to have a motorcycle to join, right?
“Yes sir, but one can be a pillion rider as well and we encourage and arrange the rides for those who don’t have a vehicle but want to join”
Do you have 2-stroke or 4 stroke bikes?
“2 stroke motorcycles are not in the market sir, most of them are 4 stroke”
What do you mean by 4 stroke?
“Sorry sir, I do not have the answer for that. But I always try to learn more and more by paying attention and learning from my mechanic when I get my bike serviced.”
(The four strokes refer to intake, compression, combustion (power), and exhaust cycles that occur during two crankshaft rotations per power cycle of the four cycle engines. reference: http://en.wikipedia.org/wiki/Four-stroke_engine )
But as you are so much interested in motorcycling, you must know this right?
“Definitely sir, but I am still learning and as you have mentioned it I am certainly going to Google it when I get back home.”
Which bike do you have?
“I have a Bajaj XCD right now”
What is the horse power that it provides?
“It’s around 12 bhp”
What do you understand by rpm? And how does it affect a bike?
“It is rotations per minute. When one needs to buy a bike, the one which can produce more bhp at lesser rpm is considered to be more powerful. Also there is a bore to stroke ratio which is directly proportional to the engine’s output. The bore means diameter of the cylinder bore and stroke is the length through which the piston moves.”
Ok. Do you have any questions?
“No sir”
Thank you
“Thank you sir, it was really nice talking to you”

Tuesday, September 20, 2011

Tips To Face An Interview

Here are 15 tips you can follow while you attend an interview!!

1. Prepare your resume which shows all your achievements upto date.

2. Know the nature of the company and their requirements for the job.

3. Be in proper Dress code.

4. Reach the interview place earlier than the prescribed the time.

5. Be positive and energetic.

6. Accept the mistake or if you don’t know any answers.

7. Don’t get discouraged during Interviews.

8. Be relaxed or don’t show your tension.

9. Stand with good posture.

10. While answering the questions

• Listen carefully the question and then answer.

• Provide examples.

• Have eye contact.

• Speak clearly.

• Never blame anyone

• Give your answers in point

11. Be clear with your project and try to explain in maximum of 5 to 10 minutes.

12. Avoid using mobile phones.

13. Know your weakness and try to avoid them or find correct reason for that.

14. Don’t feel shy to answer. Be an enthusiastic person.

15. Don’t forget to wish the Panel while you enter and come out.

Latest HCL Interview Questions And Answers

1. Which of the following involves context switch,

a) System call

b) privileged instruction

c) floating point exception

d) all the above

e) none of the above

2. In OST, terminal emulation is done in

a) Sessions layer

b) application layer

c) presentation layer

d) transport layer

3. For a  25MHz processor , what is the time taken by the instruction which needs 3 clock cycles,

a)120 nano secs

b)120 micro secs

c)75 nano secs

d)75 micro secs

4. For 1 MB memory, the  number of address lines required,

a)11

b)16

c)22

d) 24

5. Semaphore is used for

a) synchronization

b) dead-lock avoidence

c) box

d) none

6. Which holds true for the following statement

class c: public A, public B

a) 2 member in class A, B should not have same name

b) 2 member in class A, C should not have same name

c) both

d) none

7.Preproconia.. does not do which one of the following

a) macro

b) conditional compliclation

c) in type checking

d) including load file

8. Piggy backing is a technique for

a) Flow control

b) Sequence

c) Acknowledgement

d) retransmition

9. Find the output for the following C program

f=(x>y)?x:y

a) f points to max of x and y

b) f points to min of x and y

c)error

10. In signed magnitude notation what is the minimum value that can be represented with 8 bits

a) -128

b) -255

c) -127

d) 0







ANSWERS

1.  (a) System Call

2. (b) Application Layer

3.  (a) 120 nanoseconds

4.  (b) 16

5. (a) Synchronization

6. (a) 2 member in class A, B should not have same name

7. (c) In type checking

8. (c) Acknowledgement

9. (a) f points to max of x and y

10. (a)-128

Basics in C++

1.  Difference between C and C++

*C++ is Object Oriented.

*C++ uses bottom-up approach, While C uses top-down approach.

*C++ supports function overloading.

* Reference variable can be used in C++, Whereas C does not support.

*C++ support Classes

*C++ supports exception handling.

2. Operators that can not be overloaded in c++ are

* .(dot)

* ::

* ?:(ternary operator)

* sizeof()

3. Datatypes are

char – 1 byte

int – 2 bytes

short int – 2 bytes

float – 4 bytes

long int – 4 bytes

double – 8 bytes

4. Scope of variable
View Raw Code?

    #include<iostream.h>;
    int a; //<strong> Global variable</strong>
    void main()
    {
    int b; // <strong>Local Variables</strong>
    static int c; // Static variable, which is initialized to 0 automatically
    cout<<c;
    }

Output

0

5. = is used for assigning value to the variable

6. == is used for comparison

7. Types of operators

*Arithmetic operator (+,-,*,/,%)

*Compound assignment (+=, -=, *=, /=, %=, >>=, <, =, <= )

*Bitwise Operators ( &, |, ^, ~, <> )

*Logical operators ( !, &&, || )

* Conditional or Ternary operator (?:)

*sizeof() operator

* Dereference operator (.*)

* Scope resolution operator (::)

8. Basic input statement is “cin” and output statement is “cout”

9. Control structures

*simple if

* if….. else

*switch ()

*while()

*do….. while()

*for(;;)

*jump

*break

*continue

10. Call by value

The Value of the argument can be changed in the calling function, but its scope is within that calling function only.

11. Call by reference

The value of the argument is passed with address, so it’ll affect in both called function and calling function

12. Array is the group of elements of same datatype.

eg.int a[5]- allocates memory and store 5 integer value.

13.  We can use Multi Dimensional array.

eg. int matrixA[3][3] – in this we can store 9 elements.

14. A string is defined as array of characters which is enclosed within double quotes.

eg. char name= “Tech Twinklers”;

15.  Pointer is an address of variable.

16. A class is a collection of data variables and member function.

17.  An object is the instance of a class

18. There are three access specifiers, they are

*private, which is accessible only within its declared class

*protected, which can be accessed in its own class and in its inherited class.

*public, which can be accessed throughout the program.

19. Types of inheritance

Simple inheritance- Inherit the property of one base class

Multiple inheritance- Inherit the property from more than one base class.

Multi-Level inheritance

Hybrid inheritance

20. Polymorphism is the ability to overload the operator and functions.

21.  In function overloading, the function name will be same, but it differ in number of arguments and its types.

 

Verbal Questions and answers

1. In a joint family, there are father, mother, 3 married sons and one unmarried daughter. Of the sons, two have two daughter and one son. and the other has one son. How many female members are there in the family?

a) 2

b)6

c)3

d)9

2. Arun ranked 16th from the top and 29th from the bottom among those passed an examination, six boys did not participate in the competition and five failed in it. How many boys were there in the class?

a) 44

b) 55

c) 56

d) 40

3.  If 36 people can do a piece of work in 25 hours, in how many hours will 15 people do it?

a) 55

b) 50

c) 60

d) 65

4. Pointing to a photograph, a man said, “I have no brother or no sister but that man’s father is my father’s son”. Whose photograph is that?

a) His own

b) His son’s

c) His father’s

d) None of these

5. A and B are two stations 390 km apart. A train starts from A at 10 am and travels towards B at 65 kmph. Another train starts from B at 11 am and travels towards A at 35 kmph. At what time do they meet?

a) 2.15 pm

b) 1 pm

c) 2 pm

d) 1.15 pm



ANSWERS

1. d) 9

Explanation

one mother+3 wives of the son+ 4(two Daughters each son)+ one unmarried daughter.

so 1+3+4+1=9

2.  b)55

Explanation

16+(29-1)here -1 is that particular boy in 16th rank+6+5=55

3. c) 60

Explanation

15:36 : : 25:x

(15*x)=(36*25)

x=(36*25)/15=60

4. b) His son’s

Explanation

Since narrator has no brother, his father’s son is he himself. So the man who is talking is the father of the main photograph. Thus the man in the photograph is his son.

5.  a) 2.15 pm

Explanation

Consider they meet x hrs after 10 am. Then,

(Distance moved by 1st in x hrs)+( Distance moved by 2nd in (x-1) hrs)=390

Therefore 65x+35(x-1)=390

65x+35x=390+35

100x=425

x=425/100

x=4(1/4) which is 4.15 hrs

So 10+4.15 hrs=2.15 pm

TCS Aptitude Questions with Answers

Tcs aptitude questions with answers:

1 . A box of 150 packets consists of 1kg packets and 2kg packets. Total weight of box is 264kg. How many 2kg packets are there ?

Sol) x= 2 kg Packs
y= 1 kg packs
x + y = 150     ………. Eqn 1
2x + y = 264   ………. Eqn 2
Solve the Simultaneous equation; x = 114
so, y = 36
ANS :  Number of 2 kg Packs = 114.

2 . My flight takes of at 2am from a place at 18N 10E and landed 10 Hrs later at a place with coordinates 36N70W. What is the local time when my plane landed?
a)6:00 am b) 6:40am c) 7:40 d) 7:00 e) 8:00

Sol) The destination place is 80 degree west to the starting place. Hence the time difference between these two places is 5 hour 20 min. (=24hr*80/360).
When the flight landed, the time at the starting place is 12 noon (2 AM + 10 hours).
Hence, the time at the destination place is 12 noon – 5:20 hours = 6: 40 AM

3 . The size of the bucket is N kb. The bucket fills at the rate of 0.1 kb per millisecond. A programmer sends a program to receiver. There it waits for 10 milliseconds. And response will be back to programmer in 20 milliseconds. How much time the program takes to get a response back to the programmer, after it is sent?

Sol) see it doesn’t matter that wat the time is being taken to fill the bucket.after reaching program it waits there for 10ms and back to the programmer in 20 ms.then total time to get the response is 20ms +10 ms=30ms

4 . Y catches 5 times more fishes than X. If total number of fishes caught by X and Y is 42, then number of fishes caught by X?

Sol) Let no. of fish x catches=p
no. caught by y =r
r=5p.
r+p=42
then p=7,r=35

5 . Three companies are working independently and receiving the savings 20%, 30%, 40%. If the companies work combinely, what will be their net savings?
suppose total income is 100
so amount x is getting is 80
y is 70
z =60
total=210

but total money is 300
300-210=90
so they are getting 90 rs less
90 is 30% of 300 so they r getting 30% discount

6 . The ratio of incomes of C and D is 3:4.the ratio of their expenditures is 4:5. Find the ratio of their savings if the savings of C is one fourths of his income?
Sol) incomes:3:4
expenditures:4:5
3x-4y=1/4(3x)
12x-16y=3x
9x=16y
y=9x/16
(3x-4(9x/16))/((4x-5(9x/16)))
ans:12/19

7 . If G(0) = -1 G(1)= 1 and G(N)=G(N-1) – G(N-2) then what is the value of G(6)?
ans: -1
bcoz g(2)=g(1)-g(0)=1+1=2
g(3)=1
g(4)=-1
g(5)=-2
g(6)=-1

8 . what’s the answer for that :
A, B and C are 8 bit no’s. They are as follows:
A -> 1 1 0 0 0 1 0 1
B -> 0 0 1 1 0 0 1 1
C -> 0 0 1 1 1 0 1 0 ( – =minus, u=union)
Find ((A – C) u B) =?

sol ) To find A-C, We will find 2′s compliment of C and them add it with A,
That will give us (A-C)
2′s compliment of C=1′s compliment of C+1
=11000101+1=11000110
A-C=11000101+11000110
=10001001
Now (A-C) U B is .OR. logic operation on (A-C) and B
10001001 .OR . 00110011
The answer is = 10111011,
Whose decimal equivalent is 187.

9 . One circular array is given(means memory allocation tales place in circular fashion) dimension(9X7) and starting add. is 3000, What is the address of (2,3)……..
Sol) it’s a 9×7 int array so it reqiure a 126 bytes for storing.b’ze integer value need 2 byes of memory allocation. and starting add is 3000
so starting add of 2×3 will be 3012.

10 . A bus started from bustand at 8.00am at the speed of 18mph and after 30 min staying at destination, it returned back to the bustand. the destination is 27 miles from the bustand. the speed of the bus 50 percent fast IN SPEED. SO AT what time it returns to the bustand?

sol) a bus cover 27 mile with 18 mph in =27/18= 1 hour 30 min. and it wait at stand =30 min.
after this speed of return increase by 50% so 50%of 18 mph=9mph
Total speed of returnig=18+9=27
Then in return it take 27/27=1 hour
then total time in joureny=1+1:30+00:30 =3 hour
so it will  come at 8+3 hour=11 a.m.
So Ans==11 a.m

Wednesday, July 6, 2011

Tips to Improve Confidence Rapidly


If you want to improve confidence in your daily life, there are many ways you can go about it. This is, after all, a serious issue that affects every aspect of your life. It's worth devoting some time and energy to this goal!
The tips we will be covering here are not meant to be comprehensive, but designed to get you moving in the right direction. Some of them may not seem like they are directly connected to confidence, but they really are. These tips are not listed in any particular order of importance. Focus on the ones that you resonate with.

1. Learn how to breathe! Seriously, people lacking in confidence are usually shallow breathers. If you need help, study yoga, chi gung or look for books or courses on proper breathing. If you don't get enough oxygen, you will tend to feel anxious and lacking in confidence.

2. Get regular exercise. This is another way to get more oxygen, and it also gives you better health overall, which is important for confidence. Pick an exercise program you will enjoy, whether it involves sports, a gym or hiking outdoors.

3. Learn something new. Pick something that you don't urgently need to do, but that you always wanted to know, like a new language, art, dancing, cooking, a musical instrument or sport. Don't pressure yourself to excel at it, just have fun picking up a new skill.

4. Change your habits. Start in small ways, like the routes you walk or drive. Try eating different food, try a new hair style or way of dressing. It doesn't have to be drastic. The point is, people who lack confidence often seek a feeling of safety in comfortable routines -and stepping outside of your comfort zone is something you need to get comfortable with!

5. Get rid of clutter. Dump those old magazines, papers, clothes you'll never wear, broken toys from when you were twelve, etc. This is good advice for almost anyone, no matter what their issues. In this case of confidence, however, this will help you feel more clarity and a sense that you can move in new directions.

6. Pay attention to your speech patterns. Very often, people with low self confidence speak in a low or halting voice. Don't shout at people, but focus on making yourself heard. Do this when ordering your morning coffee, when talking on the phone or at a meeting at work.

7. Don't agree with everyone! Being agreeable is another habit many people need to break. Don't argue just for the sake of it; in fact you don't have to argue at all. The point is not to go out of your way to show people that you agree with them when you either disagree or are neutral. You could say something like, "I can see you point of view, but I haven't quite made up my mind yet." What you say is really not as important as how you feel as you're saying it. It's not your job to boost everyone else's ego!

8. Sit, stand and move with confidence. This may seem either silly or obvious, but how you hold yourself has a lot to do with how you feel about yourself. It works both ways. If you are feeling anxious or lacking in confidence, you will tend to slouch, look downwards and unconsciously try not to take up too much space. Yet doing these things reinforces these very feelings. So if you can sit up straight, look directly at people and walk in a way that shows you are comfortable in your own skin, you will feel this way.

9. Mirrors are your friend. At least, you can make friends with them. Very often, when we are not feeling confident, we don't like to look at our own reflection. This is another exercise that is very simple, and you don' t need to go overboard with it. When you are near a mirror, just look yourself in the eyes for a few seconds. Try to smile and feel some love for yourself. If you are in public, you can do this in a low key manner. Most importantly, don't avoid looking at yourself!

10. Keep up appearances. This may sound superficial, because it is! We are talking about appearances here. Dress in a way that makes you feel good about yourself. Likewise, keep your hair styled in a manner that compliments you. You don't need a gigantic budget to accomplish this. Just make the most of what you have, and pay attention to how you look. This isn't to impress people, it's to show yourself that you are taking the time to look your best.

TCS Interview questions with answers 2011

1. (1/3) of a number is 3 more than the (1/6) of the same number?
a) 6
b)16
c)18
d)21
Ans: 18

2. There are two water tanks A and B, A is much smaller than B. While water fills at the rate of 1 liter every hour in A, it gets filled up like, 10, 20, 40, 80, 160 in tank B. (At the end of first hour, B has 10 liters, second hour it has 20 liters and so on). If tank B is 1/4 filled of the 10 hours, what is total duration of hours required to fill it completely?
a) 12
b) 25
c) 05
d) 27
Ans: 12

3. Samita was making a cube with dimensions 5*5*5 using 1*1*1 cubes. What is the number of cubes needed to make a hollow cube looking of the same shape? If we are painting only 2 face of each cube then how many faces will remain unpaint???
a) 98
b) 104
c) 538
d) 650
Ans: 538
Sol: (5*5*5-3*3*3)=125-27=98*no of faces=98*6=588-(no of sides painted)=588-50=538

4. Middle- earth is a fictional land inhabited by hobbits, elves, dwarves and men. The hobbits and elves are peaceful creatures that prefer slow, silent lives and appreciate nature and art. The dwarves and the men engage in physical games. The game is as follows. A tournament is one where out of the two teams that play a match, the one that loses get eliminated. The matches are played in different rounds, where in every round; half of the teams get eliminated from the tournament. If there are 8 rounds played in knock out tournament, how many matches were played?
a) 257
b) 256
c) 72
d) 255
Ans: 255
Sol: 2^n-1=2^8-1=255

5. Mr. bean having magical balls 25 pink, 10 green, 31 red, 31 yellow, 30 purple. He drenched in rain red, green, and yellow turn into white what is the maximum probability of a pair of same color ?
Ans : 31+31+ 2(worst case probability)= 64

6. There is 22 friends (A1, A2, A3....A22).If A1 have to have shake with all without repeat. How many handshakes possible?
a) 6
b) 21
c) 28
d) 7
Ans: 21 since cycle will not form.

7. we are having 54 men doing hand shake in set what will be minimum required hand shakes for minimum 1 hand shake?
Ans : {1,2,3,4,5,6,…..54}
Set= { 2,5,8,………..53}
So1 set will be ans 18

8. On planet korba, a solar blast has melted the ice caps on its equator. 9 years after the ice melts, tiny planetoids called echina start growing on the rocks. Echina grows in the form of circle, and the relationship between the diameter of this circle and the age of echina is given by the formula d = 4*v (t-9) for t = 9 where d represents the diameter in mm and t the number of years since the solar blast. Jagan recorded the radius of some echina at a particular spot as 7mm. How many years back did the solar blast occur?
a) 17
b) 21.25
c) 12.25
d) 14.05

9. Ferrari S.P.A is an Italian sports car manufacturer based in Maranello, Italy. Founded by Enzo Ferrari in 1928 as Scuderia Ferrari, the company sponsored drivers and manufactured race cars before moving into production of street-legal vehicles in 1947 as Ferrari S.P.A. Throughout its history, the company has been noted for its continued participation in racing, especially in Formula One where it has employed great success .Rohit once bought a Ferrari. It could go 4 times as fast as Mohan's old Mercedes. If the speed of Mohan's Mercedes is 35 km/hr and the distance traveled by the Ferrari is 490 km, find the total time taken for Rohit to drive that distance.
a) 20.72
b) 3.5
c) 238.25
d) 6.18

10. A sheet of paper has statements numbered from 1 to 70. For all values of n from 1 to 70. Statement n says ' At least n of the statements on this sheet are false. ‘Which statements are true and which are false?
a) The even numbered statements are true and the odd numbered are false.
b) The odd numbered statements are true and the even numbered are false.
c) The first 35 statements are true and the last 35 are false.
d) The first 35 statements are false and the last 35 are false.
Sol: when
Rule 1: exact ( n-1)th will be true and other will be false
Rule2: At least (first half will be true)
Rule 3: At most (all true)
Example : exactly 40 statement 39th will be true other than it false

11. If there are 254 barrels out of them one is poisoned if a person tastes very little he will die within 14 hours so if there are mice to test and 24 hours to test, how many mices are required to find the poisoned can?
a) 3
b) 2
c) 6
d) 8
Ans : 2^n > no of barrels
Then n=will be required mice N=8

12. Consider two tumblers, the first containing Water and next contains coffee. Suppose you take one spoon of water out of the first tumbler and pour it into the second tumbler. After moving you take one spoon of the mixture from the second tumbler and pour it back into the first tumbler . Which one of the following statement holds now?
a) There is less coffee in the first tumbler than water in the second tumblers
b) There is more coffee in the firs tumbler than water in the second tumbler
c) There is as much coffee in the first tumbler as there is water in the second tumbler
d) None of the statements holds true
Ans: both will be equal

13. Given a collection of points P in the plane, a 1-set is a point in P that can be separated from the rest by a line, that is the point lies on one side of the line while the others lie on the other side. The number of 1-sets of P is denoted by n1(P). The minimum value of n1(P) over all configurations P of 5 points in the plane in general position (that is no three points in P lie on a line) is
a)3
b)5
c) 2
d)1
Ans: 5 same as given no of points

14. The citizens of planet nigiet are 8 fingered and have thus developed their decimal system in base 8. A certain street in nigiet contains 1000 (in base 8) buildings numbered 1 to 1000. How many 3s are used in numbering these buildings?
a) 54
b) 64
c) 265
d) 192
Ans: 192
Some times base value is change like: 9finger, 1 to 100(base 9)
For 1..100 = 2x
For 1….1000 = 3*x^2

15. Given 3 lines in the plane such that the points of intersection form a triangle with sides of length 20, 20 and 30, the number of points equidistant from all the 3 lines is
a)1
b)3
c)4
d)0
Ans: 4

16. Hare in the other. The hare starts after the tortoise has covered 1/3 of its distance and that too leisurely. A hare and a tortoise have a race along a circle of 100 yards diameter. The tortoise goes in one direction and the. The hare and tortoise meet when the hare has covered only 1/8 of the distance. By what factor should the hare increase its speed so as to tie the race?
a) 30.33
b)8
c) 40
d) 5
Ans: 30.33
Sol: 1/3, 1/8
3*8=24
(24-3)=21
(21-8)=13
(21*13)/3^2

17. Here 10 programmers, type 10 lines with in 10 minutes then 60lines can type within 60 minutes. How many programmers are needed?
a) 16
b) 6
c) 10
d) 60
Solution: (men*time)/work)
Ans: 10
This type of Q's repeated 4times for me but values are different.

18. Alok and Bhanu play the following min-max game. Given the expression N = 9 + X + Y - Z Where X, Y and Z are variables representing single digits (0 to 9) Alok would like to maximize N while Bhanu would like to minimize it. Towards this end, Alok chooses a single digit number and Bhanu substitutes this for a variable of her choice (X, Y or Z). Alok then chooses the next value and Bhanu, the variable to substitute the value. Finally Alok proposes the value for the remaining variable. Assuming both play to their optimal strategies, the value of N at the end of the game would be.
a) 0
b) 27
c) 18
d) 20
The Q's concept is same but the equation of N's is changing.

19. Alice and Bob play the following coins-on-a-stack game. 20 coins are stacked one above the other. One of them is a special (gold) coin and the rest are ordinary coins. The goal is to bring the gold coin to the top by repeatedly moving the topmost coin to another position in the stack.Alice starts and the players take turns. A turn consists of moving the coin on the top to a position i below the top coin (0 = i = 20). We will call this an i-move (thus a 0-move implies doing nothing). The proviso is that an i-move cannot be repeated; for example once a player makes a 2-move, on subsequent turns neither player can make a 2-move. If the gold coin happens to be on top when it's a player's turn then the player wins the game. Initially, the gold coins the third coin from the top. Then
a) In order to win, Alice's first move should be a 1-move.
b) In order to win, Alice's first move should be a 0-move.
c) In order to win, Alice's first move can be a 0-move or a 1-move.
d) Alice has no winning strategy.
Ans: d

20. For the FIFA world cup, Paul the octopus has been predicting the winner of each match with amazing success. It is rumored that in a match between 2 teams A and B, Paul picks A with the same probability as A's chances of winning. Let's assume such rumors to be true and that in a match between Ghana and Bolivia, Ghana the stronger team has a probability of 2/3 of winning the game. What is the probability that Paul will correctly pick the winner of the Ghana-Bolivia game?
a)1/9
b)4/9
c)5/9
d)2/3
Ans: 5/9

Q21. 36 people {a1, a2, ..., a36} meet and shake hands in a circular fashion. In other words, there are totally 36 handshakes involving the pairs, {a1, a2}, {a2, a3}, ..., {a35, a36}, {a36, a1}. Then size of the smallest set of people such that the rest have shaken hands with at least one person in the set is
a)12
b)11
c)13
d)18
Ans: 12

22. After the typist writes 12 letters and addresses 12 envelopes, she inserts the letters randomly into the envelopes (1 letter per envelope). What is the probability that exactly 1 letter is inserted in an improper envelope?
a)1/12
b)0
c)12/212
d)11/12
Ans: b

23. A sheet of paper has statements numbered from 1 to 40. For each value of n from 1 to 40, statement n says "At least and of the statements on this sheet are true." Which statements are true and which are false?
a) The even numbered statements are true and the odd numbered are false.
b) The first 26 statements are false and the rest are true.
c) The first 13 statements are true and the rest are false.
d) The odd numbered statements are true and the even numbered are false.
Ans: c

24. There are two boxes, one containing 10 red balls and the other containing 10 green balls. You are allowed to move the balls between the boxes so that when you choose a box at random and a ball at random from the chosen box, the probability of getting a red ball is maximized. This maximum probability is
a)1/2
b)14/19
c)37/38
d)3/4
Ans: 14/19

25. A circular dartboard of radius 1 foot is at a distance of 20 feet from you. You throw a dart at it and it hits the dartboard at some point Q in the circle. What is the probability that Q is closer to the center of the circle than the periphery?
a) 0.75
b) 1
c) 0.5
d) 0.25
Ans: d

26. On planet zorba, a solar blast has melted the ice caps on its equator. 8 years after the ice melts, tiny plantoids called echina start growing on the rocks. echina grows in the form of a circle and the relationship between the diameter of this circle and the age of echina is given by the formula d = 4 * sqrt (t – 8)for t = 8 Where the represents the diameter in mm and t the number of years since the solar blast. Jagan recorded the time of some echina at a particular spot is 24 years then what is diameter?
a) 8
b) 16
c) 25
d) 21
Ans: 16

27. A sheet of paper has statements numbered from 1 to 40. For all values of n from 1 to 40, statement n says: 'Exactly n of the statements on this sheet are false.' Which statements are true and which are false?
a) The even numbered statements are true and the odd numbered statements are false.
b) The odd numbered statements are true and the even numbered statements are false.
c) All the statements are false.
d) The 39th statement is true and the rest are false.
Ans: d

28. Alok and Bhanu play the following coins in a circle game. 99 coins are arranged in a circle with each coin touching two other coin. Two of the coins are special and the rest are ordinary. Alok starts and the players take turns removing an ordinary coin of their choice from the circle and bringing the other coins closer until they again form a (smaller) circle. The goal is to bring the special coins adjacent to each other and the first player to do so wins the game. Initially the special coins are separated by two ordinary coins O1 and O2. Which of the following is true?
a) In order to win, Alok should remove O1 on his first turn.
b) In order to win, Alok should remove one of the coins different from O1 and O2 on his first turn.
c) In order to win, Alok should remove O2 on his first turn.
d) Alok has no winning strategy.
Ans: a if the gold coin in 3rd position then mark it otherwise leave it

29. Two pipes A and B fill at A certain rate B is filled at 10, 20, 40, 80. If 1/4 of B if filled in 21 hours what time it will take to get completely filled
Ans: 23

30. One day Alice meets pal and byte in fairyland. She knows that pal lies on Mondays, Tuesdays and Wednesdays and tells the truth on the other days of the week byte, on the other hand, lies on Thursdays, Fridays and Saturdays, but tells the truth on the other days of the week. Now they make the following statements to Alice – pal. Yesterday was one of those days when I lie byte. Yesterday was one of those days when I lie too. What day is it?
a) Thursday b) Tuesday c) Monday d) Sunday
Ans: a
.
31. Sudha Patel +> perfume factory
Ans : 2 more cedar

32. A toy train can make 10 sounds sound changes after every 4 minute now train is defective and can make only 2 sounds find probability that same sound is repeated 4 times consecutively (1 OUT OF__)?
a 16
b 8
c 12
d 4
Ans:
(1/2)*(1/2)*(1/2)*(1/2)+ (1/2)*(1/2)*(1/2)*(1/2)=(1/8)
thus 1 out of 8 ans
33. In there is a planet Oz in which there is 36 hrs in a day & 90 minutes in a hrs and 60 seconds in 1 minute it is having same pattern as our watch. Then what will be angle between hour hand and minute hand at 9:40?
a) 29
b) 12
c) 67
d) 98
Ans :29

34. In a country x we are having diff types of coins ranging from 64…512. All coins having different integral value the difference between two coins comes out to be 50% more than the former coin. Then how many coins can be made?
Ans : 6 coins
Sol.64
64*1.5=96
96*1.5=144
144*1.5=216
216*1.5=324
324*1.5=486
Then total coin will be 6

35. There is a relation is given which is n/P=195 Where n- no of steps in meters P- pace length These Is a man shivam he know his pace length =185cm then what will be the speed of shivam kmph?
Ans=195*1.85*1.85*60/1000=40.04kmph

Thursday, June 2, 2011

[ Java ] Technical Questions With Answers



Java Technical Questions With Answers

Q1. How could Java classes direct program messages to the system console, but
error messages, say to a file?
A. The class System has a variable out that represents the standard output, and the
variable err that represents the standard error device. By default, they both point at the
system console. This how the standard output could be re-directed:
Stream st = new Stream(new FileOutputStream("output.txt")); System.setErr(st);
System.setOut(st);

Q2. What's the difference between an interface and an abstract class?
A. An abstract class may contain code in method bodies, which is not allowed in an
interface. With abstract classes, you have to inherit your class from it and Java does not
allow multiple inheritance. On the other hand, you can implement multiple interfaces in your
class.

Q3. Why would you use a synchronized block vs. synchronized method?
A. Synchronized blocks place locks for shorter periods than synchronized methods.

Q4. Explain the usage of the keyword transient?
A. This keyword indicates that the value of this member variable does not have to be
serialized with the object. When the class will be de-serialized, this variable will be initialized
with a default value of its data type (i.e. zero for integers).

Q5. How can you force garbage collection?
A. You can't force GC, but could request it by calling System.gc(). JVM does not guarantee
that GC will be started immediately.

Q6. How do you know if an explicit object casting is needed?
A. If you assign a superclass object to a variable of a subclass's data type, you need to do
explicit casting. For example:
Object a; Customer b; b = (Customer) a;
When you assign a subclass to a variable having a supeclass type, the casting is performed
automatically.

Q7. What's the difference between the methods sleep() and wait()
A. The code sleep(1000); puts thread aside for exactly one second. The code wait(1000),
causes a wait of up to one second. A thread could stop waiting earlier if it receives the
notify() or notifyAll() call. The method wait() is defined in the class Object and the method
sleep() is defined in the class Thread.

Q8. Can you write a Java class that could be used both as an applet as well as an
application?
A. Yes. Add a main() method to the applet.

Q9. What's the difference between constructors and other methods?
A. Constructors must have the same name as the class and can not return a value. They are
only called once while regular methods could be called many times.

Q10. Can you call one constructor from another if a class has multiple
constructors
A. Yes. Use this() syntax.

Q11. Explain the usage of Java packages.
A. This is a way to organize files when a project consists of multiple modules. It also helps
resolve naming conflicts when different packages have classes with the same names.
Packages access level also allows you to protect data from being used by the nonauthorized
classes.

Q12. If a class is located in a package, what do you need to change in the OS
environment to be able to use it?
A. You need to add a directory or a jar file that contains the package directories to the
CLASSPATH environment variable. Let's say a class Employee belongs to a package
com.xyz.hr; and is located in the file c:\dev\com\xyz\hr\Employee.java. In this case, you'd
need to add c:\dev to the variable CLASSPATH. If this class contains the method main(),
you could test it from a command prompt window as follows:
c:\>java com.xyz.hr.Employee

Q13. What's the difference between J2SDK 1.5 and J2SDK 5.0?
A.There's no difference, Sun Microsystems just re-branded this version.

Q14. What would you use to compare two String variables - the operator == or
the method equals()?
A. I'd use the method equals() to compare the values of the Strings and the == to check if
two variables point at the same instance of a String object.

Q15. Does it matter in what order catch statements for FileNotFoundException
and IOExceptipon are written?
A. Yes, it does. The FileNoFoundException is inherited from the IOException. Exception's
subclasses have to be caught first.

Q16. Can an inner class declared inside of a method access local variables of this
method?
A. It's possible if these variables are final.

Q17. What can go wrong if you replace && with & in the following code:
String a=null; if (a!=null && a.length()>10) {...}
A. A single ampersand here would lead to a NullPointerException.

Q18. What's the main difference between a Vector and an ArrayList
A. Java Vector class is internally synchronized and ArrayList is not.

Q19. When should the method invokeLater()be used?
A. This method is used to ensure that Swing components are updated through the eventdispatching
thread.

Q20. How can a subclass call a method or a constructor defined in a superclass?
A. Use the following syntax: super.myMethod(); To call a constructor of the superclass, just
write super(); in the first line of the subclass's constructor
For senior-level developers:

Q21. What's the difference between a queue and a stack?
A. Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule

Q22. You can create an abstract class that contains only abstract methods. On
the other hand, you can create an interface that declares the same methods. So
can you use abstract classes instead of interfaces?
A. Sometimes. But your class may be a descendent of another class and in this case the
interface is your only option.

Q23. What comes to mind when you hear about a young generation in Java?
A. Garbage collection.

Q24. What comes to mind when someone mentions a shallow copy in Java?
A. Object cloning.

Q25. If you're overriding the method equals() of an object, which other method
you might also consider?
A. hashCode()

Q26. You are planning to do an indexed search in a list of objects. Which of the
two Java collections should you use:
ArrayList or LinkedList?
A. ArrayList

Q27. How would you make a copy of an entire Java object with its state?
A. Have this class implement Cloneable interface and call its method clone().

Q28. How can you minimize the need of garbage collection and make the
memory use more effective?
A. Use object pooling and weak object references.

Q29. There are two classes: A and B. The class B need to inform a class A when
some important event has happened. What Java technique would you use to
implement it?
A. If these classes are threads I'd consider notify() or notifyAll(). For regular classes you can
use the Observer interface.

Q30. What access level do you need to specify in the class declaration to ensure
that only classes from the same directory can access it?
A. You do not need to specify any access level, and Java will use a default package access
level.

[Unix] VI editor commands


Some useful vi commands

1.) vi filename gets you into the editor

2.) h - move left one space

3.) j - move down one line

4.) k - move up one line

5.) l - move right one space

6.) i - go into insert mode

7.) 'esc' key - get out of insert mode

8.) x - delete a character

9.) dd - delete the current line, 2dd delete the current and next line, 3dd etc.

10.) / - to into search mode to search for a pattern

11.) a - go into append mode to append characters, use 'esc' key to get out of this mode

12.) ctrl f - page forward one screen

13.) ctrl b - page back one screen

14.) G - the go command, type 44G to move the cursor to line 44. G w/o a line number move
you to the end of the file.

15.) ctrl g - tells you what line you are on in the file and how many lines the file contains.

16.) shift ZZ gets your file written to disk and exits the editor

17.) :quit! quits the file w/o saving your changes (in case you mess up).

[ Written test ] CTS Cognizant questions


Written test consists of three sections  CTS Cognizant.

VERBAL SECTION (25 questions-25min)
(1-10) comprehension (passages r too long)
(11-15) find the incorrect sentences
(16-20) find the correct sentences
(21-25) arrange the jumbled sentences
This is a quiet tough section. Just make guesses. Mark option B or C.Always read passage at last.Read questions first.
ANALTICAL SECTION (25 questions-30min) 
(1-5) Venn diagram 

A group is divided into three. The first group is persons of 5'6 height and second and third r 6'0 and 6'6 respectively. There r totally 130 peoples, 50 of them r 5'6 and 65 of them r 6'6, 10 of them r 5'6 and 6'6, 15 of them r 5'6 and 6, 20 of them r 6'6 and 6, and 5 of them r all the three.
(1) How many of them r 6 feet? (Ans 70)
(2) How many of them r only 6 feet? (Ans 30)
(3) How many of them are only 5’6? (Ans 20)
(4) How many of them are only 6’6? (Ans 30)
(5) How many of them are at least two? (Ans 50)  
Important formula in Venn diagram is
EXACTLY ONE = TOTAL - EXACTLY TWO - ALL THREE  
(6-10) quantitative questions  

Questions on Blood relations(quite difficult) 
Other questions r from profit loss and other general questions. Sorry I don’t remember  
(11-15) data sufficiency--Very easy one
(16-20) binary conversion
Please don’t read anything in the question. Just change any value to binary and convert that 1 to $ and 0 to *.
(Eg) LCM of (12 15 10) (ans 60 = 111100 = $$$$**)
(21-25) cubes
Questions like :if a dice is thrown 2 on top,3&5 at left &right,in another turn 5 on top,3&4 at left&right and one another condition(dont remember exactly)
21-25 What is opposite to 5?.....
NON VERBAL SECTION (20 questions-20 min)  
(1-4) syllogism (study all rules in the aggarwal book but TIME book will help u a lot)
(Eg) All mosquitoes’ are lizards.
All lizards are insects.
(Ans: all mosquitoes’ are insects)
(5-6) logical deduction (study all rules from TIME book)
(7-15) figure sequence and odd one out from figures (very easy)(just go through R S Agarwal)  
(16-17) Seating arrangement
(18-20) logical puzzle
After two hours the sortlist was declared by them .I was almost sure that I would be clearing the aptitude.

          
The Merit Track conducted the test. It was organized perfectly and they expect discipline from us.. Before the test u have to fill a form. Do it carefully because some of my friends got questions 4m tat.

1.Software Orientation:
2.Hobbies and extra-curricular activities
3.Strengths and Weakness
4.Expectation from CTS
5.Why CTS
6. Long term and short-term goal with CTS
7.What are the qualities necessary for software professional to be successful



WRITTEN TEST (3 sections) NO –VE MARKING

1.Analytical Ability (25 Q, 30 Minutes)
Venn diagram questions
Data sufficiency
coding 1 represented as $ and 0 as *(easy.. jus convert it into Binary)
Cubes related questions are very important

My suggestion is do Coding First. Then Venn dig. Cube problem n others..u can surely score full marks fm coding n venn dig…cube is also easy when u understand it.For cube take the cubic root of the no of pieces.64 means 4(keep as x value)..then 2 side painted means   12*(x-2).1side painted means 6*(x-2) 2 .  (horizontal n vertical) like wise u must think  n apply according to the question..

1.venn dig- people hving dif heights 6feet ,6’6 feet, 5’5 feet.and questions like no of people who is 6 feet.no of people who is 5’5feet…..
2.In codin there will be only normal arithmetic operations n L.c.m..i don remember them.
For ex..64/4= 16 = $****.first solve it n convert it to binary..

3.Cube- a cube of 12 cm is cut into small 3cm pieces..then place another 4 small cubes  over it..and another 2 small cubes over the 4cubes..then again one more cube over the 2 cube…the cube is then painted from top to bottom
12/3=4…so 4row 4column…draw a dig of cube first. Imagining the cube only help u to solve rather than formulas. How many cubes r painted on only one side?
how many cubes r painted on only 2 sides?
how many cubes r painted on only 3 sides?
how many cubes r painted on only 4 sides?
how many cubes r painted 0 sides?
(my friends told me tat cube problems hav more marks than other questions)

2.Verbal Ability (20 Q, 20 Min)
Comprehension
Find out the incorrect sentence
Find out the correct sentence
Jumbled Passages
-Don prepare any thing for this ..It won help u..Jumbled sent n correct incorrect sent are a little confusing..it depends on ur grammer n English language skills.  do the comprehension last(it is a very big passage..i didn’t even read  it ,jus ticked..no time)
3.Attention Details (20 Q, 20 Min)
Find the odd man out
Analogy of figures (Simple)
syllogism
Puzzle
Very easy compared to other sections..any one can crack it with out any preparation..If u think to prepare jus go through puzzle test n syllogism from R.S.Agarwal Verbal reasoning
Analogy of figures –Non verbal Reasoning
   
  Set 3
      1. A says " the horse is not black".
      B says " the horse is either brown or grey."
      c says " the hoese is brown"
      At least one is telling truth and atleast one is lying. tell 
  the colour of horse.
     
   Answer : grey
      
   2. A son and father goes for boating in river upstream . After 
  rowing for 1 mile son notices the hat of his fathe falling in the river. 
  After 5min. he tells his father that his hat has fallen. So they turn around 
  and are able to pick the hat at the point from where they began boating 
  after 5min.
  Tell the speed of river.
   Ans...6 miles/hr
      
   3  A+B+C+D=D+E+F+G=G+H+I=17  where each letter represent a 
  number from 1 to 9. Find out what does letter D and G represent if letter A=4.   
   (8 marks)
   ans.   D=5
          G=1
    4. Argentina had football team of 22 player of which captain is 
  from Brazilian team and goalki from European team. For remainig 
  palayer they have picked 6 from argentinan and 14 from european. Now for a 
  team of 11 they must have goalkeeper and captain so out of 9 now they plan to 
  select 3 from argentinian and 6 from European. Find out no. of methods avilable
  for it (2 marks)
   Ans : 160600( check out for right no. 6C3 * 14C6)
      
   5 Three thives were caught stealing sheep, mule and camel.
     A says " B had stolen sheep "
     C says " B had stolen mule"
     B says he had stolen nothing.
      the one who had stolen horse is speaking truth. the one who had stolen 
   camel is lying . Tell  who had stolen what? (5 marks)
   ans. A- camel
        B- mule
        C- horse
   6  a group of friends  goes for dinner and gets bill of Rs 2400 .
 Two of them says that they have forgotten their purse so remaining 
  make an extra contribution of Rs 100 to pay up the bill. Tell the no. of 
  person in that group. (3 marks)
 Ans - 8 person
7. In acolony there are some families. Each of them have 
  children but different in numbers.Following are conditions
     a  no of adult no of sons no of daughters no of families.
     b each sister must have atleast one brother and should have 
  at themost 1 sister.      
     c  no of children in one family exceeds the sum of no of 
  children in the rest families.
   Tell the no of families.(5 marks)
    ans : 3 families
   8. There are 6 people W,H,M,C,G,F who are murderer , victim , 
  judge , police, witness, hangman. There was no eye witness only 
  circumtancial witness. The murderer was sentenced to death.
   Read following statement and determine who is who.
   1. M knew both murderer and victim.
   2. Judge asked C to discribe murder incident.
   3. W was last to see F alive.
   4. Police found G at the murder site.
   5 H and W never met.

Tuesday, May 31, 2011

Advanced UNIX Interview Questions and Answers


1. How do you find which processes are using a particular file?
By using lsof command in UNIX. It wills list down PID of all the process which is using a particular file.

2. How do you find which remote hosts are connecting to your host on a particular port say 10123?
By using netstat command execute netstat -a | grep "port" and it will list the entire host which is connected to this host on port 10123.

3. What is nohup in UNIX?

4. What is ephemeral port in UNIX?
Ephemeral ports are port used by Operating system for client sockets. There is a specific range on which OS can open any port specified by ephemeral port range.

5. If one process is inserting data into your MySQL database? How will you check how many rows inserted into every second?
Purpose of this Unix Command Interview is asking about "watch" command in UNIX which is repeatedly execute command provided with specified delay.

6. There is a file Unix_Test.txt which contains words Unix, how will you replace all Unix to UNIX?
You can answer this Unix Command Interview question by using SED command in UNIX for example you can execute sed s/Unix/UNIX/g fileName.

7. You have a tab separated file which contains Name, Address and Phone Number, list down all Phone Number without there name and Addresses?
To answer this Unix Command Interview question you can either you AWK or CUT command here. CUT use tab as default separator so you can use
cut -f3 filename.

8. Your application home directory is full? How will you find which directory is taking how much space?
By using disk usage (DU) command in Unix for example du –sh . | grep G  will list down all the directory which has GIGS in Size.

9. How do you find for how many days your Server is up?
By using uptime command in UNIX

10. You have an IP address in your network how will you find hostname and vice versa?
This is a standard UNIX command interview question asked by everybody and I guess everybody knows its answer as well.
By using nslookup command in UNIX, you can read more about networking command in UNIX here

Intermediate UNIX Interview Questions Answers


1. What is difference between ps -ef and ps -auxwww?
This is indeed a good Unix Interview Command Question and I have faced this issue while ago where one culprit process was not visible by execute ps –ef command and we are wondering which process is holding the file.
ps -ef will omit process with very long command line while ps -auxwww will list those process as well.

2. How do you find how many cpu are in your system and there details?
By looking into file /etc/cpuinfo for example you can use below command:
cat /proc/cpuinfo

3. What is difference between HardLink and SoftLink in UNIX?
I have discussed this Unix Command Interview questions  in my blog post difference between Soft link and Hard link in Unix

4. What is Zombie process in UNIX? How do you find Zombie process in UNIX?
When a program forks and the child finishes before the parent, the kernel still keeps some of its information about the child in case the parent might need it - for example, the parent may need to check the child's exit status. To be able to get this information, the parent calls 'wait()'; In the interval between the child terminating and the parent calling 'wait()', the child is said to be a 'zombie' (If you do 'ps', the child will have a 'Z' in its status field to indicate this.)
Zombie : The process is dead but have not been removed from the process table.

5. What is "chmod" command? What do you understand by this line “r-- -w- --x?

6. There is a file some where in your system which contains word "UnixCommandInterviewQuestions” How will find that file in Unix?
By using find command in UNIX for details see here 10 example of using find command in Unix

7. In a file word UNIX is appearing many times? How will you count number?
grep -c "Unix" filename

8. How do you set environment variable which will be accessible form sub shell?
By using export   for example export count=1 will be available on all sub shell.

9. How do you check if a particular process is listening on a particular port on remote host?
By using telnet command for example “telnet hostname port”, if it able to successfully connect then some process is listening on that port. To read more about telnet read networking command in UNIX

10. How do you find whether your system is 32 bit or 64 bit ?
Either by using "uname -a" command or by using "arch" command.

Beginners UNIX Interview Questions Answers


1. Write command to list all the links from a directory?
In this UNIX command interview questions interviewer is generally checking whether user knows basic use of "ls" "grep" and regular expression etc
You can write command like:
ls -lrt | grep "^l"


2. Create a read-only file in your home directory?
This is a simple UNIX command interview questions where you need to create a file and change its parameter to read-only by using chmod command you can also change your umask to create read only file.
touch file
chmod 400 file

3. How will you find which operating system your system is running on in UNIX?
By using command "uname -a" in UNIX

4. How will you run a process in background? How will you bring that into foreground and how will you kill that process?
For running a process in background use "&" in command line. For bringing it back in foreground use command "fg jobid" and for getting job id you use command "jobs", for killing that process find PID and use kill -9 PID command. This is indeed a good Unix Command interview questions because many of programmer not familiar with background process in UNIX.

5. How do you know if a remote host is alive or not?
You can check these by using either ping or telnet command in UNIX. This question is most asked in various Unix command Interview because its most basic networking test anybody wants to do it.

6. How do you see command line history in UNIX?
Very useful indeed, use history command along with grep to find any relevant command you have already executed. Purpose of this Unix Command Interview Questions is probably to check how familiar candidate is from available tools in UNIX operation system.

7. How do you copy file from one host to other?
Many options but you can say by using "scp" command. You can also use rsync command to answer this UNIX interview question or even sftp would be ok.

8. How do you find which process is taking how much CPU?
By using "top" command in UNIX, there could be multiple follow-up UNIX command interview questions based upon response of this because “TOP” command has various interactive options to sort result based upon various parameter.

9. How do you check how much space left in current drive ?
By using "df" command in UNIX. For example "df -h ." will list how full your current drive is. This is part of anyone day to day activity so I think this Unix Interview question will be to check anyone who claims to working in UNIX but not really working on it.

10. What is the difference between Swapping and Paging?
Swapping:
Whole process is moved from the swap device to the main memory for execution. Process size must be less than or equal to the available main memory. It is easier to implementation and overhead to the system. Swapping systems does not handle the memory more flexibly as compared to the paging systems.
Paging:
Only the required memory pages are moved to main memory from the swap device for execution. Process size does not matter. Gives the concept of the virtual memory. It provides greater flexibility in mapping the virtual address space into the physical memory of the machine. Allows more number of processes to fit in the main memory simultaneously. Allows the greater process size than the available physical memory. Demand paging systems handle the memory more flexibly.

INFOSYS INTERVIEW PUZZLES WITH ANSWERS


INFOSYS INTERVIEW PUZZLES WITH ANSWERS

 I HAVE COLLECTED THESE QUESTIONS AND ANSWERS FROM THE MAILS IN THE GROUP ONLY. FOR 3-4 QUESTIONS ONLY I HAVE FOUND THE ANSWER WITH THE HELP OF MY TEACHERS. SO KEEP IN MIND THAT THESE ANSWERS MAY NOT BE 100% CORRECT. TRY TO SOLVE IT YOURSELF.

1. You are given two candles of equal size, which can burn 1 hour each. You have to measure 90 minutes with these candles. (There is no scale or clock). Also u r given a lighter.

Ans: 1. First light up the two ends of the 1st candle. When it will burn out light up one end of the second candle.   (30+60=90)


2. Try the similar problem to measure 45 minutes.

Ans: First light-up the two ends of the 1st candle and one end of the 2nd candle.
When the 1st candle will burn out ,then light up the both ends of the 2nd  candle (15+30=45)

3. You r given a thermometer. What can u do by this without measuring the temperature?

Ans: if u put thermometer into a tree it won't grow anymore, will just die off

4. How it is possible to place four points that are equidistance from each other?
OR
U r a landscape designer and your boss asked u to design a landscape such that you should place 4 trees equidistance from each other.
(Distance from each tree to the other must be same)

Ans: Only 3 points can be equidistant from each other. But if u place points in the shape of a pyramid then its possible

5. You are given a cake; one of its corner is broken. How will u cut the rest into Two equal parts?

Ans: Slice the cake


6. How will you recognize the magnet & magnetic material & non-magnetic material?

Ans: Drag one piece of material over another. There is no attractive force in the middle portion of the magnet. OR
Get a piece of thread and tie up with the one bar and check for poles. If it iron bar then it moves freely and if it is magnetic bar then it fix in one direction according to poles.


7. If one tyre of a car suddenly gets stolen.... and after sometime u find the tyre
without the screws how will u make ur journey complete?

 Ans: Open 3 screws, 1 from each tyre and fix the tyre.


8. How can u measure a room height using a thermometer?

Ans: temp varies with height. but its dependent on various other factors like
humidity, wind etc.


9. What is the height of room if after entering the room with a watch ur head
strikes a hanging bulb?

Ans: Oscillate the hanging bulb. Calculate the time period for one complete
oscillation by Simple Harmonic Motion (SHM) of the handing bulb. Put it in the
formula T=2 * 3.14 * (L/G)^1/2
L will be the length of the hanging thread.
Add the L with ur height to get the height of the room.
OR

Ans: Drop it from the room and find the time at which it strikes the floor. Using physics formula  s = (at^2)/2 (IM NOT SURE ABOUT THIS ONE)



10. Color of bear.... if it falls from 1m height in 1s.

 Ans: We get 'g' perfect 10 which is only in poles...hence polar bear...color White


11. How will you measure height of building when you are at the top of the building? And if you have stone with you.

Ans: Drop the stone and find the time taken for the stone to reach the ground. find height using the formula
s = a + gt ( s = height, a= initial velocity=0, g=9.8m/s, t = time taken)



12. How wud u catch and receive a ball in same direction? (Dropping is from north And receiving from bottom not accepted, as it is 2 directions)

Ans: ?



13. 25 statements given. Some tell truth, some false and some alternators. Find out the true statements.

Ans: ?



14. Can u make 120 with 5 zeros?

Ans: Factorial (factorial (0)+factorial (0)+factorial (0)+factorial (0)+factorial (0)) = 120



15.There are three people A, B, C. Liars are of same type and Truth speaking people are of same type. Find out who is speaking truth and who is speaking false from the following statements:
a)       A says: B is a liar.
b)       B says: A and C are of same type.

Ans: lets assume A is speaking truth. It means B is a liar then it means A and C are not of same type.


16.5 swimmers A, B, C, E, F and many conditions of their positions like there are Two b/w A & F, B doesn't win etc the question was to find who was b/w like E & D?

 Ans: ?



17. in a race u drove 1st lap with 40kmph and in the second lap at what speed u must drive so that ur average speed must be 80kmph.

 Ans: its impossible! if u drove the first lap in 40 kmph, its impossible that the
average speed of both the laps is 80kmph.
for eg. consider one lap distance = 80km.
time req. to cover 1 lap = 80km/40kmph = 2 hrs.

 if the avg. speed is 80kmph, then the total time would have taken = 160kms/80kmph = 2 hrs.
same is the case with any other distance u consider. so the avg to be 80kmph is impossible


18. You have to draw 3 concentric circles with a line passing thru their center without lifting hand.

Ans: Start the line complete one circle move inside circles along the line and then draw second circle. Like wise rest.


19. A rectangular paper is there. At a corner a rectangular size paper is taken from it. Now you have to cut the remaining paper into two equal halves.

Ans: try it on the paper. You must fold the part that has complete paper and select Half of it and then fold the part that cut and selects half of it and then cut along the folding. (I DONT UNDERSTAND THIS ONE!!)


20. Value of (x-a)(x-b). . . . (x-z)

Ans: 0 as there's X-X term


21. There are 9 coins. 8 are of 1 gm and 1 is of 2 grams. How will you find out the heavier coin in minimum number of weighing and how many weighing it will need?
Ans: 2 weighing ( Divide the number of coins into 3 parts at each weighing)

Typical interview questions about stress situation


Typical interview questions
While you cannot pre-empt all the questions you will be asked in a job interview, there are a number of areas which you are likely to be asked about.
Being interviewed you get a chance to prove yourself. That is why it is necessary to be well prepared. Preparation increases your chances of being selected.

I. Typical interview questions about stress situation

1. Which transaction is not good for your colleagues whom also faced the stress at the same time?
2. How do you handle stress? What is the best thin or work you do when you are stressed
3. Okay, if that’s the best answer you can give me. Then what about this question…?
4. What kinds of people do you find it difficult to work with?
5. What are some of the things that you find difficult to do?
6. Do you consider standing in a line as stressed work?
7. I don’t really feel like your answering the question. Could you please clarify / could you please start again?”
8. How do you handle rejection?
9. Why do you think it will conduce stress?
10. What is the worst thing when you faced with stress?
11. Why did you switch to political science? Is it because you couldn’t handle engineering? Why did you do so poorly on this test?
12. What is the worst thing that you have heard about our company?
13. Why are manhole covers round?
14. Define stress and when do you get stressed out?
15. Are you able to work under stress?
16. Please give us an example about you work with a team that faced stress from your experience?