Tuesday 22 November 2011

C program to add, subtract, multiply and divide Complex Numbers, complex arithmetic

Asked in Honeywell Technical Interview:

C Program to add, subtract, multiply and divide complex numbers :- This program performs basic operations on complex numbers i.e addition, subtraction, multiplication and division. This is a menu driven program in which user will have to enter his/her choice to perform an operation. User can perform operations until desired. To easily handle a complex number a structure named complex has been used, which consists of two integers first integer is for real part of a complex number and second for imaginary part.
#include
#include
#include

struct complex
{
int real;
int img;
};

main()
{
int choice, temp1, temp2, temp3;
struct complex a, b, c;

while(1)
{
clrscr();
printf("Press 1 to add two complex numbers.\n");
printf("Press 2 to subtract two complex numbers.\n");
printf("Press 3 to multiply two complex numbers.\n");
printf("Press 4 to divide two complex numbers.\n");
printf("Press 5 to exit.\n");
printf("Enter your choice ");
scanf("%d",&choice);

if( choice == 5)
exit(0);

if(choice >= 1 && choice <= 4) { printf("Enter a and b where a + ib is the first complex number."); printf("\na = "); scanf("%d", &a.real); printf("b = "); scanf("%d", &a.img); printf("Enter c and d where c + id is the second complex number."); printf("\nc = "); scanf("%d", &b.real); printf("d = "); scanf("%d", &b.img); } if ( choice == 1 ) { c.real = a.real + b.real; c.img = a.img + b.img; if ( c.img >= 0 )
printf("Sum of two complex numbers = %d + %di",c.real,c.img);
else
printf("Sum of two complex numbers = %d %di",c.real,c.img);
}
else if ( choice == 2 )
{
c.real = a.real - b.real;
c.img = a.img - b.img;

if ( c.img >= 0 )
printf("Difference of two complex numbers = %d + %di",c.real,c.img);
else
printf("Difference of two complex numbers = %d %di",c.real,c.img);
}
else if ( choice == 3 )
{
c.real = a.real*b.real - a.img*b.img;
c.img = a.img*b.real + a.real*b.img;

if ( c.img >= 0 )
printf("Multiplication of two complex numbers = %d + %di",c.real,c.img);
else
printf("Multiplication of two complex numbers = %d %di",c.real,c.img);
}
else if ( choice == 4 )
{
if ( b.real == 0 && b.img == 0 )
printf("Division by 0 + 0i is not allowed.");
else
{
temp1 = a.real*b.real + a.img*b.img;
temp2 = a.img*b.real - a.real*b.img;
temp3 = b.real*b.real + b.img*b.img;

if ( temp1%temp3 == 0 && temp2%temp3 == 0 )
{
if ( temp2/temp3 >= 0)
printf("Division of two complex numbers = %d + %di",temp1/temp3,temp2/temp3);
else
printf("Division of two complex numbers = %d %di",temp1/temp3,temp2/temp3);
}
else if ( temp1%temp3 == 0 && temp2%temp3 != 0 )
{
if ( temp2/temp3 >= 0)
printf("Division of two complex numbers = %d + %d/%di",temp1/temp3,temp2,temp3);
else
printf("Division of two complex numbers = %d %d/%di",temp1/temp3,temp2,temp3);
}
else if ( temp1%temp3 != 0 && temp2%temp3 == 0 )
{
if ( temp2/temp3 >= 0)
printf("Division of two complex numbers = %d/%d + %di",temp1,temp3,temp2/temp3);
else
printf("Division of two complex numbers = %d %d/%di",temp1,temp3,temp2/temp3);
}
else
{
if ( temp2/temp3 >= 0)
printf("Division of two complex numbers = %d/%d + %d/%di",temp1,temp3,temp2,temp3);
else
printf("Division of two complex numbers = %d/%d %d/%di",temp1,temp3,temp2,temp3);
}

}

}
else
printf("Invalid choice.");

printf("\nPress any key to enter choice again...");
getch();
}
}

Friday 18 November 2011

Honeywell Technical Interview Questions

1. Introduce yourself briefly.


2. How much good you are in C (on the scale of 1-10)


3. They gave me the same complex number program and told me what modification I can do in it. (Again write the program) Click here to see this program


4. Write the same complex number addition program with passing values to function, passing structure to function and passing address of the structure to the function.


5. What is recursion? What will happen is we don't give termination condition? How efficient recursion is compared to iteration.


ans:


Recursion is a programming technique that allows the programmer to express operations in terms of themselves. In C++, this takes the form of a function that calls itself. A useful way to think of recursive functions is to imagine them as a process being performed where one of the instructions is to "repeat the process". This makes it sound very similar to a loop because it repeats the same code, and in some ways it is similar to looping. On the other hand, recursion makes it easier to express ideas in which the result of the recursive call is necessary to complete the task. Of course, it must be possible for the "process" to sometimes be completed without the recursive call. One simple example is the idea of building a wall that is ten feet high; if I want to build a ten foot high wall, then I will first build a 9 foot high wall, and then add an extra foot of bricks. Conceptually, this is like saying the "build wall" function takes a height and if that height is greater than one, first calls itself to build a lower wall, and then adds one a foot of bricks.


6. What are the storage classes? Explain each with examples.


C has a concept of 'Storage classes' which are used to define the scope (visability) and life time of variables and/or functions.


There are four type of storage classes in C. These are used
to store variables. These are Extern, Static, Register and
Auto. Auto is the default class assigned to any variable.
eg. if we define int x=10; then it means auto int x=10
register and static differ in only one grounds that
register is there in the cpu and static in the main memory.
extern is global and can be accessed by any program and
anywhere.


7. Where register variables are stored? Where registers remain in computer? How many registers are there?






register is there in the cpu and static in the main memory.


8. Write a program to implement static storage class. (Many questions on this)


9. What is Union? Write syntax of union. How memory is allocated for the members of Union. How it is different from structure? When we use union and when structure.


10. What is dynamic memory allocation?


11. Write syntax for allocating memory for Integer using malloc().


12. What is type casting?


13. What is the need of type casting in malloc().


12. What is difference between malloc() and calloc().


13. How memory is released?


14. Where malloc() save variables? (In which memory- Primary, RAM)


15. What is Preprocessor?


16. What it is called in C?


17. How it works? What is the need of macros?


18. How parameters are passed in C?

Thursday 17 November 2011

List of Engineering Entrance Exams In India

Here is a list of a few examinations I know :
  1. AICE - All India Competitive Examination for Admissions to Master's Degree Programmes
  2. AICET - All India Common Entrance Test
  3. AIEEE - All India Engineering Entrance Examination
  4. AMIE - Associate Membership of Institution of Engineers
  5. AMIETE - Associate Membership of Institute of Electronics and Telecommunication Engineers
  6. Annamalai University Engineering Entrance Exam
  7. BEE- Bureau of Energy Efficiency
  8. BITSAT - Birla Institute of Technology and Science Examination
  9. Dhirubhai Ambani Institute Of Information and Communication Technology
  10. GATE - Graduate Aptitude Test in Engineering
  11. IIT JEE - IIT Joint Entrance Examination
  12. ISAT - IIST Admission Test
  13. JNU EEE - Jawaharlal Nehru University Engineering Entrance Exam
  14. MP PET - Madhya Pradesh Pre Engineering Test
  15. NIT - National Institute of Technology
  16. RPET - Rajasthan Pre Engineering Test
  17. SRM EEE - SRM Engineering Entrance Exam [ BTech, MTech ]
  18. VITEEE Vellore Institute of Technology Engineering Entrance Exam

If any more exams are conducted in your area, post them here.

Latest CTS Placement Paper September 2011 Kolkata

At first the cognizant people came to the college,gave the pre placement talk.Then started the aptitude exam.
There was two part in the paper ----1st part is Verbal and 2nd part is Analytical.
Question was not so easy.You should practice properly specially the verbal part.
322 selected from 340 in the aptitude test .
After a long wait my name was called for the interview.I was lil' bit tensed because that was the 1st interview in my life.Hopefully my HR was a very good person after entering in the interview room-
HR:Sit down
me:thank you sir.
HR:He asked for the CV and look it properly.asked some common question from CV about hobby,achievements
me: answered properly
HR:Then he asked except this(which was written in my hobby) what can u do?
me: bla bla
HR:which is your preferable language
me:java
HR:what are the properties of oops
me:told
HR:gave me a situation about inheritence (cat and dog has some properties,implement this in inheritence) and then he asked me to write the code
me:properly done
HR:what is polymorphism?then overloading,overriding,run time polymorphism
me:told
HR:then he asked do u know non linear datastructure?
me:told about tree,different types of trees
HR:asked about level,height,node,edge,b tree,b+ tree
me:told
HR:told me to do a quick sort of some no.s
me:I just told the algorithm,i didn't do the sorting.
HR:what is the best and worst case of bubble sort
me:told ,he looked satisfied
HR:Tell me something about your project
me:told
HR:so at the back end u r going to use dbms?
me:yes
HR:what is candidate key,unique key?
me:told
HR:give me a table asked me to write a query (it was pretty tough)
me:I wrote a code and show him
HR:This is not my question told the question properly
me:again write the code and show him ,he looked satisfied
HR:then he asked me why cognizant?
me: told
HR:r u rellocating?
me:yes
HR:souvik,do u have any query about cognizant?
me:asked 4 questions(prepare some questions)
HR:gave the answers.
Don't be nervous.Whatever comes in your mind just tell,don't miss a single question.Almost every HR is a nice person.
Always use cognizant,don't use CTS.
I'm selected for cognizant.
I'm going to join in the next year.

L&T Infotech Job Fair Campus Placement Papers OGI Bhopal MP 2011

Hi friend's...i m Gunjan Shivhare from bhopal got selected in L&T infotech..i m in my 6th semister pursuing my B.E from O.G.I bhopal (m.p) in EC branch.....
PROCESS OF SELECTION:-
(1)Written Exam {total 90 questions in 90 mins}
(2)Group Discussion / Extempore
(3) Technical + Hr Interview
(1)WRITTEN EXAM:-( R.S AGRAWAL VERBAL & NON VERBAL + QUANTATIVE)
(1) QUANTATIVE PART {30 questions}
(2) VERBAL PART {30 questions}
(3) LOGICAL REASONING PART {30 questions}
Note:-There was no negative marks but there is sectional cutoff & about 20-22 would be for each section.
Some Questions:-
Syno-ADULATION, RECUPERATE, EXONERATE, IMMACULATE.
Analogy-
Q: practice : perfection
Q: triangle : hexagon
Q: paralysis : movement
Q traitor : disloyalty
Odd one out-
Q: a.illusion b.delusion c.identification d.hallucination
Q: a.dinosaur b.mermaid c.sphinx d.unicorn
AND THE OTHER TOPICS ARE::-
venn diagram,,puzzals,,,finding next in figure,,,problem on age,,percentage,,si/ci,,,statement-argument,,RC,,,blood relation etc
(2) GROUP DISCUSSION:
Around 240 student's were short listed for GD out off 550.. we were divided into panel's i was in the 1st panel onlyyy...each panel had around 16 students.. we all know GD round is considered as Rejection round..& that was my 1st attemp for any GD.. i was nervous but try to relax myself by talking with my friends...well HR came into our room..we all wished her.. then she told every one to give there introduction...she was checking the confidence level of each student.. then she told each to choose the topic as per their interest & to speak on it for about 2-3 mins...so friend's always be ready with a topic of ur own..
(3) TECHNICAL + HR INTERVIEW:
About 130 student were selected for the final round...& i was one of the lucky person to be there for final round..
my interview was more of HR but most of my friend's were asked technical too..so be prepared.. i was the first to go for the interview..a bit nervous but happy because i had cleared GD & if u cleared it then u were almost in ..my interview goes like......
me-may i come in sir
hr-please come in
me-(standing) GOOD EVENING SIR
hr-(smiling) have ur seat
hr-give me ur form & a copy of resume
hr-tell me about ur self in BRIEF...
me..told confidently
hr-your father is in Govt. sector why you want to go in private sector.
me - told...(he was impressed with the answer)
hr-you want to do MBA then how will u continue with the company
me-told truely me future aspects
hr-u prefered area is mumbai..if i"ll send u to chennai then
me- no problem..sir i preferred mumbai because of my close relatives living there..so it hardly matters for me.
hr- you have any questions???
me-should i have to do any other courses for the company????
hr-explained me clearly..
me-how appraisel's were given???
hr- explained
then..
hr- well nice talking to u (hand shake) best of luck for the result.
me -thank you sir..
Next day result declared & about 117 student made it to L&T infotech finally ...& i was one of the student to get selected..was very happy & in full of joy..because i was rejected in CTS, WIPRO, INFOSYS..but made it finally at L&Tinfotech....best of luck to u all

CTS Campus Recuitment drive conducted on 14 February 2011 at Hyderabad

Hi Friends,
I would like to share my interview experience with Cognizant.
Myself G Parmesh B Tech-2010, I had appeared for CTS Off-campus recruitment on 5th February, 2011 at MLR Engineering College, Hyderabad.
The Aptitude paper was easy but is time consuming.
Total question: 55
Total marks: 55
No negative marking but there is a sectional cut-off.
The exam consists of two sections.
1) Analytical Pattern:(30Q)
1) Figure sequence
2-4) Syllogisms
5-9) Data Sufficiency
10-13) Puzzle Test
14-17) Coding decoding (Pattern some what different from previous papers)
18-23) Figure Sequence
24-28) Data interpretation
29-30) Data sufficiency
Minimum : 50% i.e, 15+
2) English:(25Q)
1-3) Pick 2 Correct Sentences from 4 Sentences
4-8) Passage1 Regarding "Nelson Mandela" (Got In my Paper but there are 4 sets)
9-13) Passage2 Regarding "Fossilized remains of pterosaurs" (Got In my Paper but there are 4 sets)
14-15) Pick Incorrect Sentences
16-17) Pick Correct Sentences
18-22) Jumbled Sentence Arranging
23-25) Pick Incorrect Sentences
Minimum : 35-50% i.e, 12+
After 30 mins they will collect the first section paper (analytical) and give the second section paper(English).
First section kills your time, you can't even study the whole paper unless you are quick enough.
Results will be displayed in cognizant website i.e., Login with your Application ID and DOB regularly and check status. Me waiting 4 the results.
Don't rely on mail.
Prepare well guyzzz.
All the Best!

Wednesday 16 November 2011

Infosys Aptitude Questions II

1. The passage given below is followed by questions based on its content. Read the passage & choose the best answer 4 the questions
The Death Car
It was cold night in September. The rain was drumming on the car roof as George & Marie Winston drove through the empty country roads towards the house of their friends, the Harrison’s, where they were going to attend a party to celebrate the engagement of the Harrison’s daughter, Lisa. As they drove, they listened to the local radio station, which was playing classical music. They were about 5 miles from the destination when the music on the radio was interrupted by a news announcement: “The Cheshire police have issued a serious warning after a man escaped from Colford Mental Hospital earlier this evening. The man, John Downey, is murderer who killed 6 people before he was captured 2 years ago. He is described as large, very strong & extremely dangerous. People in the Cheshire area are warned to keep their doors & windows locked, & to call the police immediately if they se anyone acting strangely.” Marie shivered, “A crazy killer. And he’s out there somewhere. That’s scary.” Don’t worry about it,” said her husband. “We’re nearly there now. Anyway, we have more important things to worry about. This car is losing power for some reason—it must be that old problem with the carburetor, If it gets any worse, we’ll have to stay at the Harrison’s’ tonight & get it fixed before we travel back tomorrow,” As he spoke, the car began to slow down, George pressed the accelerator, but the engine only coughed. Finally they rolled to a halt, as the engine died completely, Just as they stopped, George pulled the car off the road, & it came to rest under a large tree. “Blast!” said George angrily. “Now we’ll have to walk in the rain.” “But that’ll take us an hour at least,” said Marie. “And I have my high-held shoes & my nice clothes on. They’ll be ruined!” “Well, you’ll have to wait while I run to the nearest house & call the Harissons. Someone can come out & picks us up,” said George. “But George! Have you forgotten what the radio said? There’s a homicidal maniac out there! You can’t leave me alone here!” “You’ll have to hide in the back of the car. Lock all the doors & lie on the floor in the back, under this blanket. No-one will see you, when I come back, I’ll knock 3 times on the door. Then you can get up & open it. Don’t open it unless you here 3 knocks.” George opened the door & slipped out into the rain. He quickly disappeared into the blackness. Marie quickly locked the doors & settled down under the blanket in the back for a long wait. She was frightened & worried, but she was a strong-minded woman. She had not been waiting long, however, when she heard a strange scratching noise. It seemed to be coming from the roof of the car. Marie was terrified. She listened, holding her breath. Then she heard 3 slow knocks, one after the other, also on the roof of the car. Was it her husband? Should she open the door? Then she heard another knock, and another. This was not her husband. It was somebody--or something--else. She was shaking with fear. But she forced herself to lie still. The knocking continued-- bump, bump, bump, bump many hours later, as the sun rose, she was still lying there. She had not slept for a moment. The knocking had never stopped, all night long. She did not know what to do. Where was George? Why had he not come for her?
Suddenly, she heard the sound of 3 or 4 vehicles, racing quickly down the road. All of them pulled up around her, their tires screeching on the road. At last! Some one had come! Marie sat up quickly & looked out the window.
The 3 vehicles were all police cars, & 2 still had their lights flashing. Several policemen leap out. One of them rushed towards the car as Marie opened the door. He took her by the hand.
“Get out of the car & walk with me to the police vehicle. Miss you’re safe now. Look straight ahead. Keep looking at police car. Don’t look back. Just don’t look back.”
Something in the way he spoke filled Marie with cold horror. She could not help herself. After 10 yards from the police car, she stopped, turned & looked back at the empty vehicle.
George was hanging from the tree above the car, a rope tied around his neck. As the wind blew his body back & forth, his feet were bumping gently on the roof of the car-- bump, bump, bump, bump
1) What was the reason for the news announcement on the radio?
a) 6 people. Including John Downey, had been murdered?
b) A dangerous prisoner had escaped
c) The police were warning of accidents on the roads in the bad weather
d) Some people had bens en acting strangely in the Cheshire area

2) What did George think was causing trouble with the car?
a) The carburetor
b) The rain drumming on the roof
c) The accelerator
d) He had no idea

3) Why did he pull the car off the road?
a) To have a rest
b) To go for a walk
c) To walk to the nearest house
d) It broke down

4) Why did Marie stay in the car when George left?
a) She was afraid to go out in the dark
b) So no one could steel the car
c) Her clothes weren’t suitable for the rain
d) She wanted to get some sleep

5) Where did George set off to walk?
a) The mental hospital
b) The nearest house
c) The Harrison’s house
d) The police station

6) What made Marie so frightened as she waited in the car?
a) There was a strange sound coming from the roof
b) She could see a man strangely outside the car
c) Some police cars came racing down the road
d) She was afraid of the rain and the dark


Each sentence below has 1 or 2 blanks – each blank indicating that something has been omitted. Beneath the sentence are some words. Choose the word for each blank that best fits the meaning of the sentence as a whole

7) Athletes have so perfected their techniques in track and field events that the _________ becomes _________ before record books
a) Announcement …………public
b) Meet…………………….official
c) Time…………………….authentic
d) Fantastic………………...common place

8) A________ child, she was soon bored in class; she already knew more mathematics than her junior school teachers
a) Obdurate
b) Precocious
c) Recalcitrant
d) Contemporary

9) The subtle shades of meaning, & still subtler echoes of association, make language an instrument which scarcely anything short of genius can wield with ____________ & ________________
a) Confidence----------aloofness
b) Definiteness---------certainty
c) Sincerity--------------hope
d) Eloquence------------ruthlessness

10) Unwilling to admit that they had been in error, the researchers tried to_______ tried case with more data obtained from dubious sources
a) Ascertain
b) Buttress
c) Refute
d) Dispute

11) His one vice was gluttony & so it is not surprising that as he aged he became increasingly_______________
a) Despondent
b) Corpulent
c) Carping
d) Lithe

Please read all the questions in the table below (12-21) as one continuous passage. Tick the verb with right tense or the correct word to fill in the gaps in each of the sentences.

Statement Options
12) A famous singer had been contracted to sign at a Paris opera house & ticket sales_______________ booming. a) is
b) are
c) were
d) have been
13) In fact, the night of the concert, the house was packed; every ticket ________________ a) is selling
b) was selling
c) sold
d) had been sold

14) The feeling of anticipation & excitement was in the air as the house manager__________ the stage & said, “Ladies & gentlemen, thank you for your enthusiastic support! a) took
b) takes
c) had taken
d) was taking
15) I am afraid that due to illness, the man whom you’ve all come to hear________________ performing tonight a) will not be
b) has not been
c) had not been
d) was not
16) However, we _________ a suitable substitute who, we hope, will provide you with comparable entertainment.” a) are finding
b) were finding
c) had found
d) have found
17) The crowd____________ in disappointment & failed to hear the announcer mention the stand-in’s name a) groans
b) groaned
c) had groaned
d) were groaning

18) The environment turned from excitement to frustration
The stand-in performer__________ the performance everything he had. a) will give
b) had given
c) gave
d) gives
19) When he had finished, there was nothing but an uncomfortable silence. No one _____________ a) Applauded
b) Applauds
c) Was applauding
d) Has applauded
20) Suddenly, from the balcony, a little boy stood up and____________, “Daddy, I think you’re wonderful!” a)shouts
b) was shouting
c) had shouted
d) shouted
21) The crowd_________________ into thunderous applause a) breaks
b) broke
c) had broken
d) was breaking




From each group of sentences given below, indicate the sentence that contains the error:

22) Group 1
a) Driving long distances causes sleepiness, & sleepiness causes serious accidents.
b) On a table at the rear of the room was a notebook, a pair of scissors, & a biology textbook
c) Finally, there seems to be a growing interest in vegetarianism in this country
d) Either the local chief of police or his officers are guilty of violating the rights of prisoners

23) Group 2
a) Simple cookbooks for inexperienced cooks have become quite popular in recent years they are available at many bookstores
b) Some cookbooks, such as The Joy of cooking, have been classics for generations
c) One popular cookbook is The Art of French Cooking, by Julia Child, a colorful character who charmed television audiences for many years
d) The Art of French Cooking blends classic recipes with meticulous explanation; ordinary cooks find the recipes manageable

24) Group 3
a) Around 50% of the forest are destroyed every year
b) The bus leaves tomorrow morning
c) A tiger is a dangerous animal
d) Can you please the sugar?

25) Group 4
a) There must be some mistake. I should have scored more marks
b) The number of trainees are hundred
c) 50% of the houses need repairs
d) The Commissioner, along with his family members was seen the party

26) Group 5
a) The scissors is very sharp
b) Congratulations are in order
c) One of the cases is open
d) She plays tennis well but she’ll never be a Steffi Graf


Please mark the correct statement from the pairs given below:
27) Pair 1
a) Repeated occurrences cannot be ignored
b) Repeated occurrences cannot be ignored
28) Pair 2
a) We need to get a consensus on the decision
b) We need to get a consensus on the decision
29) Pair 3
a) Only authority personnel are allowed in this area
b) Only authorized personnel are allowed in this area
30) Pair 4
a) The actress decided to sue the sleazy tabloid for deformation of her character
b) The actress decided to sue the sleazy tabloid for defamation of her character
31) Pair 5
a) Everyone knows that Hogwarts in the Harry Potter series is a mythical school
b) Everyone knows that Hogwarts in the Harry Potter series is a legendary school
32) Pair 6
a) Most people think caffeine is not good for health
b) Most people think caffiene is not good for health
Exercise 6:
Select the best word/phrase/line to complete each sentence in the most appropriate manner
33) ‘Reema’s bad-mouthing Peter only because she is jealous of him.’ Means______________
a) Peter really is a nice person
b) Peter really is a mean person
c) Peter really is a difficult person
d) Peter really is a tough person
34) If some one is “gung ho”, they are_______
a) stupid
b) Childish
c) Enthusiastic
d) Loud
35) Mr. Hughes has been asked to___________ this difficult project because of his experience working for many years in Iran
a) Undergo
b) Understand
c) Undervalue
d) Undertake
36) ‘Stop talking to those angry men, you are just adding fuel to the fire’ is the same as________
a) Stop talking to those angry men, you are just coming in the way
b) Stop talking to those angry men, you are just making it worse
c) Stop talking to those angry men, you are just adding to the noise
d) Stop talking to those angry men, you are just talking too much
37) ‘Sudhir’s work is behind schedule – I think he bit more than he could chew’ is the same as________
a) Sudhir has taken too much of work
b) Sudhir takes very long breaks
c) Sudhir does not know how to do the work
d) Sudhir is a lazy person
38) There are many__________ to our rules, and I do not think that’s fair.
a) Examples
b) Exceptions
c) Instances
d) Provisions

Choose the correct / most appropriate word/s to fill in the gap in the sentences given below.
39) I didn’t set _________ to do this but I’m pleased with the result.
a) In
b) Out
c) On
d) Down
40) This looks too heavy,______________ pick it up?
a) Can I
b) May I
c) Need I
d) Would I
41) I am glad so many people have passed the test. In fact, there were_________ who haven’t.
a) little
b) a little
c) few
d) a few
42) Pope John Paul II ___________ more than 90 countries.
a) Has visited
b) Was visited
c) Visits
d) Has been visiting
43) I _____________ Carl since I ______________ a little child.
a) Have known, have been
b) Have known, was
c) knew, have been
d) Knew, was
44) I wonder if _____________ will show up at the meeting?
a) Someone
b) Anyone
c) One
d) Everyone
45) Have you given up______________.
a) To smoke
b) Smoke
c) Some smoking
d) Smoking

Verizon most Recent February 2011 Placement Papers

Hi Friends,
The aptitude consists of 4 sections.
1) Verbal
2) Analytical
3) Mental Ability
4) Technical
Time Duration: 90 Minute
They will give us one answer sheet. But after every section they will collect the question paper back
There may/may not be negative marking
Verbal: (20 Questions 15 Minutes)
1-10 questions of the type
Rose is _______ beautiful flower.
Options: a, an, the, none
11-16 Reading comprehension... on computer protection and security
17-20 Reading comprehension on Databases (Actually you don't need to read the passage you will be able to answer without reading it--- its so trivial)
Analytical: ( 30 questions 30 minutes)
21. Sheela is 16th from first. 29th from last in a test . 6 boys did not come. 3 failed what is the strength of the class 22-26 problems on sets.. eg 15 speak Tamil 25 speak Tamil and Hindi out of 53 people how many speak Tamil alone. etc( Do not remember exact figures)
27-32 Problems on sets eg 54 boys play cricket.61play football,66 play tennis. 24 play all three, 32 play football and cricket, 15 play foot ball and tennis. How many players played only cricket, football, tennis same kind of problem on white ,green and yellow kites
33-37 Typical annals question( u find in RS Agarwals)
6 movies need to be screened in a movie festival. The slots are 9.30,10.30,1 3.30 5.30, 7
A can screen in afternoon or morning B cannot screen before C nobody else can screen when D is screening..( similar conditions.. Watch out we all ran out of time trying to attempt this question)
38-40 Question on cube. A cube is painted with three colours namely Red, yellow ,green its [anted in such a way that colors are on the adjacent sides are not same. The cube is cut into 27 small cubes. How many cubes with one color, two color, three color etc
41-45 One question and Two statements would be given Mark A if statement 1 alone is enough to get the answer. B if statement 2 alone is enough, C if statement 1 and 2 are necessary. D if answer cannot be arrived at
eg 1.P-X>0
2., pX>0
is p positive.
46-50 Question on cube.. 16 cubes are kept on top of which 4 cubes r kept at the centre , on top of that 2 cubes are kept and on top of that one cube is kept. It is painted from top to bottom. How many cubes with 1,2,3,4, 0,sides painted.
Mental Ability (15 questions 25 minutes)
51-53 Questions on pattern matching. Like mark A if first and third are identical, B if second and third are identical, C if first and second are identical D if they are different.
54-59 Questions of the form if +is - and - is * . * is / and / is + then find 12/3*5-2+5
60-62 A set of conditions for admissions of a school student is given like he should be in top 20 in the entrance test or should have sports excellence etc.. and questions of different cases are given and we need to find if the candidate can be admitted or not.
63-65 Similar questions for recruitment of cook. He should be 25 yrs of age with 3 yrs experience if he has lesser exp. he should meet the head cook . if he is below 25 yrs he should meet the manager and questions on various cases.
Technical (C and DS) :
66. Of the following select a code to print a singly link list in a reverse order.
67. select a code to print elements of a dequeue
68. a=3,b=3,c=3
a-=b-- - --c;
printf (a, b, c);
69. Find a declaration of ADT of a polynomial.
70. Select code that shows DFS of a graph
71. Select the statement that appropriately fills the DFS algorithm
72. File *fp1,*fp2;
fp1=fopen ("a","w");
fp2=fopen ("a","w");
and operations using these two file pointers . and 4 options based on that
73. int *px;
do{
*px=f(1);
} while( i<10 && *px<900);
f(int a)
{
int x= a*50;
return &x;
}
And four options about value of *px also has options on error conditions
74. Some question on strings.4 codes given and we need to select an appropriate code.
75. I think code for printing an array
Time Duration of the Interview: 45 Minutes
Step 1: We were asked to write a 100 word write-up on " Your greatest strength (s) that would help Verizon".
We were asked to take the write-up with us when we go to the interview..
Step 2: Actual interview
The interviewing team introduced themselves.( there were two people - One person was asking technical questions and other person was asking HR questions) Both were asking questions alternating.
They went through my write-up, and the HR person asked me an hypothetical situation
" Assume you are working on a bidding . You quote a price after lot of analysis. At the last moment your boss says that you should quote a lower price. what will you do"
he kept asking subsequent questions to corner me and was focused on making me accept that I did not have the quality that i mentioned in the write-up.
Technical person asked me what I was comfortable with C, C++ or Java . I told Java.
1. What is inheritance?
2. What is a constructor?
3. Can a constructor be private?
4. Can we OVERRIDE a constructor?
5. Are there pointers in java?
6. Why is there no pointers in java?
7. Identify classes...for bus, car, cycle tricycle?
The HR person took over and asked
1. Instances where I have exhibited my leadership qualities?
2. How do I motivate my team members?
3. What is my biggest achievement in life so far?
4. What is my biggest failure and what I learnt from it?
The Technical person saw my Area of interest to be " DBMS" and started asking on
DBMS:
1. What are different types of databases
2. Difference between RDBMS and File based databases
3. Even in RDBMS the data is stored as files , so why go for it
4. Three layered architecture
5. Can you change physical design
6. Write a simple employee and dept table
7. Then he asked me to retrieve all employees working in MCA dept( i wrote a nested sub query)
8. What is the advantage of nested sub query. will it improve or reduce the performance
The HR person took over and
1. He saw that I have won prize in Marketing in Login and asked me what the event was and asked me how we won the event.
2. What I have learnt in college or what the college has taught me apart from subjects
The technical person asked me what other subjects I have learnt so far in curricular and he interrupted me when I said " Software quality Management "
1. What is quality
2. What is quality management
3. Difference between software engineering and SQM
The HR person took over and asked me one last question
1. I just want to know why you are wearing a tie.

i-Flex Placement Papers for March 2011

I don't remember whole testpaper but i will hereby provide you the pattern:
It was a online test
it had three section:
1.Quantitative
2.technical
3. Verbal
1. Quantitative: This was again divided into 4 parts
1. 10 simple question in 10 mins(you have to be really fast)
2. 10 questions in which they will provide you a question and you have to make formula.(i found it tough) and this also has data sufficiency question which were very easy.
3. A flow chart was given based on which 5 question were there. Basically thr will be five blank boxes within the flowchart which you have to fill.this also 10mins
4. A database table was given having around 25 to 30 rows. we had to ans the ques by just looking at them.it was very easy. 10 ques in 5mins.
2. Technical:
1. Java->object,encapsulation,polymorphism
2. Dbms
3. OS
4. Big O notation and codd's rule
3. Verbal:
Fill in the blanks(very easy)
* Reading comprehension(easy)
* Jumbled up sentences
I would sugeest prepare quantitative nicely coz it is very time consuming.

Tuesday 15 November 2011

Wipro English Aptitude and Technical Interview questions

test proceedure
written- 50q's 60mins
essay writing - 10mins (any general topic)
technical interview
H.R
NO REPEATED QUESTIONS FROM PREVIOUS PAPERS
ENGLISH
1) paragraph question....
ans) plz guys dn't waste time here. very big paragraph.. but only one question asked from it...
2-20) sentence competion, antonyms, synonyms, active and passive voice questions. we can easily answer them.
APTITUDE
20-40) all are R.S AGARWAL MODELS. If you r familiar with it u can answer it.
40-50) C program output type questions , digital circuits
ESSAY WRITING
Globalization is boon or bane
TECHNICAL INTERVIEW
I am from ECE
1) tell me about your self
2) TCP/IP (chain of questions regarding this, like UDP, ICMP,... in COMPUTER NETWORKS)
3) a question on my mini project
4) c program if the given number was a prime number or not
upto here all went normally, but suddenly he said that I bluffed him he said that he gave me program to print a sequence of prime numbers from 1-100..... that fool entirely insulted our ECE guys with some rubbish words... now-a-days they are not atall willing to take ECE candates... so all my ECE friends please be careful... if u clear this round u r in the company....

Monday 14 November 2011

i-Gate Placement Papers Campus Recuitment Question Paper pattern

IGATE Placement Papers
Question paper consists of 2 parts
Analytical skills: 20 questions, 20 mins
C Skills: 30 quesitons, 30 mins
Analytical:
1) Complete the diagram:
Four figure will be given, you have to draw the final one
Triangle figure
2) Draw venn diagram relating rhombus, quadrilateral & polygon
3) In a group of 5 persons A, B, C, D, E one of the person is advogate, one is doctor, one business man, one shopkeeper and one is professor.
There of them A,C and professor prefer playing Cricket to foot ball and two of them B and businessman prefer playing foot ball to Cricket. The shop keeper and B and A are friends but two of these prefer playing foot ball to cricket. The advogate is C's brother and both play same game. The docotor and e play cricket.
a) Who is advogate?
A, B, C, D
b) Who is shop keeper?
A, B, C, D
c) Which of the following group include presons who like playing cricket but doesn't inculde professor?
AB, BC, CD, None
d) who is doctor?
A, B, C, D
(same model problem was aksed in question paper but professions will be different such as horticulturist, physicst, journalist, advocate and other one. Instead of football and cricket they will give Tea and Coffee)
4. They will give some condition's and asked ot find out farthest city in the west (Easy one)?
5. Travelling sales man problem.
Some condition will be given we have to find out the order of station the sales man moves
Sales man moves
(Three questions)
6. +,-,*, /, will be given different meaning
Example: Take + as* and so on.
They will give expression and we have to finf the value of that.
7. 3+5-2 =4
Which has to be interchange to get the result?
8. We don't no exact problem.
Ex: 8A3B5C7D.
A will given + sign.
B will be given -sign
Find the value of expression?
9. Find the total number of squares in 1/4 of chess board?
10. 6 face of a cube are painted in a manner, no 2 adjacent face have same colour. Three colurs used Red, Blue and Green. Cube is cut in to 36 smaller cube in such a manner that 32 cubes are of one size and rest of them bigger size and each bigger side have no Red side. Following this three questions will be asked.
(In questions paper colors will be different)
11. Two ladies, two men sit in north east west south position of rectancular table. Using clues identify their position?
12. Clock problem.
(one question)
13. All men are vertebrate.
Some mammals are men.
Conclude.
C skills
1. find(int x,int y)
{ return ((x call find(a,find(a,b)) use to find
(a) maximum of a,b
(b) minimum of a,b
(c) positive difference of a,b
(d) sum of a,b
2. integer needs 2bytes , maximum value of an unsigned integer is
(a) { 2 power 16 } -1
(b) {2 power 15}-1
(c) {2 power16}
(d) {2 power 15}
3.y is of integer type then expression
3*(y-8)/9 and (y-8)/9*3 yields same value if
(a)must yields same value
(b)must yields different value
(c)may or may not yields same value
(d) none of the above
4. 5-2-3*5-2 will give 18 if
(a)- is left associative,* has precedence over -
(b) - is right associative,* has precedence over -
(c) - is right associative,- has precedence over *
(d)- is left associative,- has precedence over *
5. printf("%f", 9/5);
prints
(a) 1.8,
(b) 1.0,
(c) 2.0,
(d) none
6. if (a=7)
printf(" a is 7 ");
else
printf("a is not 7");
prints
(a) a is 7,
(b) a is not 7,
(c) nothing,
(d) garbage.
7. if (a>b)
if(b>c)
s1;
else s2;
s2 will be executed if
(a) a<= b,
(b) b>c,
(c) b<=c and a<=b,
(d) a>b and b<=c.
8. main()
{
inc(); ,inc(); , inc();
}
inc()
{ static int x;
printf("%d", ++x);
}
prints
(a) 012,
(b) 123,
(c) 3 consecutive unprectiable numbers
(d) 111.
9. preprocessing is done
(a) either before or at begining of compilation process
(b) after compilation before execution
(c) after loading
(d) none of the above.
10. printf("%d", sizeof(""));
prints
(a) error
(b)0
(c) garbage
(d) 1.
11.main()
{
int a=5,b=2;
printf("%d", a+++b);
}
(a) results in syntax,
(b) print 7,
(c) print 8,
(d) none,
12. process by which one bit patten in to another by bit wise operation is
(a) masking,
(b) pruning,
(c) biting,
(d) chopping,
13.value of automatic variable that is declared but not intialized
will be
(a) 0,
(b) -1,
(c) unpredictable,
(d) none,
14. int v=3, *pv=&v;
printf(" %d %d ", v,*pv);
output will be
(a) error
(b) 3 address of v,
(c) 3 3
(d) none.
15. declaration
enum cities{bethlehem,jericho,nazareth=1,jerusalem}
assian value 1 to
(a) bethlehem
(b) nazareth
(c)bethlehem & nazareth
(d)jericho & nazareth
16. #include
#include
void main()
{
char buffer[82]={80};
char *result;
printf( "input line of text, followed by carriage return : ");
result = cgets(buffer);
printf("text=%s ",result);
}
(a) printf("length=%d",buffer[1]);
(b) printf("length=%d",buffer[0]);
(c) printf("length=%d",buffer[81]);
(d) printf("length=%d",buffer[2]);
17. Consider scanf and sscanf function , which is true
(a) no standard function called sscanf
(b) sscanf(s,...) is equivalent to scanf(...) except that
input charecter are taken from string s.
(c) sscanf is equivalent to scanf.
(d) none of above.
18. #include
main()
{
char line[80];
scanf("%[^ ]",line);
printf("%s",line);
}
what scanf do ?
(a) compilation error . illegal format string.
(b) terminates reading input into variable line.
(c) and (d) other two options.
19. problem was big so i couldn’t remember . simple one.
20 . ceil(-2.8) ?
(a) 0
(b) -3.0
(c) -2.0
(d) 2
21. for( p=head; p!=null; p= p -> next)
free(p);
(a) program run smooth.
(b) compilation error.
(c) run time error.
(d) none of above.
22. int x[3][4] ={
{1,2,3},
{4,5,6},
{7,8,9}
}
(a) x[2][1] = x[2][2] =x[2][3] = 0
(b) value in fourth column is zero
(c) value in last row is zero
(d) none of above.
23. Problem was big so I couldn’t remember. Simple one.
24. main ()
{
printf("%u" , main());
}
(a) print garbage.
(b) execution error
(c) printing of starting address of function main.
(d) infinite loop.
25 . int a, *b = &a, **c =&b;
....
....
.....
a=4;
** c= 5;
(a) doesnot change value of a
(b) assign address of c to a.
(c) assign value of b to a.
(d) assign 5 to a.
26. Problem was big so i couldn’t remember . simple one.
27. Problem was big so i couldn’t remember . simple one.
28. Answer : swapping of values .
29. Simple one.
30. i =5;
i= (++i)/(i++);
printf( "%d" , i);
prints ,
(a) 2
(b) 5
(c) 1
(d) 6
In interview they will ask questions related to you are project and some C fundas.

Sunday 13 November 2011

TCS placement papers 2011

Welcome to TCS Placement Papers 2012 Section. Here you will find Latest Placement Papers of TCS 2011 with Answers, Solutions, Paper Pattern, Download Questions, August, November TCS Placement Papers 2011. These tcs Placement Papers are required for getting a job in companies like TCS. This list of TCS Placement Papers 2012 is provided by students of various engineering colleges like SSN, SRM, VIT, SVIT, etc.
TCS Placement Papers would generally have three sections: Verbal, Quantitative Aptitude & Critical Reasoning.

About TCS Company:-

Tata Consultancy Services - TCS is the pioneer of software services in India and is headquartered in Mumbai. With over 45,000 consultants working from offices and development centers spread all over the country, TCS works with global and Indian companies to create real business results. Apart from the development centers, TCS has centers of excellence and innovation labs that strengthen TCS’ ability to deliver innovative business solutions.

TCS Careers- Working at TCS - Why Should I Join TCS?

TCS offers a wide range of industry verticals, technology platforms, and business functions. The TCS employer brand positioning builds on its strengths and communicates TCS as an organization that offers its employees a complete Global IT Career by highlighting the three main value propositions: Global exposure, Freedom to work across domains and Work life balance.

HCL Placement Papers 2011

             HCL is one of the most advanced companies that recruit hundreds of bright candidates that have earned the degree of B.Tech. The questions paper involves various modern aspects that would test the basic knowledge of the candidates. The placement papers involve various questions on loyalty as well as organization related that exposes the candidate’s minds in the rue form. The placement paper involves various questions on diligence as well as judgment skills. The candidates also are tested for their endurance and responsibility.
            The company too frequently asks questions on general awareness that is in the multiple types. The questions also cover topics of mathematics and are divided into various parts. Part I and Part II are very important as they mainly cover the Language and the mathematics part. The company has specific type of placement paper for the software engineering that involves questions on computer programming and various computer languages such as C, C++ and such others.
           The company through this placement test tends to choose the best of the lots of the candidates and try to eliminate the non quality indented candidates. Thus the placement paper is of major significance to the HCL candidates as it directly relate to the standard check of the company.

Saturday 12 November 2011

Infosys May 2011 Placement paper recent paper with solutions

I attended infosys recuritment drive (through jkc) on 24th March, 2011. So the pattern of Infosys which mentioned in previous papers as same. First of all before starting written exam we have pre-presentation activity that may takes nearly one hour(explained company details by HR). After that written exam wouid be started.
Patteren like this
1: logicol reasoing(30ques-40min)
2: verbal ability(40ques-35min)
First of all reasoing paper given that consists structure like this
1-5 (three figures given those are some arrangements and fourth given as questoin mark and Select a suitable figure from the Answer Figures that would replace the question mark (?).this type of questions are in indiabix the exact part is non-verbal reasoing analogy part)
6-10(simple puzzle)
11-15(data interpertation more calculations require)
16-20(data suffiency )
21-25(did not say complex but some wat tough puzzle)
26-30(syllogims)
so after 5min gap verbal paper was given that consists like this
1-8(spotting errors)
9-16(choosing apprapriate sentence from the given options)
17-23(sentence filler ,sentence completion,synonyms,antonyms e.t.c will be given)
24-30(about theme detection)
31-35(small passage)
35-40(lenghthy and tough so u go question to answer)
totaly after 75mins answer sheet collected and result announced afetr three hrs sectional cuttoff may be reasoing 60% and verbal 50% based on requirement of those.
one thing would remind that if u need compulsary placement in infosys u can do the written paper espacially verbal its look like simple and also answers are nearly same but picking of best one is main thing so do those with another people or with team.
All the best guys!

Monday 7 November 2011

Master list of Java interview questions - 115 questions

115 questions total, not for the weak. Covers everything from basics to JDBC connectivity, AWT and JSP.
  1. What is the difference between procedural and object-oriented programs?- a) In procedural program, programming logic follows certain procedures and the instructions are executed one after another. In OOP program, unit of program is object, which is nothing but combination of data and code. b) In procedural program, data is exposed to the whole program whereas in OOPs program, it is accessible with in the object and which in turn assures the security of the code.
  2. What are Encapsulation, Inheritance and Polymorphism?- Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse. Inheritance is the process by which one object acquires the properties of another object. Polymorphism is the feature that allows one interface to be used for general class actions.
  3. What is the difference between Assignment and Initialization?- Assignment can be done as many times as desired whereas initialization can be done only once.
  4. What is OOPs?- Object oriented programming organizes a program around its data, i. e. , objects and a set of well defined interfaces to that data. An object-oriented program can be characterized as data controlling access to code.
  5. What are Class, Constructor and Primitive data types?- Class is a template for multiple objects with similar features and it is a blue print for objects. It defines a type of object according to the data the object can hold and the operations the object can perform. Constructor is a special kind of method that determines how an object is initialized when created. Primitive data types are 8 types and they are: byte, short, int, long, float, double, boolean, char.
  6. What is an Object and how do you allocate memory to it?- Object is an instance of a class and it is a software unit that combines a structured set of data with a set of operations for inspecting and manipulating that data. When an object is created using new operator, memory is allocated to it.
  7. What is the difference between constructor and method?- Constructor will be automatically invoked when an object is created whereas method has to be called explicitly.
  8. What are methods and how are they defined?- Methods are functions that operate on instances of classes in which they are defined. Objects can communicate with each other using methods and can call methods in other classes. Method definition has four parts. They are name of the method, type of object or primitive type the method returns, a list of parameters and the body of the method. A method’s signature is a combination of the first three parts mentioned above.
  9. What is the use of bin and lib in JDK?- Bin contains all tools such as javac, appletviewer, awt tool, etc., whereas lib contains API and all packages.
  10. What is casting?- Casting is used to convert the value of one type to another.
  11. How many ways can an argument be passed to a subroutine and explain them?- An argument can be passed in two ways. They are passing by value and passing by reference. Passing by value: This method copies the value of an argument into the formal parameter of the subroutine. Passing by reference: In this method, a reference to an argument (not the value of the argument) is passed to the parameter.
  12. What is the difference between an argument and a parameter?- While defining method, variables passed in the method are called parameters. While using those methods, values passed to those variables are called arguments.
  13. What are different types of access modifiers?- public: Any thing declared as public can be accessed from anywhere. private: Any thing declared as private can’t be seen outside of its class. protected: Any thing declared as protected can be accessed by classes in the same package and subclasses in the other packages. default modifier : Can be accessed only to classes in the same package.
  14. What is final, finalize() and finally?- final : final keyword can be used for class, method and variables. A final class cannot be subclassed and it prevents other programmers from subclassing a secure class to invoke insecure methods. A final method can’t be overridden. A final variable can’t change from its initialized value. finalize() : finalize() method is used just before an object is destroyed and can be called just prior to garbage collection. finally : finally, a key word used in exception handling, creates a block of code that will be executed after a try/catch block has completed and before the code following the try/catch block. The finally block will execute whether or not an exception is thrown. For example, if a method opens a file upon exit, then you will not want the code that closes the file to be bypassed by the exception-handling mechanism. This finally keyword is designed to address this contingency.
  15. What is UNICODE?- Unicode is used for internal representation of characters and strings and it uses 16 bits to represent each other.
  16. What is Garbage Collection and how to call it explicitly?- When an object is no longer referred to by any variable, java automatically reclaims memory used by that object. This is known as garbage collection. System. gc() method may be used to call it explicitly.
  17. What is finalize() method?- finalize () method is used just before an object is destroyed and can be called just prior to garbage collection.
  18. What are Transient and Volatile Modifiers?- Transient: The transient modifier applies to variables only and it is not stored as part of its object’s Persistent state. Transient variables are not serialized. Volatile: Volatile modifier applies to variables only and it tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of the program.
  19. What is method overloading and method overriding?- Method overloading: When a method in a class having the same method name with different arguments is said to be method overloading. Method overriding : When a method in a class having the same method name with same arguments is said to be method overriding.
  20. What is difference between overloading and overriding?- a) In overloading, there is a relationship between methods available in the same class whereas in overriding, there is relationship between a superclass method and subclass method. b) Overloading does not block inheritance from the superclass whereas overriding blocks inheritance from the superclass. c) In overloading, separate methods share the same name whereas in overriding, subclass method replaces the superclass. d) Overloading must have different method signatures whereas overriding must have same signature.
  21. What is meant by Inheritance and what are its advantages?- Inheritance is the process of inheriting all the features from a class. The advantages of inheritance are reusability of code and accessibility of variables and methods of the super class by subclasses.
  22. What is the difference between this() and super()?- this() can be used to invoke a constructor of the same class whereas super() can be used to invoke a super class constructor.
  23. What is the difference between superclass and subclass?- A super class is a class that is inherited whereas sub class is a class that does the inheriting.
  24. What modifiers may be used with top-level class?- public, abstract and final can be used for top-level class.
  25. What are inner class and anonymous class?- Inner class : classes defined in other classes, including those defined in methods are called inner classes. An inner class can have any accessibility including private. Anonymous class : Anonymous class is a class defined inside a method without a name and is instantiated and declared in the same place and cannot have explicit constructors.
  26. What is a package?- A package is a collection of classes and interfaces that provides a high-level layer of access protection and name space management.
  27. What is a reflection package?- java. lang. reflect package has the ability to analyze itself in runtime.
  28. What is interface and its use?- Interface is similar to a class which may contain method’s signature only but not bodies and it is a formal set of method and constant declarations that must be defined by the class that implements it. Interfaces are useful for: a)Declaring methods that one or more classes are expected to implement b)Capturing similarities between unrelated classes without forcing a class relationship. c)Determining an object’s programming interface without revealing the actual body of the class.
  29. What is an abstract class?- An abstract class is a class designed with implementation gaps for subclasses to fill in and is deliberately incomplete.
  30. What is the difference between Integer and int?- a) Integer is a class defined in the java. lang package, whereas int is a primitive data type defined in the Java language itself. Java does not automatically convert from one to the other. b) Integer can be used as an argument for a method that requires an object, whereas int can be used for calculations.
  31. What is a cloneable interface and how many methods does it contain?- It is not having any method because it is a TAGGED or MARKER interface.
  32. What is the difference between abstract class and interface?- a) All the methods declared inside an interface are abstract whereas abstract class must have at least one abstract method and others may be concrete or abstract. b) In abstract class, key word abstract must be used for the methods whereas interface we need not use that keyword for the methods. c) Abstract class must have subclasses whereas interface can’t have subclasses.
  33. Can you have an inner class inside a method and what variables can you access?- Yes, we can have an inner class inside a method and final variables can be accessed.
  34. What is the difference between String and String Buffer?- a) String objects are constants and immutable whereas StringBuffer objects are not. b) String class supports constant strings whereas StringBuffer class supports growable and modifiable strings.
  35. What is the difference between Array and vector?- Array is a set of related data type and static whereas vector is a growable array of objects and dynamic.
  36. What is the difference between exception and error?- The exception class defines mild error conditions that your program encounters. Exceptions can occur when trying to open the file, which does not exist, the network connection is disrupted, operands being manipulated are out of prescribed ranges, the class file you are interested in loading is missing. The error class defines serious error conditions that you should not attempt to recover from. In most cases it is advisable to let the program terminate when such an error is encountered.
  37. What is the difference between process and thread?- Process is a program in execution whereas thread is a separate path of execution in a program.
  38. What is multithreading and what are the methods for inter-thread communication and what is the class in which these methods are defined?- Multithreading is the mechanism in which more than one thread run independent of each other within the process. wait (), notify () and notifyAll() methods can be used for inter-thread communication and these methods are in Object class. wait() : When a thread executes a call to wait() method, it surrenders the object lock and enters into a waiting state. notify() or notifyAll() : To remove a thread from the waiting state, some other thread must make a call to notify() or notifyAll() method on the same object.
  39. What is the class and interface in java to create thread and which is the most advantageous method?- Thread class and Runnable interface can be used to create threads and using Runnable interface is the most advantageous method to create threads because we need not extend thread class here.
  40. What are the states associated in the thread?- Thread contains ready, running, waiting and dead states.
  41. What is synchronization?- Synchronization is the mechanism that ensures that only one thread is accessed the resources at a time.
  42. When you will synchronize a piece of your code?- When you expect your code will be accessed by different threads and these threads may change a particular data causing data corruption.
  43. What is deadlock?- When two threads are waiting each other and can’t precede the program is said to be deadlock.
  44. What is daemon thread and which method is used to create the daemon thread?- Daemon thread is a low priority thread which runs intermittently in the back ground doing the garbage collection operation for the java runtime system. setDaemon method is used to create a daemon thread.
  45. Are there any global variables in Java, which can be accessed by other part of your program?- No, it is not the main method in which you define variables. Global variables is not possible because concept of encapsulation is eliminated here.
  46. What is an applet?- Applet is a dynamic and interactive program that runs inside a web page displayed by a java capable browser.
  47. What is the difference between applications and applets?- a)Application must be run on local machine whereas applet needs no explicit installation on local machine. b)Application must be run explicitly within a java-compatible virtual machine whereas applet loads and runs itself automatically in a java-enabled browser. d)Application starts execution with its main method whereas applet starts execution with its init method. e)Application can run with or without graphical user interface whereas applet must run within a graphical user interface.
  48. How does applet recognize the height and width?- Using getParameters() method.
  49. When do you use codebase in applet?- When the applet class file is not in the same directory, codebase is used.
  50. What is the lifecycle of an applet?- init() method - Can be called when an applet is first loaded start() method - Can be called each time an applet is started. paint() method - Can be called when the applet is minimized or maximized. stop() method - Can be used when the browser moves off the applet’s page. destroy() method - Can be called when the browser is finished with the applet.
  51. How do you set security in applets?- using setSecurityManager() method
  52. What is an event and what are the models available for event handling?- An event is an event object that describes a state of change in a source. In other words, event occurs when an action is generated, like pressing button, clicking mouse, selecting a list, etc. There are two types of models for handling events and they are: a) event-inheritance model and b) event-delegation model
  53. What are the advantages of the model over the event-inheritance model?- The event-delegation model has two advantages over the event-inheritance model. They are: a)It enables event handling by objects other than the ones that generate the events. This allows a clean separation between a component’s design and its use. b)It performs much better in applications where many events are generated. This performance improvement is due to the fact that the event-delegation model does not have to be repeatedly process unhandled events as is the case of the event-inheritance.
  54. What is source and listener?- source : A source is an object that generates an event. This occurs when the internal state of that object changes in some way. listener : A listener is an object that is notified when an event occurs. It has two major requirements. First, it must have been registered with one or more sources to receive notifications about specific types of events. Second, it must implement methods to receive and process these notifications.
  55. What is adapter class?- An adapter class provides an empty implementation of all methods in an event listener interface. Adapter classes are useful when you want to receive and process only some of the events that are handled by a particular event listener interface. You can define a new class to act listener by extending one of the adapter classes and implementing only those events in which you are interested. For example, the MouseMotionAdapter class has two methods, mouseDragged()and mouseMoved(). The signatures of these empty are exactly as defined in the MouseMotionListener interface. If you are interested in only mouse drag events, then you could simply extend MouseMotionAdapter and implement mouseDragged() .
  56. What is meant by controls and what are different types of controls in AWT?- Controls are components that allow a user to interact with your application and the AWT supports the following types of controls: Labels, Push Buttons, Check Boxes, Choice Lists, Lists, Scrollbars, Text Components. These controls are subclasses of Component.
  57. What is the difference between choice and list?- A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices and only one item may be selected from a choice. A List may be displayed in such a way that several list items are visible and it supports the selection of one or more list items.
  58. What is the difference between scrollbar and scrollpane?- A Scrollbar is a Component, but not a Container whereas Scrollpane is a Conatiner and handles its own events and perform its own scrolling.
  59. What is a layout manager and what are different types of layout managers available in java AWT?- A layout manager is an object that is used to organize components in a container. The different layouts are available are FlowLayout, BorderLayout, CardLayout, GridLayout and GridBagLayout.
  60. How are the elements of different layouts organized?- FlowLayout: The elements of a FlowLayout are organized in a top to bottom, left to right fashion. BorderLayout: The elements of a BorderLayout are organized at the borders (North, South, East and West) and the center of a container. CardLayout: The elements of a CardLayout are stacked, on top of the other, like a deck of cards. GridLayout: The elements of a GridLayout are of equal size and are laid out using the square of a grid. GridBagLayout: The elements of a GridBagLayout are organized according to a grid. However, the elements are of different size and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes.
  61. Which containers use a Border layout as their default layout?- Window, Frame and Dialog classes use a BorderLayout as their layout.
  62. Which containers use a Flow layout as their default layout?- Panel and Applet classes use the FlowLayout as their default layout.
  63. What are wrapper classes?- Wrapper classes are classes that allow primitive types to be accessed as objects.
  64. What are Vector, Hashtable, LinkedList and Enumeration?- Vector : The Vector class provides the capability to implement a growable array of objects. Hashtable : The Hashtable class implements a Hashtable data structure. A Hashtable indexes and stores objects in a dictionary using hash codes as the object’s keys. Hash codes are integer values that identify objects. LinkedList: Removing or inserting elements in the middle of an array can be done using LinkedList. A LinkedList stores each object in a separate link whereas an array stores object references in consecutive locations. Enumeration: An object that implements the Enumeration interface generates a series of elements, one at a time. It has two methods, namely hasMoreElements() and nextElement(). HasMoreElemnts() tests if this enumeration has more elements and nextElement method returns successive elements of the series.
  65. What is the difference between set and list?- Set stores elements in an unordered way but does not contain duplicate elements, whereas list stores elements in an ordered way but may contain duplicate elements.
  66. What is a stream and what are the types of Streams and classes of the Streams?- A Stream is an abstraction that either produces or consumes information. There are two types of Streams and they are: Byte Streams: Provide a convenient means for handling input and output of bytes. Character Streams: Provide a convenient means for handling input & output of characters. Byte Streams classes: Are defined by using two abstract classes, namely InputStream and OutputStream. Character Streams classes: Are defined by using two abstract classes, namely Reader and Writer.
  67. What is the difference between Reader/Writer and InputStream/Output Stream?- The Reader/Writer class is character-oriented and the InputStream/OutputStream class is byte-oriented.
  68. What is an I/O filter?- An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another.
  69. What is serialization and deserialization?- Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects.
  70. What is JDBC?- JDBC is a set of Java API for executing SQL statements. This API consists of a set of classes and interfaces to enable programs to write pure Java Database applications.
  71. What are drivers available?- a) JDBC-ODBC Bridge driver b) Native API Partly-Java driver c) JDBC-Net Pure Java driver d) Native-Protocol Pure Java driver
  72. What is the difference between JDBC and ODBC?- a) OBDC is for Microsoft and JDBC is for Java applications. b) ODBC can’t be directly used with Java because it uses a C interface. c) ODBC makes use of pointers which have been removed totally from Java. d) ODBC mixes simple and advanced features together and has complex options for simple queries. But JDBC is designed to keep things simple while allowing advanced capabilities when required. e) ODBC requires manual installation of the ODBC driver manager and driver on all client machines. JDBC drivers are written in Java and JDBC code is automatically installable, secure, and portable on all platforms. f) JDBC API is a natural Java interface and is built on ODBC. JDBC retains some of the basic features of ODBC.
  73. What are the types of JDBC Driver Models and explain them?- There are two types of JDBC Driver Models and they are: a) Two tier model and b) Three tier model Two tier model: In this model, Java applications interact directly with the database. A JDBC driver is required to communicate with the particular database management system that is being accessed. SQL statements are sent to the database and the results are given to user. This model is referred to as client/server configuration where user is the client and the machine that has the database is called as the server. Three tier model: A middle tier is introduced in this model. The functions of this model are: a) Collection of SQL statements from the client and handing it over to the database, b) Receiving results from database to the client and c) Maintaining control over accessing and updating of the above.
  74. What are the steps involved for making a connection with a database or how do you connect to a database?a) Loading the driver : To load the driver, Class. forName() method is used. Class. forName(”sun. jdbc. odbc. JdbcOdbcDriver”); When the driver is loaded, it registers itself with the java. sql. DriverManager class as an available database driver. b) Making a connection with database: To open a connection to a given database, DriverManager. getConnection() method is used. Connection con = DriverManager. getConnection (”jdbc:odbc:somedb”, “user”, “password”); c) Executing SQL statements : To execute a SQL query, java. sql. statements class is used. createStatement() method of Connection to obtain a new Statement object. Statement stmt = con. createStatement(); A query that returns data can be executed using the executeQuery() method of Statement. This method executes the statement and returns a java. sql. ResultSet that encapsulates the retrieved data: ResultSet rs = stmt. executeQuery(”SELECT * FROM some table”); d) Process the results : ResultSet returns one row at a time. Next() method of ResultSet object can be called to move to the next row. The getString() and getObject() methods are used for retrieving column values: while(rs. next()) { String event = rs. getString(”event”); Object count = (Integer) rs. getObject(”count”);
  75. What type of driver did you use in project?- JDBC-ODBC Bridge driver (is a driver that uses native(C language) libraries and makes calls to an existing ODBC driver to access a database engine).
  76. What are the types of statements in JDBC?- Statement: to be used createStatement() method for executing single SQL statement PreparedStatement — To be used preparedStatement() method for executing same SQL statement over and over. CallableStatement — To be used prepareCall() method for multiple SQL statements over and over.
  77. What is stored procedure?- Stored procedure is a group of SQL statements that forms a logical unit and performs a particular task. Stored Procedures are used to encapsulate a set of operations or queries to execute on database. Stored procedures can be compiled and executed with different parameters and results and may have any combination of input/output parameters.
  78. How to create and call stored procedures?- To create stored procedures: Create procedure procedurename (specify in, out and in out parameters) BEGIN Any multiple SQL statement; END; To call stored procedures: CallableStatement csmt = con. prepareCall(”{call procedure name(?,?)}”); csmt. registerOutParameter(column no. , data type); csmt. setInt(column no. , column name) csmt. execute();
  79. What is servlet?- Servlets are modules that extend request/response-oriented servers, such as java-enabled web servers. For example, a servlet might be responsible for taking data in an HTML order-entry form and applying the business logic used to update a company’s order database.
  80. What are the classes and interfaces for servlets?- There are two packages in servlets and they are javax. servlet and
  81. What is the difference between an applet and a servlet?- a) Servlets are to servers what applets are to browsers. b) Applets must have graphical user interfaces whereas servlets have no graphical user interfaces.
  82. What is the difference between doPost and doGet methods?- a) doGet() method is used to get information, while doPost() method is used for posting information. b) doGet() requests can’t send large amount of information and is limited to 240-255 characters. However, doPost()requests passes all of its data, of unlimited length. c) A doGet() request is appended to the request URL in a query string and this allows the exchange is visible to the client, whereas a doPost() request passes directly over the socket connection as part of its HTTP request body and the exchange are invisible to the client.
  83. What is the life cycle of a servlet?- Each Servlet has the same life cycle: a) A server loads and initializes the servlet by init () method. b) The servlet handles zero or more client’s requests through service() method. c) The server removes the servlet through destroy() method.
  84. Who is loading the init() method of servlet?- Web server
  85. What are the different servers available for developing and deploying Servlets?- a) Java Web Server b) JRun g) Apache Server h) Netscape Information Server i) Web Logic
  86. How many ways can we track client and what are they?- The servlet API provides two ways to track client state and they are: a) Using Session tracking and b) Using Cookies.
  87. What is session tracking and how do you track a user session in servlets?- Session tracking is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time. The methods used for session tracking are: a) User Authentication - occurs when a web server restricts access to some of its resources to only those clients that log in using a recognized username and password. b) Hidden form fields - fields are added to an HTML form that are not displayed in the client’s browser. When the form containing the fields is submitted, the fields are sent back to the server. c) URL rewriting - every URL that the user clicks on is dynamically modified or rewritten to include extra information. The extra information can be in the form of extra path information, added parameters or some custom, server-specific URL change. d) Cookies - a bit of information that is sent by a web server to a browser and which can later be read back from that browser. e) HttpSession- places a limit on the number of sessions that can exist in memory. This limit is set in the session. maxresidents property.
  88. What is Server-Side Includes (SSI)?- Server-Side Includes allows embedding servlets within HTML pages using a special servlet tag. In many servlets that support servlets, a page can be processed by the server to include output from servlets at certain points inside the HTML page. This is accomplished using a special internal SSINCLUDE, which processes the servlet tags. SSINCLUDE servlet will be invoked whenever a file with an. shtml extension is requested. So HTML files that include server-side includes must be stored with an . shtml extension.
  89. What are cookies and how will you use them?- Cookies are a mechanism that a servlet uses to have a client hold a small amount of state-information associated with the user. a) Create a cookie with the Cookie constructor: public Cookie(String name, String value) b) A servlet can send a cookie to the client by passing a Cookie object to the addCookie() method of HttpServletResponse: public void HttpServletResponse. addCookie(Cookie cookie) c) A servlet retrieves cookies by calling the getCookies() method of HttpServletRequest: public Cookie[ ] HttpServletRequest. getCookie().
  90. Is it possible to communicate from an applet to servlet and how many ways and how?- Yes, there are three ways to communicate from an applet to servlet and they are: a) HTTP Communication(Text-based and object-based) b) Socket Communication c) RMI Communication
  91. What is connection pooling?- With servlets, opening a database connection is a major bottleneck because we are creating and tearing down a new connection for every page request and the time taken to create connection will be more. Creating a connection pool is an ideal approach for a complicated servlet. With a connection pool, we can duplicate only the resources we need to duplicate rather than the entire servlet. A connection pool can also intelligently manage the size of the pool and make sure each connection remains valid. A number of connection pool packages are currently available. Some like DbConnectionBroker are freely available from Java Exchange Works by creating an object that dispenses connections and connection Ids on request. The ConnectionPool class maintains a Hastable, using Connection objects as keys and Boolean values as stored values. The Boolean value indicates whether a connection is in use or not. A program calls getConnection() method of the ConnectionPool for getting Connection object it can use; it calls returnConnection() to give the connection back to the pool.
  92. Why should we go for interservlet communication?- Servlets running together in the same server communicate with each other in several ways. The three major reasons to use interservlet communication are: a) Direct servlet manipulation - allows to gain access to the other currently loaded servlets and perform certain tasks (through the ServletContext object) b) Servlet reuse - allows the servlet to reuse the public methods of another servlet. c) Servlet collaboration - requires to communicate with each other by sharing specific information (through method invocation)
  93. Is it possible to call servlet with parameters in the URL?- Yes. You can call a servlet with parameters in the syntax as (?Param1 = xxx || m2 = yyy).
  94. What is Servlet chaining?- Servlet chaining is a technique in which two or more servlets can cooperate in servicing a single request. In servlet chaining, one servlet’s output is piped to the next servlet’s input. This process continues until the last servlet is reached. Its output is then sent back to the client.
  95. How do servlets handle multiple simultaneous requests?- The server has multiple threads that are available to handle requests. When a request comes in, it is assigned to a thread, which calls a service method (for example: doGet(), doPost() and service()) of the servlet. For this reason, a single servlet object can have its service methods called by many threads at once.
  96. What is the difference between TCP/IP and UDP?- TCP/IP is a two-way communication between the client and the server and it is a reliable and there is a confirmation regarding reaching the message to the destination. It is like a phone call. UDP is a one-way communication only between the client and the server and it is not a reliable and there is no confirmation regarding reaching the message to the destination. It is like a postal mail.
  97. What is Inet address?- Every computer connected to a network has an IP address. An IP address is a number that uniquely identifies each computer on the Net. An IP address is a 32-bit number.
  98. What is Domain Naming Service(DNS)?- It is very difficult to remember a set of numbers(IP address) to connect to the Internet. The Domain Naming Service(DNS) is used to overcome this problem. It maps one particular IP address to a string of characters. For example, www. mascom. com implies com is the domain name reserved for US commercial sites, moscom is the name of the company and www is the name of the specific computer, which is mascom’s server.
  99. What is URL?- URL stands for Uniform Resource Locator and it points to resource files on the Internet. URL has four components: http://www. address. com:80/index.html, where http - protocol name, address - IP address or host name, 80 - port number and index.html - file path.
  100. What is RMI and steps involved in developing an RMI object?- Remote Method Invocation (RMI) allows java object that executes on one machine and to invoke the method of a Java object to execute on another machine. The steps involved in developing an RMI object are: a) Define the interfaces b) Implementing these interfaces c) Compile the interfaces and their implementations with the java compiler d) Compile the server implementation with RMI compiler e) Run the RMI registry f) Run the application
  101. What is RMI architecture?- RMI architecture consists of four layers and each layer performs specific functions: a) Application layer - contains the actual object definition. b) Proxy layer - consists of stub and skeleton. c) Remote Reference layer - gets the stream of bytes from the transport layer and sends it to the proxy layer. d) Transportation layer - responsible for handling the actual machine-to-machine communication.
  102. what is UnicastRemoteObject?- All remote objects must extend UnicastRemoteObject, which provides functionality that is needed to make objects available from remote machines.
  103. Explain the methods, rebind() and lookup() in Naming class?- rebind() of the Naming class(found in java. rmi) is used to update the RMI registry on the server machine. Naming. rebind(”AddSever”, AddServerImpl); lookup() of the Naming class accepts one argument, the rmi URL and returns a reference to an object of type AddServerImpl.
  104. What is a Java Bean?- A Java Bean is a software component that has been designed to be reusable in a variety of different environments.
  105. What is a Jar file?- Jar file allows to efficiently deploying a set of classes and their associated resources. The elements in a jar file are compressed, which makes downloading a Jar file much faster than separately downloading several uncompressed files. The package java. util. zip contains classes that read and write jar files.
  106. What is BDK?- BDK, Bean Development Kit is a tool that enables to create, configure and connect a set of set of Beans and it can be used to test Beans without writing a code.
  107. What is JSP?- JSP is a dynamic scripting capability for web pages that allows Java as well as a few special tags to be embedded into a web file (HTML/XML, etc). The suffix traditionally ends with .jsp to indicate to the web server that the file is a JSP files. JSP is a server side technology - you can’t do any client side validation with it. The advantages are: a) The JSP assists in making the HTML more functional. Servlets on the other hand allow outputting of HTML but it is a tedious process. b) It is easy to make a change and then let the JSP capability of the web server you are using deal with compiling it into a servlet and running it.
  108. What are JSP scripting elements?- JSP scripting elements lets to insert Java code into the servlet that will be generated from the current JSP page. There are three forms: a) Expressions of the form <%= expression %> that are evaluated and inserted into the output, b) Scriptlets of the form<% code %>that are inserted into the servlet’s service method, and c) Declarations of the form <%! Code %>that are inserted into the body of the servlet class, outside of any existing methods.
  109. What are JSP Directives?- A JSP directive affects the overall structure of the servlet class. It usually has the following form:<%@ directive attribute=”value” %> However, you can also combine multiple attribute settings for a single directive, as follows:<%@ directive attribute1=”value1″ attribute 2=”value2″ . . . attributeN =”valueN” %> There are two main types of directive: page, which lets to do things like import classes, customize the servlet superclass, and the like; and include, which lets to insert a file into the servlet class at the time the JSP file is translated into a servlet
  110. What are Predefined variables or implicit objects?- To simplify code in JSP expressions and scriptlets, we can use eight automatically defined variables, sometimes called implicit objects. They are request, response, out, session, application, config, pageContext, and page.
  111. What are JSP ACTIONS?- JSP actions use constructs in XML syntax to control the behavior of the servlet engine. You can dynamically insert a file, reuse JavaBeans components, forward the user to another page, or generate HTML for the Java plugin. Available actions include: jsp:include - Include a file at the time the page is requested. jsp:useBean - Find or instantiate a JavaBean. jsp:setProperty - Set the property of a JavaBean. jsp:getProperty - Insert the property of a JavaBean into the output. jsp:forward - Forward the requester to a newpage. Jsp: plugin - Generate browser-specific code that makes an OBJECT or EMBED
  112. How do you pass data (including JavaBeans) to a JSP from a servlet?- (1) Request Lifetime: Using this technique to pass beans, a request dispatcher (using either “include” or forward”) can be called. This bean will disappear after processing this request has been completed. Servlet: request. setAttribute(”theBean”, myBean); RequestDispatcher rd = getServletContext(). getRequestDispatcher(”thepage. jsp”); rd. forward(request, response); JSP PAGE:<jsp: useBean id=”theBean” scope=”request” class=”. . . . . ” />(2) Session Lifetime: Using this technique to pass beans that are relevant to a particular session (such as in individual user login) over a number of requests. This bean will disappear when the session is invalidated or it times out, or when you remove it. Servlet: HttpSession session = request. getSession(true); session. putValue(”theBean”, myBean); /* You can do a request dispatcher here, or just let the bean be visible on the next request */ JSP Page:<jsp:useBean id=”theBean” scope=”session” class=”. . . ” /> 3) Application Lifetime: Using this technique to pass beans that are relevant to all servlets and JSP pages in a particular app, for all users. For example, I use this to make a JDBC connection pool object available to the various servlets and JSP pages in my apps. This bean will disappear when the servlet engine is shut down, or when you remove it. Servlet: GetServletContext(). setAttribute(”theBean”, myBean); JSP PAGE:<jsp:useBean id=”theBean” scope=”application” class=”. . . ” />
  113. How can I set a cookie in JSP?- response. setHeader(”Set-Cookie”, “cookie string”); To give the response-object to a bean, write a method setResponse (HttpServletResponse response) - to the bean, and in jsp-file:<% bean. setResponse (response); %>
  114. How can I delete a cookie with JSP?- Say that I have a cookie called “foo, ” that I set a while ago & I want it to go away. I simply: <% Cookie killCookie = new Cookie(”foo”, null); KillCookie. setPath(”/”); killCookie. setMaxAge(0); response. addCookie(killCookie); %>
  115. How are Servlets and JSP Pages related?- JSP pages are focused around HTML (or XML) with Java codes and JSP tags inside them. When a web server that has JSP support is asked for a JSP page, it checks to see if it has already compiled the page into a servlet. Thus, JSP pages become servlets and are transformed into pure Java and then compiled, loaded into the server and executed.

Search here for "Freshers Jobs"