<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8752774920344563789</id><updated>2012-01-11T03:16:40.590-08:00</updated><category term='Java Preparation Kit'/><category term='State Management'/><category term='QA'/><category term='Debugging and Testing'/><category term='Group Discussion (GD)'/><category term='XML'/><category term='J2EE Preparation Kit'/><category term='Interview Questions'/><category term='Web Service'/><category term='ASP.NET'/><category term='Testing'/><category term='HR Interview Questions'/><category term='C#'/><category term='Method and Property'/><category term='Cover Letter'/><category term='Assembly'/><category term='Testing Preparation Kit'/><category term='Events and Delegates'/><category term='.NET Preparation Kit'/><category term='Interview Tips'/><category term='C/C++ Preparation Kit'/><category term='.NET Remoting'/><category term='.NET  Preparation Kit'/><category term='ADO.NET and Database'/><category term='Class'/><title type='text'>Knowledge Center</title><subtitle type='html'>Interview Preparation For Freshers</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>55</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-2563887238679901498</id><published>2011-06-18T04:40:00.000-07:00</published><updated>2011-06-18T04:40:09.212-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Group Discussion (GD)'/><title type='text'>Group Discussion (GD)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;What is Group Discussion?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;A GD is an activity where around 6 to 10 candidates are given a topic to discuss for about 10 to 20 minutes so that the evaluator can examine the Skill, knowledge and other traits required for the position the candidates are competing for. It is usually an informal discussion where each candidate has an equal opportunity to air his views on the topic being discussed.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;TYPES OF GD:&lt;br /&gt;&lt;br /&gt;1) Topic based&lt;br /&gt;• KNOWLEDGE BASED&lt;br /&gt;• FACTUAL STATEMENT BASED&lt;br /&gt;• OPINION SEEKING TOPICS&lt;br /&gt;• ABSTRACT TOPICS(unclear)&lt;br /&gt;&lt;br /&gt;2) Case study&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;KNOWLEDGE BASED:&lt;/b&gt;&lt;br /&gt;These kind of GDs necessarily requires in depth knowledge of the subject to be successful.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Examples are :&lt;/b&gt;&lt;br /&gt;- The outcome of previous SAARC meeting.&lt;br /&gt;- Single currency adoption in European Union.&lt;br /&gt;- Functioning of NATO&lt;br /&gt;- Role of Australia in the Iraq war.&lt;br /&gt;&lt;br /&gt;In these kind of topics apart from other traits, the evaluator is most likely to give more importance to the knowledge base of the candidates. To prepare for these kind of topics we recommend all UrPercentile.com subscribers to read newspapers and current affair magazines of last four weeks before attending any GD. Without knowledge of the subject topic it would be very difficult to get through. Though you can play the role of co-ordinator (Roles Will be discussed later in detail) in such kind of situation but it would be very hard to be accepted as a leader by other members with you not expressing any knowledge on the topic.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;FACTUAL STATEMENT BASED :&lt;/b&gt;&lt;br /&gt;In these king of topic the evaluator generally gives one statement from a past event and leaves it to the group to decide about what to talk about it.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Example of such topics are :&lt;/b&gt;&lt;br /&gt;- Automible sector has shown 5 % growth last year.&lt;br /&gt;- India did not win any gold medal in Olympics.&lt;br /&gt;- BPO sector brought in 200 million to XYZ state.&lt;br /&gt;&lt;br /&gt;In these kind of topics, one can clear the GD with relatively less knowledge about the subject compared to the ones mentioned in Knowledge based topics above. This is, provided that the candidate shows competence in other areas like Leadership qualities, communication skills, people handling skills and ability to work in a team. UrPercentile.com subscribers are suggested to be aware of recent hot topics to be ready for such topics. ( UrPercentile.com)&lt;b&gt;&lt;br /&gt;&lt;br /&gt;OPINION SEEKING TOPICS :&lt;/b&gt;&lt;br /&gt;In these kind of topics the candidate have to express their opinion on a particular topic.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;Example :&lt;/b&gt;&lt;br /&gt;- Should India send troops to assist other nations in a war?&lt;br /&gt;- Should one go for MBA if he is having a very good job ?&lt;br /&gt;The evaluator is likely to give more importance to presentation skill, the ability to work in a team, and overall personality of the candidates. Whether you speak for the topic or against the topic won’t make any difference, it is the way you express your opinion that will matter.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;ABSTRACT TOPICS :&lt;/b&gt;&lt;br /&gt;In this kind of topic the evaluator gives one abstract statement for the group to discuss about it.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;Example are :&lt;/b&gt;&lt;br /&gt;- Red Is Red&lt;br /&gt;- Nothing is possible.&lt;br /&gt;- Sun rises from east and sets on west.&lt;br /&gt;- A drop in a ocean.&lt;br /&gt;The topic is usually ambiguous and is open for interpretation in different ways. In these kind of topics one has to think hard to crack what is expected from the topic. The evaluator is looking for the candidates who forms the basis of discussion, guides the discussion and get other people involved. The evaluator is likely to give more importance to the communication skill, intuitiveness and comprehension skills. UrPercentile.com subscribers are recommended to practise such topics by having discussion among themselves.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;CASE STUDY &lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;A situation is described to the candidates and a question is left open at the end for candidates to discuss. These kind of discussion comparatively require less amount of general awareness, it rather tests the ability of candidates to make decisions, ability to work in a team and the ability to influence people.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;Example :&lt;/b&gt;&lt;br /&gt;Suresh was the best salesman of the company and always use to achieve more than the target assigned to him. Sometimes he was able to achieve two times the sales target assigned to him. He was hardworking and honest and got promoted to Area Sales Manager just two weeks ago. His boss Ramesh, comes to know from one of his friend that Suresh is suppose to attend an interview on the coming Friday for a job with their competitor. Suresh is most likely to get the offer from the competitor if he goes for the interview. 2 days before the scheduled interview, Suresh applies for a leave for the scheduled interview day. What should Ramesh do ?&lt;br /&gt;In these kind of GDs one should try to identify the problem and suggest different possible solutions to the problem and lead the group to a common consensus. Though it will not be always possible to convince the whole group, but one who tries the best will succeed.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;G.D Evaluated parameters:&lt;/b&gt;&lt;br /&gt;• Relevance of points(content, knowledge base)&lt;br /&gt;• Communication(oral language, body language)&lt;br /&gt;• Group Behaviors&lt;br /&gt;• Leader ship Qualities&lt;b&gt;&lt;br /&gt;&lt;br /&gt;G.D Tips:&lt;/b&gt;&lt;br /&gt;• Take a small note book and pen&lt;br /&gt;• Note down some of other ideas in your paper&lt;br /&gt;• Let write your ideas in words not long sentences&lt;br /&gt;• Speak only in English&lt;br /&gt;• Speak in simple English language&lt;br /&gt;• You should be sensible listener&lt;br /&gt;• Don’t offend others&lt;br /&gt;• Don’t say I don’t agree with you&lt;br /&gt;• Don’t say you are wrong&lt;br /&gt;• Don’t point finger out others&lt;br /&gt;• Don’t laugh&lt;br /&gt;• Don’t bring names&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Idea generation Tips:&lt;/b&gt;&lt;br /&gt;• Key word approach&lt;br /&gt;• Spelt(social, political, economic, legal or logical ,technological)&lt;br /&gt;• View point of affected parties(voap)&lt;br /&gt;&lt;b&gt;&lt;br /&gt;HOW IS THE PERFORMANCE JUDGED:&lt;/b&gt;&lt;br /&gt;Selection is done based on the impact created by each candidate on the group. Who does get selected?&lt;br /&gt;• One who expresses his ideas well.&lt;br /&gt;• One who has sound arguments, and shows keenness and interest.&lt;br /&gt;• One who has sufficient knowledge of his subject and convinces the group by his argumentative presentation.&lt;br /&gt;• One who has a logical and systematic approach.&lt;br /&gt;Above all, it is the one who has the tendency to cooperate and who does the coordination and is liked by the group.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;MANAGEMENT GAMES :&lt;/b&gt;&lt;br /&gt;Though these are not adopted for selection of MBA course very often, but we just thought that all UrPercentile.com members should know about these. A nameplate is put in front of each candidate and the role the candidates are suppose to play in the game is written on each nameplate. Example of such roles are: HR Manager, Union Leader, CEO, worker, Customer, vendor, Truck driver, Tax inspector etc. Each candidates can see the role other members are suppose to play but is not aware of the role he/she is suppose to play. A business situation is given to them and they are asked to discuss the situation. In such type of discussion the candidates are expected to judge the role they are suppose to play and react in the way they should be doing. Other form of such discussion could be where each candidate knows his/her role only but does not know the roles of others in group. The group is described a business situation and are asked to discuss on it.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-2563887238679901498?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/2563887238679901498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=2563887238679901498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2563887238679901498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2563887238679901498'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/group-discussion-gd.html' title='Group Discussion (GD)'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-3373978383455926330</id><published>2011-06-18T04:35:00.000-07:00</published><updated>2011-06-18T04:36:14.657-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>Some Important HR Interview Questions</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Tell us about yourself ? &lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-tell-us-about.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Why do you want to join us? &lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-why-do-you-want.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;What would you like to be doing five years from now? &lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-would-you.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Do you prefer working with others or alone?&amp;nbsp; &lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-do-you-prefer.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;What are your biggest accomplishments?&amp;nbsp; &lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-are-your.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;What are your favorite subjects? &amp;nbsp; &lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-are-your_18.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Why should we hire you? &amp;nbsp; &lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-why-should-we.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;What are your hobbies? &amp;nbsp; &lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-are-your_4296.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;What is the worst feedback you have ever got?&amp;nbsp; &lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-worst.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;What is the most difficult situation you have faced? &lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;If ur given a project in some other field would u work? &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;When you're disappointed, how do you overcome it ? &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;What position would you like to have in a group ?&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Why didn't you take up GRE ?&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;What do you feel how was your technical interview?&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Why didn't you do job after B.Tech ? (MAINLY for M.Techs.)&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;If you get vast amount of money, what will you do of it ?&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Are you sceptic/enthusiastic?&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;You're pessimistic/optimistic?&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Do you want to ask anything from us?&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;If u are asked to lead a group, and u'r group does not work, what would u do..?&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;&lt;a href="http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html"&gt;Click Here&lt;/a&gt;&lt;/b&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-3373978383455926330?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/3373978383455926330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=3373978383455926330' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/3373978383455926330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/3373978383455926330'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/some-important-hr-interview-questions.html' title='Some Important HR Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-1525299410189866106</id><published>2011-06-18T04:04:00.001-07:00</published><updated>2011-06-18T04:10:45.068-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>[HR Interview Questions] What is the most difficult situation you have faced?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;What is the most difficult situation you have faced?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Here you should be ready with the real life story.&amp;nbsp; The question looks for information on two fronts: How do you define difficult? and, what was your handling of the situation? You should be able to clearly lay down the road map for solving the problem, your ability to do task management and maintain good interaction with your team members and other peers.&lt;br /&gt;&lt;br /&gt;It is advisable to close with highlighting the learning out of the incident.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;If ur given a project in some other field would u work?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Possible Ans: Yes, I would try to succeed in every task assigned to me&lt;br /&gt;&lt;br /&gt;&lt;b&gt;When you're disappointed, how do you overcome it ?&lt;br /&gt;&lt;br /&gt;What position would you like to have in a group ? &lt;br /&gt;&lt;br /&gt;Why didn't you take up GRE ?&lt;br /&gt;&lt;br /&gt;What do you feel how was your technical interview?&lt;br /&gt;&lt;br /&gt;Why didn't you do job after B.Tech ? (MAINLY for M.Techs.)&lt;br /&gt;&lt;br /&gt;If you get vast amount of money, what will you do of it ?&lt;/b&gt;&lt;br /&gt;A possible ans: After fulfilling my needs and those of my family, I do not  feel that there is any option other than saving it for future.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Are you sceptic/enthusiastic?&lt;/b&gt;&lt;br /&gt;Possible ans: I am usually enthusiastic about my success at every&lt;br /&gt;stage.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;You're pessimistic/optimistic? &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Possible ans: I do not feel that I am pessimistic, but I am not at the sametime too optimistic. I have not FALSE faith on luck, and I expect success only when I deserve that.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Do you want to ask anything from us? &amp;nbsp; &lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Possible ans: Projects going on in the company..? &lt;br /&gt;&lt;br /&gt;&lt;b&gt;If u are asked to lead a group, and u'r group does not work, what would u do..? &amp;nbsp; &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Possible ans: Actual answer from the experience...motivate that person, not necessarily as his boss. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-1525299410189866106?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/1525299410189866106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=1525299410189866106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1525299410189866106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1525299410189866106'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-most.html' title='[HR Interview Questions] What is the most difficult situation you have faced?'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-3327599255123462296</id><published>2011-06-18T04:03:00.001-07:00</published><updated>2011-06-18T04:03:49.407-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>[HR Interview Questions] What is the worst feedback you have ever got?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;What is the worst feedback you have ever got?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To answer this question you must admit and share your areas of improvement.&lt;br /&gt;&lt;br /&gt;Also sharing an action plan for improving oneself will indicate your ability to take criticism well.&lt;br /&gt;&lt;br /&gt;Your answer should be reflection of your open-mindedness. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-3327599255123462296?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/3327599255123462296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=3327599255123462296' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/3327599255123462296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/3327599255123462296'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-is-worst.html' title='[HR Interview Questions] What is the worst feedback you have ever got?'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-921262202191122851</id><published>2011-06-18T04:02:00.003-07:00</published><updated>2011-06-18T04:02:56.833-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>[HR Interview Questions] What are your hobbies?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;What are your hobbies?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This question is generally asked to assess whether you are "desktop" kind of a person or an "interaction orientated person".&lt;br /&gt;&lt;br /&gt;It also indicates your preference for team - oriented activities or projects with solo contributions.&lt;br /&gt;&lt;br /&gt;It enables the organization to place you accordingly after selection. Be candid with your answer. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-921262202191122851?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/921262202191122851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=921262202191122851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/921262202191122851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/921262202191122851'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-are-your_4296.html' title='[HR Interview Questions] What are your hobbies?'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-4365931195990097934</id><published>2011-06-18T04:02:00.001-07:00</published><updated>2011-06-18T04:02:15.968-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>[HR Interview Questions] Why should we hire you?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Why should we hire you?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Keep your answer short and to the point.&lt;br /&gt;&lt;br /&gt;You should highlight areas from your background that relates to the need of the organization.&lt;br /&gt;&lt;br /&gt;Recap the organization's description of the job,meeting it point by point with your skills. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-4365931195990097934?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/4365931195990097934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=4365931195990097934' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/4365931195990097934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/4365931195990097934'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-why-should-we.html' title='[HR Interview Questions] Why should we hire you?'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-670660818011517837</id><published>2011-06-18T04:01:00.001-07:00</published><updated>2011-06-18T04:01:35.795-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>[HR Interview Questions] What are your favorite subjects?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;What are your favorite subjects?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It is a leading question giving direction to the panel members for possible areas where they can probe in further for your knowledge base and in depth understanding.&lt;br /&gt;&lt;br /&gt;It is advisable to select the topics that you are competent in. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-670660818011517837?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/670660818011517837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=670660818011517837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/670660818011517837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/670660818011517837'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-are-your_18.html' title='[HR Interview Questions] What are your favorite subjects?'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-4364772443734388940</id><published>2011-06-18T04:00:00.001-07:00</published><updated>2011-06-18T04:00:27.687-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>[HR Interview Questions] What are your biggest accomplishments?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;What are your biggest accomplishments?&amp;nbsp; &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You may like to begin your reply with: "Although I feel my biggest achievements are still ahead of me, I am proud of my involvement withI made my contribution as part of that team and learnt a lot in the process".&lt;br /&gt;&lt;br /&gt;It will be a good idea to close your answer with also specifying what attributes and circumstances made you succeed. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-4364772443734388940?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/4364772443734388940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=4364772443734388940' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/4364772443734388940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/4364772443734388940'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-are-your.html' title='[HR Interview Questions] What are your biggest accomplishments?'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-7553073001494337884</id><published>2011-06-18T03:59:00.001-07:00</published><updated>2011-06-18T03:59:31.828-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>[HR Interview Questions] Do you prefer working with others or alone?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Do you prefer working with others or alone?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This question is usually asked to determine whether you are a team player.&lt;br /&gt;&lt;br /&gt;Before answering, however, be sure you know whether the job requires you to work alone.&lt;br /&gt;&lt;br /&gt;Then answer appropriately. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-7553073001494337884?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/7553073001494337884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=7553073001494337884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7553073001494337884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7553073001494337884'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-do-you-prefer.html' title='[HR Interview Questions] Do you prefer working with others or alone?'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-8927376831098828135</id><published>2011-06-18T03:58:00.001-07:00</published><updated>2011-06-18T03:58:44.126-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>[HR Interview Questions] What would you like to be doing five years from now?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;What would you like to be doing five years from now? &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This question is asked to assess candidates career plan and ambition for growth and to see if the company will be able to provide that opportunity over period of time.&lt;br /&gt;&lt;br /&gt;Also to assess if your personal goals are not totally off tangent with what companys objectives are.&lt;br /&gt;&lt;br /&gt;It is also to check your stability with the organization. It is good idea to be very realistic in your answer.&lt;br /&gt;&lt;br /&gt;If need be take guidance from your seniors who are already in the corporate environment. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-8927376831098828135?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/8927376831098828135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=8927376831098828135' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/8927376831098828135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/8927376831098828135'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-what-would-you.html' title='[HR Interview Questions] What would you like to be doing five years from now?'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-1417360584892926891</id><published>2011-06-18T03:57:00.000-07:00</published><updated>2011-06-18T03:57:42.169-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>[HR Interview Questions] Why do you want to join us?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: justify;"&gt;&lt;b&gt;Why do you want to join us?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To answer this question, you must have researched the company well.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Here you can quote some of your personal beliefs, which are in conjunction with the values of the company or talk about specific products and services which could be your professional interest too. &lt;br /&gt;&lt;br /&gt;In the event where your skill set is mapping with the requirement of the company, do not miss the chance to highlight the same.&amp;nbsp;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;Specify the initiatives taken or work done to attain that skill set. &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-1417360584892926891?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/1417360584892926891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=1417360584892926891' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1417360584892926891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1417360584892926891'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-why-do-you-want.html' title='[HR Interview Questions] Why do you want to join us?'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-6028597662196716443</id><published>2011-06-18T03:56:00.000-07:00</published><updated>2011-06-18T03:56:20.220-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HR Interview Questions'/><title type='text'>[HR Interview Questions] Tell us about yourself ?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Tell us about yourself ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This is an open canvas for you giving you an opportunity to direct and lead your interview in the direction you want.&lt;br /&gt;Good idea will be to structure your answer in the following three broad headings.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;1. Family Background&lt;br /&gt;&lt;br /&gt;2. Educational Background&lt;br /&gt;&lt;br /&gt;3. Achievements&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In all the above subheads speak only that information which will give strength to your candidature. Avoid verbose description of yourself. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-6028597662196716443?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/6028597662196716443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=6028597662196716443' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6028597662196716443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6028597662196716443'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/hr-interview-questions-tell-us-about.html' title='[HR Interview Questions] Tell us about yourself ?'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-2273318341172540033</id><published>2011-06-18T03:49:00.000-07:00</published><updated>2011-06-18T03:49:55.808-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cover Letter'/><title type='text'>Sample Cover Letter - II</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;[Your Name]&lt;br /&gt;[Your Address]&lt;br /&gt;[Email ID]&lt;br /&gt;[Mobile NUmber]&lt;br /&gt;&lt;br /&gt;Date: [Today's Date]&lt;br /&gt;&lt;br /&gt;With reference to your advertisement in ------- I am applying for the position of ........ I believe that my interests and credentials will match with your requirement. I have cpmpleted my [Your educational details]&lt;br /&gt;&lt;br /&gt;I am having a strong background in computer programming like [Your skills] and i believe that these skills would benefit the developing the aspects of software.&lt;br /&gt;&lt;br /&gt;I enclosed my resume with this letter, which further outlines my qualifications. My qualifications make me well suited to the projects areas in which your division of Solutions is expanding efforts.&lt;br /&gt;&lt;br /&gt;Thank you for your time and consideration.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Sincerely,&lt;br /&gt;[Your Name]&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-2273318341172540033?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/2273318341172540033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=2273318341172540033' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2273318341172540033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2273318341172540033'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/sample-cover-letter-ii.html' title='Sample Cover Letter - II'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-3497643763142537371</id><published>2011-06-18T03:45:00.000-07:00</published><updated>2011-06-18T03:45:42.328-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cover Letter'/><title type='text'>Sample Cover Letter - I</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Date: [Today's Date],&lt;br /&gt;&lt;br /&gt;Station: [Current Location]&lt;br /&gt;&lt;br /&gt;TO&lt;br /&gt;&lt;br /&gt;The HR Manager,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dear Sir / Madam,&lt;br /&gt;&lt;br /&gt;I take liberty to address this letter to your good self to introduce myself being on the lookout for a suitable career opening in your organization.&lt;br /&gt;&lt;br /&gt;I sincerely trust you will be kind enough to consider my case. I assure you full commitment and constant strive for excellence if any opportunity is given to me &amp;amp; shall put all my efforts to be worthy of the trust placed in me.&lt;br /&gt;&lt;br /&gt;I have done my Master of Computer Applications as my specialization.&lt;br /&gt;&lt;br /&gt;My resume is attached along with this letter for your kind perusal.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanking You&lt;br /&gt;&lt;br /&gt;Yours Sincerely,&lt;br /&gt;&lt;span style="color: #a2c4c9;"&gt;** your name **&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-3497643763142537371?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/3497643763142537371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=3497643763142537371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/3497643763142537371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/3497643763142537371'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2011/06/sample-cover-letter-i.html' title='Sample Cover Letter - I'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-6620553135563055182</id><published>2009-01-27T04:22:00.000-08:00</published><updated>2009-01-27T04:24:12.470-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='Assembly'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>Assembly Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;   1. How is the DLL Hell problem solved in .NET?&lt;/span&gt;&lt;br /&gt;      Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   2. What are the ways to deploy an assembly?&lt;/span&gt;&lt;br /&gt;      An MSI installer, a CAB archive, and XCOPY command.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   3. What is a satellite assembly?&lt;/span&gt;&lt;br /&gt;      When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   4. What namespaces are necessary to create a localized application?&lt;/span&gt;&lt;br /&gt;      System.Globalization and System.Resources.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   5. What is the smallest unit of execution in .NET?&lt;/span&gt;&lt;br /&gt;      an Assembly.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   6. When should you call the garbage collector in .NET?&lt;/span&gt;&lt;br /&gt;      As a good rule, you should not call the garbage collector.  However, you could call the garbage collector when you are done using a large object (or set of objects) to force the garbage collector to dispose of those very large objects from memory.  However, this is usually not a good practice.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   7. How do you convert a value-type to a reference-type?&lt;/span&gt;&lt;br /&gt;      Use Boxing.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   8. What happens in memory when you Box and Unbox a value-type?&lt;/span&gt;&lt;br /&gt;      Boxing converts a value-type to a reference-type, thus storing the object on the heap.  Unboxing converts a reference-type to a value-type, thus storing the value on the stack.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-6620553135563055182?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/6620553135563055182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=6620553135563055182' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6620553135563055182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6620553135563055182'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/assembly-questions.html' title='Assembly Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-5054477161389827248</id><published>2009-01-27T04:21:00.000-08:00</published><updated>2009-01-27T04:22:46.370-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADO.NET and Database'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>ADO.NET and Database Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;   1. What is the role of the DataReader class in ADO.NET connections?&lt;/span&gt;&lt;br /&gt;      It returns a read-only, forward-only rowset from the data source.  A DataReader provides fast access when a forward-only sequential read is needed.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;       &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   2.   What are advantages and disadvantages of Microsoft-provided data provider classes in ADO.NET?&lt;/span&gt;&lt;br /&gt;      SQLServer.NET data provider is high-speed and robust, but requires SQL Server license purchased from Microsoft. OLE-DB.NET is universal for accessing other sources, like Oracle, DB2, Microsoft Access and Informix.  OLE-DB.NET is a .NET layer on top of the OLE layer, so it’s not as fastest and efficient as SqlServer.NET.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   3. What is the wildcard character in SQL?&lt;/span&gt;&lt;br /&gt;      Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve 'La%'.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   4. Explain ACID rule of thumb for transactions.&lt;/span&gt;&lt;br /&gt;      A transaction must be:&lt;br /&gt;      1.       Atomic - it is one unit of work and does not dependent on previous and following transactions.&lt;br /&gt;      2.       Consistent - data is either committed or roll back, no “in-between” case where something has been updated and something hasn’t.&lt;br /&gt;      3.       Isolated - no transaction sees the intermediate results of the current transaction).&lt;br /&gt;      4.       Durable - the values persist if the data had been committed even if the system crashes right after.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   5. What connections does Microsoft SQL Server support?&lt;/span&gt;&lt;br /&gt;      Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and password).&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   6. Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is untrusted?&lt;/span&gt;&lt;br /&gt;      Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   7. What does the Initial Catalog parameter define in the connection string?&lt;/span&gt;&lt;br /&gt;      The database name to connect to.&lt;br /&gt;        &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   8. What does the Dispose method do with the connection object?&lt;/span&gt;&lt;br /&gt;      Deletes it from the memory.&lt;br /&gt;      To Do: answer better.  The current answer is not entirely correct.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   9. What is a pre-requisite for connection pooling?&lt;/span&gt;&lt;br /&gt;      Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings.  The connection string must be identical.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-5054477161389827248?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/5054477161389827248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=5054477161389827248' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/5054477161389827248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/5054477161389827248'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/adonet-and-database-questions.html' title='ADO.NET and Database Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-1449737436249980205</id><published>2009-01-27T04:20:00.000-08:00</published><updated>2009-01-27T04:21:18.205-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='Debugging and Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>Debugging and Testing Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;   1. What debugging tools come with the .NET SDK?&lt;/span&gt;&lt;br /&gt;      1.   CorDBG – command-line debugger.  To use CorDbg, you must compile the original C# file using the /debug switch.&lt;br /&gt;      2.   DbgCLR – graphic debugger.  Visual Studio .NET uses the DbgCLR.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   2. What does assert() method do?&lt;/span&gt;&lt;br /&gt;      In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false.  The program proceeds without any interruption if the condition is true.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   3. What's the difference between the Debug class and Trace class?&lt;/span&gt;&lt;br /&gt;      Documentation looks the same.  Use Debug class for debug builds, use Trace class for both debug and release builds.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   4. Why are there five tracing levels in System.Diagnostics.TraceSwitcher?&lt;/span&gt;&lt;br /&gt;      The tracing dumps can be quite verbose.  For applications that are constantly running you run the risk of overloading the machine and the hard drive.  Five levels range from None to Verbose, allowing you to fine-tune the tracing activities.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   5. Where is the output of TextWriterTraceListener redirected?&lt;/span&gt;&lt;br /&gt;      To the Console or a text file depending on the parameter passed to the constructor.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   6. How do you debug an ASP.NET Web application?&lt;/span&gt;&lt;br /&gt;      Attach the aspnet_wp.exe process to the DbgClr debugger.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   7. What are three test cases you should go through in unit testing?&lt;/span&gt;&lt;br /&gt;      1.       Positive test cases (correct data, correct output).&lt;br /&gt;      2.       Negative test cases (broken or missing data, proper handling).&lt;br /&gt;      3.       Exception test cases (exceptions are thrown and caught properly).&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   8. Can you change the value of a variable while debugging a C# application?&lt;/span&gt;&lt;br /&gt;      Yes.  If you are debugging via Visual Studio.NET, just go to Immediate window.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-1449737436249980205?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/1449737436249980205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=1449737436249980205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1449737436249980205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1449737436249980205'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/debugging-and-testing-questions.html' title='Debugging and Testing Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-7804099696490978964</id><published>2009-01-27T04:19:00.000-08:00</published><updated>2009-01-27T04:20:04.880-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>XML Documentation Questions</title><content type='html'>&lt;span style="font-weight: bold;"&gt;   1. Is XML case-sensitive?&lt;/span&gt;&lt;br /&gt;      Yes.&lt;br /&gt;      &lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;2. What's the difference between // comments, /* */ comments and /// comments?&lt;/span&gt;&lt;br /&gt;      Single-line comments, multi-line comments, and XML documentation comments.&lt;br /&gt;      &lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;3. How do you generate documentation from the C# file commented properly with a command-line compiler?&lt;/span&gt;&lt;br /&gt;      Compile it with the /doc switch.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-7804099696490978964?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/7804099696490978964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=7804099696490978964' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7804099696490978964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7804099696490978964'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/xml-documentation-questions.html' title='XML Documentation Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-1659302742034570469</id><published>2009-01-27T04:17:00.000-08:00</published><updated>2009-01-27T04:19:00.609-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='Events and Delegates'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>Events and Delegates Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;   1. What's a delegate?&lt;/span&gt;&lt;br /&gt;      A delegate object encapsulates a reference to a method.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   2. What's a multicast delegate?&lt;/span&gt;&lt;br /&gt;      A delegate that has multiple handlers assigned to it. &lt;br /&gt;     Each assigned handler (method) is called.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-1659302742034570469?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/1659302742034570469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=1659302742034570469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1659302742034570469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1659302742034570469'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/events-and-delegates-questions.html' title='Events and Delegates Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-6743266772110641810</id><published>2009-01-27T04:16:00.000-08:00</published><updated>2009-01-27T04:17:39.418-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='Method and Property'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>Method and Property Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;  1. What's the implicit name of the parameter that gets passed into the set method/property of a class?&lt;/span&gt;&lt;br /&gt;      Value.  The data type of the value parameter is defined by whatever data type the property is declared as.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   2. What does the keyword "virtual" declare for a method or property?&lt;/span&gt;&lt;br /&gt;      The method or property can be overridden.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   3. How is method overriding different from method overloading?&lt;/span&gt;&lt;br /&gt;      When overriding a method, you change the behavior of the method for the derived class.  Overloading a method simply involves having another method with the same name within the class.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   4. Can you declare an override method to be static if the original method is not static?&lt;/span&gt;&lt;br /&gt;      No.  The signature of the virtual method must remain the same.  (Note: Only the keyword virtual is changed to keyword override)&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   5. What are the different ways a method can be overloaded?&lt;/span&gt;&lt;br /&gt;      Different parameter data types, different number of parameters, different order of parameters.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   6. If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?&lt;/span&gt;&lt;br /&gt;      Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-6743266772110641810?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/6743266772110641810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=6743266772110641810' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6743266772110641810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6743266772110641810'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/method-and-property-questions.html' title='Method and Property Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-1449138665739429961</id><published>2009-01-27T04:14:00.000-08:00</published><updated>2009-01-27T04:16:04.963-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='Class'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>Class Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;   1. What is the syntax to inherit from a class in C#?&lt;/span&gt;&lt;br /&gt;      Place a colon and then the name of the base class.&lt;br /&gt;      Example: class MyNewClass : MyBaseClass&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   2. Can you prevent your class from being inherited by another class?&lt;/span&gt;&lt;br /&gt;      Yes.  The keyword "sealed" will prevent the class from being inherited.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   3. Can you allow a class to be inherited, but prevent the method from being over-ridden?&lt;/span&gt;&lt;br /&gt;      Yes.  Just leave the class public and make the method sealed.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   4. What's an abstract class?&lt;/span&gt;&lt;br /&gt;      A class that cannot be instantiated.  An abstract class is a class that must be inherited and have the methods overridden.  An abstract class is essentially a blueprint for a class without any implementation.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   5. When do you absolutely have to declare a class as abstract?&lt;/span&gt;&lt;br /&gt;      1. When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden.&lt;br /&gt;      2.  When at least one of the methods in the class is abstract.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   6. What is an interface class?&lt;/span&gt;&lt;br /&gt;      Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, interfaces do not provide implementation. They are implemented by classes, and defined as separate entities from classes.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   7. Why can't you specify the accessibility modifier for methods inside the interface?&lt;/span&gt;&lt;br /&gt;      They all must be public, and are therefore public by default.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   8. Can you inherit multiple interfaces?&lt;/span&gt;&lt;br /&gt;      Yes.  .NET does support multiple interfaces.&lt;br /&gt;      &lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;9. What happens if you inherit multiple interfaces and they have conflicting method names?&lt;/span&gt;&lt;br /&gt;      It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you’re okay.&lt;br /&gt;      To Do: Investigate&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  10. What's the difference between an interface and abstract class?&lt;/span&gt;&lt;br /&gt;      In an interface class, all methods are abstract - there is no implementation.  In an abstract class some methods can be concrete.  In an interface class, no accessibility modifiers are allowed.  An abstract class may have accessibility modifiers.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  11. What is the difference between a Struct and a Class?&lt;/span&gt;&lt;br /&gt;      Structs are value-type variables and are thus saved on the stack, additional overhead but faster retrieval.  Another difference is that structs cannot inherit.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-1449138665739429961?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/1449138665739429961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=1449138665739429961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1449138665739429961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1449138665739429961'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/class-questions.html' title='Class Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-6540697160095425967</id><published>2009-01-27T04:04:00.000-08:00</published><updated>2009-01-27T04:11:27.938-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>C# Interview Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;General Questions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;1. Does C# support multiple-inheritance?&lt;/span&gt;&lt;br /&gt;      No.&lt;br /&gt;      &lt;br /&gt;  &lt;span style="font-weight: bold;"&gt; 2. Who is a protected class-level variable available to?&lt;/span&gt;&lt;br /&gt;      It is available to any sub-class (a class inheriting this class).&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   3. Are private class-level variables inherited?&lt;/span&gt;&lt;br /&gt;      Yes, but they are not accessible.  Although they are not visible or accessible via the class interface, they are inherited.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   4. Describe the accessibility modifier "protected internal".&lt;/span&gt;&lt;br /&gt;      It is available to classes that are within the same assembly and derived from the specified base class.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   5. What's the top .NET class that everything is derived from?&lt;/span&gt;&lt;br /&gt;      System.Object.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   6. What does the term immutable mean?&lt;/span&gt;&lt;br /&gt;      The data value may not be changed.  Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   7. What's the difference between System.String and System.Text.StringBuilder classes?&lt;/span&gt;&lt;br /&gt;      System.String is immutable.  System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.&lt;br /&gt;      &lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;8. What's the advantage of using System.Text.StringBuilder over System.String?&lt;/span&gt;&lt;br /&gt;      StringBuilder is more efficient in cases where there is a large amount of string manipulation.  Strings are immutable, so each time a string is changed, a new instance in memory is created.&lt;br /&gt;      &lt;br /&gt; &lt;span style="font-weight: bold;"&gt;  9. Can you store multiple data types in System.Array?&lt;/span&gt;&lt;br /&gt;      No.&lt;br /&gt;      &lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;10. What's the difference between the System.Array.CopyTo() and System.Array.Clone()?&lt;/span&gt;&lt;br /&gt;      The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array.  The CopyTo() method copies the elements into another existing array.  Both perform a shallow copy.  A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array.  A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  11. How can you sort the elements of the array in descending order?&lt;/span&gt;&lt;br /&gt;      By calling Sort() and then Reverse() methods.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  12. What's the .NET collection class that allows an element to be accessed using a unique key?&lt;/span&gt;&lt;br /&gt;      HashTable.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  13. What class is underneath the SortedList class?&lt;/span&gt;&lt;br /&gt;      A sorted HashTable.&lt;br /&gt;      &lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;14. Will the finally block get executed if an exception has not occurred?­&lt;/span&gt;&lt;br /&gt;      Yes.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  15. What's the C# syntax to catch any possible exception?&lt;/span&gt;&lt;br /&gt;      A catch block that catches the exception of type System.Exception.  You can also omit the parameter data type in this case and just write catch {}.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  16. Can multiple catch blocks be executed for a single try statement?&lt;/span&gt;&lt;br /&gt;      No.  Once the proper catch block processed, control is transferred to the finally block (if there are any).&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  17. Explain the three services model commonly know as a three-tier application.&lt;/span&gt;&lt;br /&gt;      Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-6540697160095425967?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/6540697160095425967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=6540697160095425967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6540697160095425967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6540697160095425967'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/c-interview-questions.html' title='C# Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-4690582387189793379</id><published>2009-01-27T04:01:00.000-08:00</published><updated>2009-01-27T04:04:07.888-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET Remoting'/><title type='text'>.NET Remoting Interview Questions</title><content type='html'>&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Comfirm these are correct answers.  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   1. What's a Windows process?&lt;/span&gt;&lt;br /&gt;      It’s an application that’s running and had been allocated memory.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   2. What's typical about a Windows process in regards to memory allocation?&lt;/span&gt;&lt;br /&gt;      Each process is allocated its own block of available RAM space, no process can access another process’ code or data. If the process crashes, it dies alone without taking the entire OS or a bunch of other applications down.&lt;br /&gt;      &lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;3. Explain what relationship is between a Process, Application Domain, and Application?&lt;/span&gt;&lt;br /&gt;      A process is an instance of a running application. An application is an executable on the hard drive or network. There can be numerous processes launched of the same application (5 copies of Word running), but 1 process can run just 1 application.&lt;br /&gt;        &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   4. What are possible implementations of distributed applications in .NET?&lt;/span&gt;&lt;br /&gt;      .NET Remoting and ASP.NET Web Services. If we talk about the Framework Class Library, noteworthy classes are in System.Runtime.Remoting and System.Web.Services.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   5. What are the consideration in deciding to use .NET Remoting or ASP.NET Web Services?&lt;/span&gt;&lt;br /&gt;      Remoting is a more efficient communication exchange when you can control both ends of the application involved in the communication process.  Web Services provide an open-protocol-based exchange of informaion.  Web Services are best when you need to communicate with an external organization or another (non-.NET) technology.&lt;br /&gt;        &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   6. What's a proxy of the server object in .NET Remoting?&lt;/span&gt;&lt;br /&gt;      It’s a fake copy of the server object that resides on the client side and behaves as if it was the server. It handles the communication between real server object and the client object. This process is also known as marshaling.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   7. What are remotable objects in .NET Remoting?&lt;/span&gt;&lt;br /&gt;      Remotable objects are the objects that can be marshaled across the application domains. You can marshal by value, where a deep copy of the object is created and then passed to the receiver. You can also marshal by reference, where just a reference to an existing object is passed.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   8. What are channels in .NET Remoting?&lt;/span&gt;&lt;br /&gt;      Channels represent the objects that transfer the other serialized objects from one application domain to another and from one computer to another, as well as one process to another on the same box. A channel must exist before an object can be transferred.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   9. What security measures exist for .NET Remoting in System.Runtime.Remoting?&lt;/span&gt;&lt;br /&gt;      None. Security should be taken care of at the application level. Cryptography and other security techniques can be applied at application or server level.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  10. What is a formatter?&lt;/span&gt;&lt;br /&gt;      A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  11. Choosing between HTTP and TCP for protocols and Binary and SOAP for formatters, what are the trade-offs?&lt;/span&gt;&lt;br /&gt;      Binary over TCP is the most effiecient, SOAP over HTTP is the most interoperable.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  12. What's SingleCall activation mode used for?&lt;/span&gt;&lt;br /&gt;      If the server object is instantiated for responding to just one single request, the request should be made in SingleCall mode.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  13. What's Singleton activation mode?&lt;/span&gt;&lt;br /&gt;      A single object is instantiated regardless of the number of clients accessing it. Lifetime of this object is determined by lifetime lease.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  14. How do you define the lease of the object?&lt;/span&gt;&lt;br /&gt;      By implementing ILease interface when writing the class code.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  15. Can you configure a .NET Remoting object via XML file?&lt;/span&gt;&lt;br /&gt;      Yes, via machine.config and application level .config file (or web.config in ASP.NET). Application-level XML settings take precedence over machine.config.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  16. How can you automatically generate interface for the remotable object in .NET with Microsoft tools?&lt;/span&gt;&lt;br /&gt;      Use the Soapsuds tool.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-4690582387189793379?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/4690582387189793379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=4690582387189793379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/4690582387189793379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/4690582387189793379'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/net-remoting-interview-questions.html' title='.NET Remoting Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-2032866814561993607</id><published>2009-01-27T03:58:00.000-08:00</published><updated>2009-01-27T03:59:38.742-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='State Management'/><title type='text'>State Management Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;   1. What is ViewState?&lt;/span&gt;&lt;br /&gt;      ViewState allows the state of objects (serializable) to be stored in a hidden field on the page.  ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.  ViewState is used the retain the state of server-side objects between postabacks.&lt;br /&gt;    &lt;br /&gt;  &lt;span style="font-weight: bold;"&gt; 2. What is the lifespan for items stored in ViewState?&lt;/span&gt;&lt;br /&gt;      Item stored in ViewState exist for the life of the current page.  This includes postbacks (to the same page).&lt;br /&gt;    &lt;br /&gt;  &lt;span style="font-weight: bold;"&gt; 3. What does the "EnableViewState" property do?  Why would I want it on or off?&lt;/span&gt;&lt;br /&gt;      It allows the page to save the users input on a form across postbacks.  It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser.  When the page is posted back to the server the server control is recreated with the state stored in viewstate.&lt;br /&gt;    &lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;4. What are the different types of Session state management options available with ASP.NET?&lt;/span&gt;&lt;br /&gt;      ASP.NET provides In-Process and Out-of-Process state management.  In-Process stores the session in memory on the web server.  This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same web server.  Out-of-Process Session state management stores data in an external data source.  The external data source may be either a SQL Server or a State Server service.  Out-of-Process state management requires that all objects stored in session are serializable.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-2032866814561993607?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/2032866814561993607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=2032866814561993607' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2032866814561993607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2032866814561993607'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/state-management-questions.html' title='State Management Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-7090610056764254708</id><published>2009-01-27T03:55:00.000-08:00</published><updated>2009-01-27T03:58:38.274-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Service'/><title type='text'>Web Service Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;  &lt;span style="font-weight: bold;"&gt; 1. What is the transport protocol you use to call a Web service?&lt;/span&gt;&lt;br /&gt;      SOAP (Simple Object Access Protocol) is the preferred protocol.&lt;br /&gt;     &lt;br /&gt;  &lt;span style="font-weight: bold;"&gt; 2. True or False: A Web service can only be written in .NET?&lt;/span&gt;&lt;br /&gt;      False&lt;br /&gt;     &lt;br /&gt; &lt;span style="font-weight: bold;"&gt;  3. What does WSDL stand for?&lt;/span&gt;&lt;br /&gt;      Web Services Description Language.&lt;br /&gt;     &lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;4. True or False: To test a Web service you must create a Windows application or Web application to consume this service?&lt;/span&gt;&lt;br /&gt;      False, the web service comes with a test page and it provides HTTP-GET method to test.   &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-7090610056764254708?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/7090610056764254708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=7090610056764254708' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7090610056764254708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7090610056764254708'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/web-service-questions.html' title='Web Service Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-5589987971050772448</id><published>2009-01-27T03:48:00.000-08:00</published><updated>2009-01-27T03:54:18.474-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><title type='text'>ASP.NET Interview Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;1.  &lt;span style="font-weight: bold;"&gt;Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.&lt;/span&gt;&lt;br /&gt;      inetinfo.exe is theMicrosoft IIS server running, handling ASP.NET requests among other things.  When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request tothe actual worker process aspnet_wp.exe.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. What's the difference between Response. Write() andResponse.Output.Write()?&lt;/span&gt;&lt;br /&gt;      Response.Output.Write() allows you to write formatted output.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. What methods are fired during the page load?&lt;/span&gt;&lt;br /&gt;      Init() - when the page is instantiated&lt;br /&gt;      Load() - when the page is loaded into server memory&lt;br /&gt;      PreRender() - the brief moment before the page is displayed to the user as HTML&lt;br /&gt;      Unload() - when page finishes loading.&lt;br /&gt;      &lt;br /&gt;   &lt;span style="font-weight: bold;"&gt;4. When during the page processing cycle is ViewState available?&lt;/span&gt;&lt;br /&gt;      After the Init() and before the Page_Load(), or OnLoad() for a control.&lt;br /&gt;      &lt;br /&gt;  &lt;span style="font-weight: bold;"&gt; 5. What namespace does the Web page belong in the .NET Framework class hierarchy?&lt;/span&gt;&lt;br /&gt;      System.Web.UI.Page&lt;br /&gt;      &lt;br /&gt; &lt;span style="font-weight: bold;"&gt;  6. Where do you store the information about the user's locale?&lt;/span&gt;&lt;br /&gt;      System.Web.UI.Page.Culture&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   7. What's the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;      CodeBehind is relevant to Visual Studio.NET only. &lt;/span&gt;&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   8. What's a bubbled event?&lt;/span&gt;&lt;br /&gt;      When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;   9. Suppose you want a certain ASP.NET function executed on MouseOver for a certain button.  Where do you add an event handler?&lt;/span&gt;&lt;br /&gt;      Add an OnMouseOver attribute to the button.  Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();");&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  10. What data types do the RangeValidator control support?&lt;/span&gt;&lt;br /&gt;      Integer, String, and Date.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  11. Explain the differences between Server-side and Client-side code?&lt;/span&gt;&lt;br /&gt;      Server-side code executes on the server.  Client-side code executes in the client's browser.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  12. What type of code (server or client) is found in a Code-Behind class?&lt;/span&gt;&lt;br /&gt;      The answer is server-side code since code-behind is executed on the server.  However, during the code-behind's execution on the server, it can render client-side code such as JavaScript to be processed in the clients browser.  But just to be clear, code-behind executes on the server, thus making it server-side code.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  13. Should user input data validation occur server-side or client-side?  Why?&lt;/span&gt;&lt;br /&gt;      All user input data validation should occur on the server at a minimum.  Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user.&lt;br /&gt;      &lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;14. What is the difference between Server.Transfer and Response.Redirect?  Why would I choose one over the other?&lt;/span&gt;&lt;br /&gt;      Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser.  This provides a faster response with a little less overhead on the server.  Server.Transfer does not update the clients url history list or current url.  Response.Redirect is used to redirect the user's browser to another page or site.  This performas a trip back to the client where the client's browser is redirected to the new page.  The user's browser history list is updated to reflect the new address.&lt;br /&gt;      &lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;15. Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?&lt;/span&gt;&lt;br /&gt;      Valid answers are:&lt;br /&gt;      ·  A DataSet can represent an entire relational database in memory, complete with tables, relations, and views.&lt;br /&gt;      ·  A DataSet is designed to work without any continuing connection to the original data source.&lt;br /&gt;      ·  Data in a DataSet is bulk-loaded, rather than being loaded on demand.&lt;br /&gt;      ·  There's no concept of cursor types in a DataSet.&lt;br /&gt;      ·  DataSets have no current record pointer You can use For Each loops to move through the data.&lt;br /&gt;      ·  You can store many edits in a DataSet, and write them to the original data source in a single operation.&lt;br /&gt;      ·  Though the DataSet is universal, other objects in ADO.NET come in different versions for different data sources.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  16. What is the Global.asax used for?&lt;/span&gt;&lt;br /&gt;      The Global.asax (including the Global.asax.cs file) is used to implement application and session level events.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  17. What are the Application_Start and Session_Start subroutines used for?&lt;/span&gt;&lt;br /&gt;      This is where you can set the specific variables for the Application and Session objects.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  18. Can you explain what inheritance is and an example of when you might use it?&lt;/span&gt;&lt;br /&gt;      When you want to inherit (use the functionality of) another class.  Example: With a base class named Employee, a Manager class could be derived from the Employee base class.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  19. What is an assembly?&lt;/span&gt;&lt;br /&gt;      Assemblies are the building blocks of the .NET framework. Overview of assemblies from MSDN&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  20. Describe the difference between inline and code behind.&lt;/span&gt;&lt;br /&gt;      Inline code written along side the html in a page. Code-behind is code written in a separate file and referenced by the .aspx page.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  21. Explain what a diffgram is, and a good use for one?&lt;/span&gt;&lt;br /&gt;      The DiffGram is one of the two XML formats that you can use to render DataSet object contents to XML.  A good use is reading database data to an XML file to be sent to a Web Service.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  22. Whats MSIL, and why should my developers need an appreciation of it if at all?&lt;/span&gt;&lt;br /&gt;      MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL.  MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer.&lt;br /&gt;      &lt;br /&gt;  23. Which method do you invoke on the DataAdapter control to load your generated dataset with data?&lt;br /&gt;      The Fill() method.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  24. Can you edit data in the Repeater control?&lt;/span&gt;&lt;br /&gt;      No, it just reads the information from its data source.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  25. Which template must you provide, in order to display data in a Repeater control?&lt;/span&gt;&lt;br /&gt;      ItemTemplate.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  26. How can you provide an alternating color scheme in a Repeater control?&lt;/span&gt;&lt;br /&gt;      Use the AlternatingItemTemplate.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  27. What property must you set, and what method must you call in your code, in order to bind the data from a data source to the Repeater control?&lt;/span&gt;&lt;br /&gt;      You must set the DataSource property and call the DataBind method.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  28. What base class do all Web Forms inherit from?&lt;/span&gt;&lt;br /&gt;      The Page class.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  29. Name two properties common in every validation control?&lt;/span&gt;&lt;br /&gt;      ControlToValidate property and Text property.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  30. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?&lt;/span&gt;&lt;br /&gt;      DataTextField property.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  31. Which control would you use if you needed to make sure the values in two different controls matched?&lt;/span&gt;&lt;br /&gt;      CompareValidator control.&lt;br /&gt;       &lt;br /&gt;&lt;span style="font-weight: bold;"&gt;  32. How many classes can a single .NET DLL contain?&lt;/span&gt;&lt;br /&gt;      It can contain many classes.   &lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-5589987971050772448?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/5589987971050772448/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=5589987971050772448' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/5589987971050772448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/5589987971050772448'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2009/01/aspnet-interview-questions.html' title='ASP.NET Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-3717350383576570726</id><published>2008-11-04T20:21:00.000-08:00</published><updated>2008-11-04T20:25:35.434-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Testing Preparation Kit'/><title type='text'>QA, Testing Preparation Kit</title><content type='html'>&lt;ul&gt;&lt;li style="font-weight: bold; font-family: verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2008/11/test-automation-job-interview-questions.html"&gt;Test Automation Job Interview Questions&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="font-weight: bold; font-family: verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2008/11/winrunner-interview-questions.html"&gt;WinRunner Interview Questions&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="font-weight: bold; font-family: verdana;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2008/11/load-testing-interview-questions.html"&gt;Load Testing Interview Questions&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana;font-size:100%;" &gt;&lt;a style="font-weight: bold;" href="http://knowledge-page.blogspot.com/2008/11/general-interview-questions-qa-for.html"&gt;General Interview Questions QA For Testers &amp;amp; Professionals&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-3717350383576570726?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/3717350383576570726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=3717350383576570726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/3717350383576570726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/3717350383576570726'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/11/qa-testing-preparation-kit.html' title='QA, Testing Preparation Kit'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-7568400068858649767</id><published>2008-11-04T20:14:00.000-08:00</published><updated>2008-11-04T20:24:12.204-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QA'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing Preparation Kit'/><title type='text'>General Interview Questions QA For Testers &amp; Professionals</title><content type='html'>&lt;div style="text-align: justify;"&gt;1. What types of documents would you need for QA, QC, and Software Testing?&lt;br /&gt;2. What did you include in a test plan?&lt;br /&gt;3. Describe any bug you remember.&lt;br /&gt;4. What is the purpose of the software testing?&lt;br /&gt;5. What do you like (not like) in this job?&lt;br /&gt;6. What is QA (quality assurance)?&lt;br /&gt;7. What is the difference between QA and software testing?    Read the answer for this interview question   for software testers&lt;br /&gt;8. How do you scope, organize, and execute a test project?&lt;br /&gt;9. What is the role of QA in a development project?&lt;br /&gt;10. What is the role of QA in a company that produces software?&lt;br /&gt;11. Define quality for me as you understand it&lt;br /&gt;12. Describe to me the difference between validation and verification.&lt;br /&gt;13. Describe to me what you see as a process. Not a particular process, just the basics of having a process.&lt;br /&gt;14. Describe to me when you would consider employing a failure mode and effect analysis.&lt;br /&gt;15. Describe to me the Software Development Life Cycle as you would define it.&lt;br /&gt;16. What are the properties of a good requirement?&lt;br /&gt;17. How do you differentiate the roles of Quality Assurance Manager and Project Manager?&lt;br /&gt;18. Tell me about any quality efforts you have overseen or implemented. Describe some of the challenges you faced and how you overcame them.&lt;br /&gt;19. How do you deal with environments that are hostile to quality change efforts?&lt;br /&gt;20. In general, how do you see automation fitting into the overall process of testing?&lt;br /&gt;21. How do you promote the concept of phase containment and defect prevention?&lt;br /&gt;22. If you come onboard, give me a general idea of what your first overall tasks will be as far as starting a quality effort.&lt;br /&gt;23. What kinds of software testing have you done?&lt;br /&gt;24. Have you ever created a test plan?&lt;br /&gt;25. Have you ever written test cases or did you just execute those written by others?&lt;br /&gt;26. What did your base your test cases?&lt;br /&gt;27. How do you determine what to test?&lt;br /&gt;28. How do you decide when you have 'tested enough?'&lt;br /&gt;29. How do you test if you have minimal or no documentation about the product?&lt;br /&gt;30. Describe me to the basic elements you put in a defect report?&lt;br /&gt;31. How do you perform regression testing of software?&lt;br /&gt;32. At what stage of the life cycle does testing begin in your opinion?&lt;br /&gt;33. How do you analyze your test results? What metrics do you try to provide?&lt;br /&gt;34. Realising you won't be able to test everything - how do you decide what to test first?&lt;br /&gt;35. Where do you get your expected results?&lt;br /&gt;36. If automating - what is your process for determining what to automate and in what order?&lt;br /&gt;37. In the past, I have been asked to verbally start mapping out a test plan for a common situation, such as an ATM. The interviewer might say, "Just thinking out loud, if you were tasked to test an ATM, what items might you test plan include?" These type questions are not meant to be answered conclusively, but it is a good way for the interviewer to see how you approach the task.&lt;br /&gt;38. If you're given a program that will average student grades, what kinds of inputs would you use?&lt;br /&gt;39. Tell me about the best bug you ever found.&lt;br /&gt;40. What made you pick software testing over another career?&lt;br /&gt;41. What is the exact difference between Integration &amp;amp; System testing, give me examples with your project.&lt;br /&gt;42. How did you go about software testing a project?&lt;br /&gt;43. When should software testing start in a project? Why?&lt;br /&gt;44. How do you go about testing a web application?&lt;br /&gt;45. Difference between Black &amp;amp; White box software testing&lt;br /&gt;46. What is Configuration management? Tools used?&lt;br /&gt;47. What do you plan to become after say 2-5yrs (Ex: QA Manager, Why?)&lt;br /&gt;48. Would you like to work in a team or alone, why?&lt;br /&gt;49. Give me 5 strong &amp;amp; weak points of yours&lt;br /&gt;50. Why do you want to join our company?&lt;br /&gt;51. When should software testing be stopped?&lt;br /&gt;52. What sort of things would you put down in a bug report?&lt;br /&gt;53. Who in the company is responsible for Quality?&lt;br /&gt;54. Who defines quality?&lt;br /&gt;55. What is an equivalence class?&lt;br /&gt;56. Is a "A fast database retrieval rate" a testable requirement?&lt;br /&gt;57. Should we test every possible combination/scenario for a program?&lt;br /&gt;58. What criteria do you use when determining when to automate a test or leave it manual?&lt;br /&gt;59. When do you start developing your automation tests?&lt;br /&gt;60. Discuss what test metrics you feel are important to publish an organization?&lt;br /&gt;61. In case anybody cares, here are the questions that I will be asking:&lt;br /&gt;62. Describe the role that QA plays in the software lifecycle.&lt;br /&gt;63. What should Development require of QA?&lt;br /&gt;64. What should QA require of Development?&lt;br /&gt;65. How would you define a "bug?"&lt;br /&gt;66. Give me an example of the best and worst experiences you've had with QA.&lt;br /&gt;67. How does unit testing play a role in the development / software lifecycle?&lt;br /&gt;68. Explain some techniques for developing software components with respect to testability.&lt;br /&gt;69. Describe a past experience with implementing a test harness in the development of software.&lt;br /&gt;70. Have you ever worked with QA in developing test tools? Explain the participation Development should have with QA in leveraging such test tools for QA use.&lt;br /&gt;71. Give me some examples of how you have participated in Integration Testing.&lt;br /&gt;72. How would you describe the involvement you have had with the bug-fix cycle between Development and QA?&lt;br /&gt;72. What is unit testing?&lt;br /&gt;73. Describe your personal software development process.&lt;br /&gt;74. How do you know when your code has met specifications?&lt;br /&gt;75. How do you know your code has met specifications when there are no specifications?&lt;br /&gt;76. Describe your experiences with code analyzers.&lt;br /&gt;77. How do you feel about cyclomatic complexity?&lt;br /&gt;78. Who should test your code?&lt;br /&gt;79.How do you survive chaos?&lt;br /&gt;80. What processes/methodologies are you familiar with?&lt;br /&gt;81. What type of documents would you need for QA/QC/Software Testing?&lt;br /&gt;82. How can you use technology to solve problem?&lt;br /&gt;83. What type of metrics would you use?&lt;br /&gt;84. How to find that tools work well with your existing system?&lt;br /&gt;85. What automated tools are you familiar with?&lt;br /&gt;86. How well you work with a team?&lt;br /&gt;87. How would you ensure 100% coverage during software testing?&lt;br /&gt;88. How would you build a test team?&lt;br /&gt;89. What problem you have right now or in the past? How you solved it?&lt;br /&gt;90. What you will do during the first day of job?&lt;br /&gt;91. What would you like to do five years from now?&lt;br /&gt;92. Tell me about the worst boss you've ever had.&lt;br /&gt;93. What are your greatest weaknesses?&lt;br /&gt;94. What are your strengths?&lt;br /&gt;95. What is a successful product?&lt;br /&gt;96. What do you like about Windows?&lt;br /&gt;97. What is good code?&lt;br /&gt;98. Who is Kent Beck, Dr Grace Hopper, Dennis Ritchie?&lt;br /&gt;99. What are basic, core, practises for a QA specialist?&lt;br /&gt;100. What do you like about QA?&lt;br /&gt;101. What has not worked well in your previous QA experience and what would you change?&lt;br /&gt;102. How you will begin to improve the QA process?&lt;br /&gt;103. What is the difference between QA and QC?&lt;br /&gt;104. What is UML and how to use it for software testing?&lt;br /&gt;105. What is CMM and CMMI? What is the difference?&lt;br /&gt;106. What do you like about computers?&lt;br /&gt;107. Do you have a favourite QA book? More than one? Which ones? And why.&lt;br /&gt;108. What is the responsibility of programmers vs QA?&lt;br /&gt;109.What are the properties of a good requirement?&lt;br /&gt;110.Ho to do test if we have minimal or no documentation about the product?&lt;br /&gt;111.What are all the basic elements in a defect report?&lt;br /&gt;112.Is an "A fast database retrieval rate" a testable requirement?&lt;br /&gt;113.Why should you care about objects and object-oriented testing?&lt;br /&gt;114. What does 100% statement coverage mean?&lt;br /&gt;115. How do you perform configuration management with typical revision control systems?&lt;br /&gt;116. What is code coverage?&lt;br /&gt;117. What types of code coverage do you know?&lt;br /&gt;118. What tools can be used for code coverage analysis?&lt;br /&gt;119. Is any graph is used for code coverage analysis?&lt;br /&gt;120. At what stage of the development cycle software errors are least costly to correct?&lt;br /&gt;121. What can you tell about the project if during testing you found 80 bugs in it?&lt;br /&gt;122. How to monitor test progress?&lt;br /&gt;123. Describe a few reasons that a bug might not be fixed.&lt;br /&gt;124. What are the possible states of software bugs life cycle?&lt;br /&gt;125. What books about QA (software testing) did you read?&lt;br /&gt;126. What type of testing based specifically on a program code?&lt;br /&gt;127. What type of testing based on any document that describes the "structure of the software"?&lt;br /&gt;128. Please describe test design techniques like: state-transition diagrams, decision tables, activity diagrams.&lt;br /&gt;129. Describe business process testing and what test design technique would you use for it?&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-7568400068858649767?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/7568400068858649767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=7568400068858649767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7568400068858649767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7568400068858649767'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/11/general-interview-questions-qa-for.html' title='General Interview Questions QA For Testers &amp; Professionals'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-2698013127649139686</id><published>2008-11-04T20:12:00.000-08:00</published><updated>2008-11-04T20:23:54.346-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QA'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing Preparation Kit'/><title type='text'>Load Testing Interview Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;1.  What criteria would you use to select Web transactions for load testing?&lt;br /&gt;2.  For what purpose are virtual users created?&lt;br /&gt;3.  Why it is recommended to add verification checks to your  all your scenarios?&lt;br /&gt;4.  In what situation would you want to parameterize a text verification check?&lt;br /&gt;5.  Why do you need to parameterize fields in your virtual user script?&lt;br /&gt;6.  What are the reasons why parameterization is necessary when  load testing  the Web server and the database server?&lt;br /&gt;7.  How can data caching have a negative effect on load testing results?&lt;br /&gt;8.  What usually indicates that your virtual user script has  dynamic data that is dependent on you parameterized fields?&lt;br /&gt;9.  What are the benefits of creating multiple actions within any virtual user script?&lt;br /&gt;10. What is a Load Test Results Summary Report?&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-2698013127649139686?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/2698013127649139686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=2698013127649139686' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2698013127649139686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2698013127649139686'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/11/load-testing-interview-questions.html' title='Load Testing Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-3239144965621370522</id><published>2008-11-04T20:11:00.001-08:00</published><updated>2008-11-04T20:23:19.939-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QA'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing Preparation Kit'/><title type='text'>WinRunner Interview Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;1. Give one line answer about WinRunner?&lt;br /&gt;2. How do you define WinRunner on your own?&lt;br /&gt;3. WinRunner is suitable for which type of applications?&lt;br /&gt;4. What are all the types of applications WinRunner can use?&lt;br /&gt;5. What's the WinRunner version number you used for your applications?&lt;br /&gt;6. What are all the different types of recordings available in WinRunner?&lt;br /&gt;7. When do you go for Context Sensitive and Analog recordings? What's the difference between them?&lt;br /&gt;8. What are all the Limitations &amp;amp; Advantages of WinRunner?&lt;br /&gt;9. Where you find that you can't use WinRunner for automation?&lt;br /&gt;10. What's the types application you working on using WinRunner?&lt;br /&gt;11. What's your comfort level in using WinRunner?&lt;br /&gt;12. What is meant by Synchronization? How do you implement it in WinRunner?&lt;br /&gt;13. What is meant by Check points? Types of Check points? In what situation will you use it?&lt;br /&gt;14. What are all the different platforms that WinRunner can be used?&lt;br /&gt;15. Any knowledge of Test Director?&lt;br /&gt;16. Difference between WinRunner and Test Director?&lt;br /&gt;17. What databases can Test Director reside on?&lt;br /&gt;18. Explain the project tree in Test Director.&lt;br /&gt;19. Advantages of WinRunner over other market tools silk, robot etc.?&lt;br /&gt;20. How does Winrunner identify GUI Objects?&lt;br /&gt;21. What's the use of GUI Map Editor?&lt;br /&gt;22. Winrunner GUI map modes?&lt;br /&gt;23. What are the two GUI Map modes available in WinRunner?&lt;br /&gt;24. What is the use of rapid test script wizard?&lt;br /&gt;25. How will you synchronize tests using WinRunner? When should you synchronize? Synchronize settings?&lt;br /&gt;26. How do you check GUI objects?&lt;br /&gt;27. How do you check a bitmap?&lt;br /&gt;28. What is meant by GUI Spy?&lt;br /&gt;29. Besides Record and Replay what else can be done using WinRunner?&lt;br /&gt;30. What are different types of running a test?&lt;br /&gt;31. When do you use Verify/Debug/Update Modes?&lt;br /&gt;32 When do you use Break Points?&lt;br /&gt;33. What is Toggle Break Points? How it differ from Break points?&lt;br /&gt;34. What's Step and Step into?&lt;br /&gt;35. What's the role of GUI Map Editor? (Its connects logical name in the script to the physical attributes of the object in the GUI Map Editor).&lt;br /&gt;36. What is meant by Function Generator? (F7).&lt;br /&gt;37. How do you load GUI Map Editor?&lt;br /&gt;38. What is injector in load runner?&lt;br /&gt;39. What is TSL? What 4GL is it similar too?&lt;br /&gt;40. How do you program tests with TSL?&lt;br /&gt;41. How do you invoke an application using TSL?&lt;br /&gt;42. What is Module? What's Compiled Module?&lt;br /&gt;43. Explain data parameterization in WinRunner.&lt;br /&gt;44. What is User Define Functions? What are all the different types of User&lt;br /&gt;45. What is Function? Types of Functions?&lt;br /&gt;46. Defined Functions available in WinRunner?&lt;br /&gt;47. Name a couple of standard web function found in the function generator? And explain their purpose.&lt;br /&gt;48. Where do you use Private/Public function in your script?&lt;br /&gt;49. How do you forcibly capture an Object using WinRunner (when WinRunner not able identify it)?&lt;br /&gt;50. Can you test DB using WinRunner?&lt;br /&gt;51. What are all the different DB that WinRunner can support?&lt;br /&gt;52. How do you set a Query to get/fetch data from the DB?&lt;br /&gt;53. How TSL looks like?&lt;br /&gt;54. What are all the default codes WinRunner will generates when you start an application?&lt;br /&gt;55. What are the other codes you can write/call with in TSL? 56. What are all the different languages can be called using TSL in between the scripts?&lt;br /&gt;57. How do you handle an Exception in WinRunner?&lt;br /&gt;58. Types of Exception available in WinRunner?&lt;br /&gt;59. How do you define an Exception for complete application or for a particular function?&lt;br /&gt;60. How do you run tests on a new version of WinRunner?&lt;br /&gt;61. What are data driven tests &amp;amp; How Do you create it in WinRunner?&lt;br /&gt;62. What's the File Format used in Data Table?&lt;br /&gt;63. How do you link a Data Table in your script?&lt;br /&gt;64. How do you read text from an application?&lt;br /&gt;65. What is a batch test? How do you program a batch test?&lt;br /&gt;66. What happens when user interface changes?&lt;br /&gt;67. Does load testing possible using WinRunner?&lt;br /&gt;68. Does WinRunner help you in web testing?&lt;br /&gt;69. How do you manage test data, test result?&lt;br /&gt;70. Questions on TSL: How to generate Functions?&lt;br /&gt;71. Running tests from the command line?&lt;br /&gt;72. Explain WinRunner Testing Modes?&lt;br /&gt;73. Have you completed the CPS exam? Which one?&lt;br /&gt;74. Write a short compiled module which selects random numbers; and what function is used to call your customized compiled module?&lt;br /&gt;75. What's the purpose of the wrun.ini file?&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-3239144965621370522?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/3239144965621370522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=3239144965621370522' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/3239144965621370522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/3239144965621370522'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/11/winrunner-interview-questions.html' title='WinRunner Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-8207498368803137939</id><published>2008-11-04T19:40:00.000-08:00</published><updated>2008-11-04T20:22:42.487-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QA'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Testing Preparation Kit'/><title type='text'>Test Automation Job Interview Questions</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;1. What automating testing tools are you familiar with?&lt;br /&gt;2. How did you use automating testing tools in your job?&lt;br /&gt;3. Describe some problem that you had with automating testing tool.&lt;br /&gt;4. How do you plan test automation?&lt;br /&gt;5. Can test automation improve test effectiveness?&lt;br /&gt;6. What is data - driven automation?&lt;br /&gt;7. What are the main attributes of test automation?&lt;br /&gt;8. Does automation replace manual testing?&lt;br /&gt;9. How will you choose a tool for test automation?&lt;br /&gt;10. How you will evaluate the tool for test automation?&lt;br /&gt;11. What are main benefits of test automation?&lt;br /&gt;12. What could go wrong with test automation?&lt;br /&gt;13. How you will describe testing activities?&lt;br /&gt;14. What testing activities you may want to automate?&lt;br /&gt;15. Describe common problems of test automation.&lt;br /&gt;16. What types of scripting techniques for test automation do you know?&lt;br /&gt;17. What are principles of good testing scripts for automation?&lt;br /&gt;18. What tools are available for support of testing during software development life cycle?&lt;br /&gt;19. Can the activities of test case design be automated?&lt;br /&gt;20. What are the limitations of automating software testing?&lt;br /&gt;21. What skills needed to be a good software test automator?&lt;br /&gt;22. How to find that tools work well with your existing system?&lt;br /&gt;23. Describe some problem that you had with automating testing tool.&lt;br /&gt;24. What are the main attributes of test automation?&lt;br /&gt;25. What testing activities you may want to automate in a project?&lt;br /&gt;26. How to find that tools work well with your existing system?&lt;br /&gt;27. What are some of the common misconceptions during implementation of an automated testing tools for the first time?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-8207498368803137939?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/8207498368803137939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=8207498368803137939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/8207498368803137939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/8207498368803137939'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/11/test-automation-job-interview-questions.html' title='Test Automation Job Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-1814859582525352800</id><published>2008-11-01T03:24:00.000-07:00</published><updated>2008-11-01T03:29:10.851-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Preparation Kit'/><title type='text'>JAVA Preparation Kit</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;a href="http://knowledge-page.blogspot.com/2008/04/frequently-asked-questions-in-java.html"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold; font-family: verdana;"&gt;Frequently Asked Questions In JAVA&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://knowledge-page.blogspot.com/2008/04/frequently-asked-questions-in-java.html"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold; font-family: verdana;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:100%;" &gt;&lt;a href="http://knowledge-page.blogspot.com/2008/04/important-interview-questions-on-java.html"&gt;Important Interview Questions on Java&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:100%;" &gt;&lt;a href="http://knowledge-page.blogspot.com/2008/04/java-interview-q-1-30.html"&gt;Java Interview Q &amp;amp; A [ Part - I ]&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana;font-size:100%;" &gt;&lt;a style="font-weight: bold;" href="http://knowledge-page.blogspot.com/2008/04/java-interview-q-31-60.html"&gt;Java Interview Q &amp;amp; A [ Part - II ]&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family: verdana;font-size:100%;" &gt;&lt;a style="font-weight: bold;" href="http://knowledge-page.blogspot.com/2008/04/java-interview-q-61-90.html"&gt;Java Interview Q &amp;amp; A [ Part - III ]&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:100%;" &gt;&lt;a href="http://knowledge-page.blogspot.com/2008/04/java-interview-q-part-iv.html"&gt;Java Interview Q &amp;amp; A [ Part - IV ]&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a style="font-weight: bold; font-family: verdana;" href="http://knowledge-page.blogspot.com/2008/04/core-java-interview-questions.html"&gt;Core Java Interview Questions&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-1814859582525352800?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/1814859582525352800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=1814859582525352800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1814859582525352800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1814859582525352800'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/11/java-preparation-kit.html' title='JAVA Preparation Kit'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-1080248242418461181</id><published>2008-11-01T03:20:00.000-07:00</published><updated>2009-01-27T04:24:50.823-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Preparation Kit'/><title type='text'>.NET Preparation Kit</title><content type='html'>&lt;ul  style="font-weight: bold;font-family:verdana;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2008/04/net-interview-questions-answers.html"&gt;.NET Interview Questions &amp;amp; Answers&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/web-service-questions.html"&gt;ASP.NET Interview Questions&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/web-service-questions.html"&gt;Web Service Questions&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/web-service-questions.html"&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/state-management-questions.html"&gt;State Management Questions&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/net-remoting-interview-questions.html"&gt;.NET Remoting Interview Questions&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/state-management-questions.html"&gt;&lt;span style="font-size:100%;"&gt;C# Interview Questions&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/class-questions.html"&gt;Class Questions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/method-and-property-questions.html"&gt;Method and Property Questions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/events-and-delegates-questions.html"&gt;Events and Delegates Questions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/xml-documentation-questions.html"&gt;XML Documentation Questions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/debugging-and-testing-questions.html"&gt;Debugging and Testing Questions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/adonet-and-database-questions.html"&gt;ADO.NET and Database Questions&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://knowledge-page.blogspot.com/2009/01/assembly-questions.html"&gt;Assembly Questions&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-1080248242418461181?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/1080248242418461181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=1080248242418461181' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1080248242418461181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1080248242418461181'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/11/net-preparation-kit_01.html' title='.NET Preparation Kit'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-7753721777166794790</id><published>2008-11-01T02:53:00.000-07:00</published><updated>2008-11-01T03:01:02.253-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>C &amp; C++ Preparation Kit</title><content type='html'>&lt;ul  style="font-family:verdana;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2008/04/c-interview-questions.html"&gt;&lt;span style="font-weight: bold;"&gt;C Interview Questions&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2008/04/cc-interview-questions.html"&gt;&lt;span style="font-weight: bold;"&gt;C/C++ Interview Questions&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2008/04/c-aptitude-questions-and-answers.html"&gt;&lt;span style="font-weight: bold;"&gt;C Aptitude Questions and Answers&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-7753721777166794790?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/7753721777166794790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=7753721777166794790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7753721777166794790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7753721777166794790'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/11/c-c-preparation-kit.html' title='C &amp; C++ Preparation Kit'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-2030986791408570633</id><published>2008-11-01T02:49:00.000-07:00</published><updated>2008-11-01T02:59:54.200-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='J2EE Preparation Kit'/><title type='text'>J2EE Preparation Kit</title><content type='html'>&lt;ul style="font-family: verdana;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a style="font-weight: bold;" href="http://knowledge-page.blogspot.com/2008/04/j2ee-interview-questions.html"&gt;J2EE Interview Questions&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://knowledge-page.blogspot.com/2008/04/ejb-interview-questions.html"&gt;&lt;span style="font-weight: bold;"&gt;EJB Interview Questions&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-2030986791408570633?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/2030986791408570633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=2030986791408570633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2030986791408570633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2030986791408570633'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/11/j2ee-preparation-kit.html' title='J2EE Preparation Kit'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-1859355732214375214</id><published>2008-04-20T02:42:00.000-07:00</published><updated>2008-04-20T02:57:37.991-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET  Preparation Kit'/><title type='text'>.NET  Interview Questions &amp; Answers</title><content type='html'>&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an application server?&lt;/span&gt;&lt;br /&gt;As defined in Wikipedia, an application server is a software engine that delivers applications to client computers or devices. The application server runs your server code. Some well known application servers are IIS (Microsoft), WebLogic Server (BEA), JBoss (Red Hat), WebSphere (IBM).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Compare C# and VB.NET&lt;/span&gt;&lt;br /&gt;A detailed comparison can be found over here.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a base class and derived class?&lt;/span&gt;&lt;br /&gt;A class is a template for creating an object. The class from which other classes derive fundamental functionality is called a base class. For e.g. If Class Y derives from Class X, then Class X is a base class.&lt;br /&gt;&lt;br /&gt;The class which derives functionality from a base class is called a derived class. If Class Y derives from Class X, then Class Y is a derived class.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an extender class?&lt;/span&gt;&lt;br /&gt;An extender class allows you to extend the functionality of an existing control. It is used in Windows forms applications to add properties to controls.&lt;br /&gt;&lt;br /&gt;A demonstration of extender classes can be found over here.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is inheritance?&lt;/span&gt;&lt;br /&gt;Inheritance represents the relationship between two classes where one type derives functionality from a second type and then extends it by adding new methods, properties, events, fields and constants.&lt;br /&gt;&lt;br /&gt;C# support two types of inheritance:&lt;br /&gt;·         Implementation inheritance&lt;br /&gt;·         Interface inheritance&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is implementation and interface inheritance?&lt;/span&gt;&lt;br /&gt;When a class (type) is derived from another class(type) such that it inherits all the members of the base type it is Implementation Inheritance.&lt;br /&gt;&lt;br /&gt;When a type (class or a struct) inherits only the signatures of the functions from another type it is Interface Inheritance.&lt;br /&gt;&lt;br /&gt;In general Classes can be derived from another class, hence support Implementation inheritance. At the same time Classes can also be derived from one or more interfaces. Hence they support Interface inheritance.&lt;br /&gt;Source: Exforsys.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is inheritance hierarchy?&lt;/span&gt;&lt;br /&gt;The class which derives functionality from a base class is called a derived class. A derived class can also act as a base class for another class. Thus it is possible to create a tree-like structure that illustrates the relationship between all related classes. This structure is known as the inheritance hierarchy.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do you prevent a class from being inherited?&lt;/span&gt;&lt;br /&gt;In VB.NET you use the NotInheritable modifier to prevent programmers from using the class as a base class. In C#, use the sealed keyword.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;When should you use inheritance?&lt;/span&gt;&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/27db6csx%28VS.80%29.aspx#Mtps_DropDownFilterText"&gt;Read this&lt;/a&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/27db6csx%28VS.80%29.aspx#Mtps_DropDownFilterText"&gt;.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Define Overriding?&lt;/span&gt;&lt;br /&gt;Overriding is a concept where a method in a derived class uses the same name, return type, and arguments as a method in its base class. In other words, if the derived class contains its own implementation of the method rather than using the method in the base class, the process is called overriding.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Can you use multiple inheritance in .NET?&lt;/span&gt;&lt;br /&gt;.NET supports only single inheritance. However the purpose is accomplished using multiple interfaces.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why don’t we have multiple inheritance in .NET?&lt;/span&gt;&lt;br /&gt;There are several reasons for this. In simple words, the efforts are more, benefits are less. Different languages have different implementation requirements of multiple inheritance. So in order to implement multiple inheritance, we need to study the implementation aspects of all the languages that are CLR compliant and then implement a common methodology of implementing it. This is too much of efforts. Moreover multiple interface inheritance very much covers the benefits that multiple inheritance has.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an Interface?&lt;/span&gt;&lt;br /&gt;An interface is a standard or contract that contains only the signatures of methods or events. The implementation is done in the class that inherits from this interface. Interfaces are primarily used to set a common standard or contract.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;When should you use abstract class vs interface or What is the difference between an abstract class and interface?&lt;/span&gt;&lt;br /&gt;I would suggest you to &lt;a href="http://msdn2.microsoft.com/en-us/library/scsyfw1d%28VS.71%29.aspx"&gt;read this&lt;/a&gt;. There is a good comparison given over &lt;a href="http://en.csharp-online.net/Should_I_use_an_abstract_class_or_an_interface%3F"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are events and delegates?&lt;/span&gt;&lt;br /&gt;An event is a message sent by a control to notify the occurrence of an action. However it is not known which object receives the event. For this reason, .NET provides a special type called Delegate which acts as an intermediary between the sender object and receiver object.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is business logic?&lt;/span&gt;&lt;br /&gt;It is the functionality which handles the exchange of information between database and a user interface.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a component?&lt;/span&gt;&lt;br /&gt;Component is a group of logically related classes and methods. A component is a class that implements the IComponent interface or uses a class that implements IComponent interface.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a control?&lt;/span&gt;&lt;br /&gt;A control is a component that provides user-interface (UI) capabilities.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the differences between a control and a component?&lt;/span&gt;&lt;br /&gt;The differences can be studied over &lt;a href="http://msdn2.microsoft.com/en-us/library/0b1dk63b%28vs.80%29.aspx"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are design patterns?&lt;/span&gt;&lt;br /&gt;Design patterns are common solutions to common design problems.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a connection pool?&lt;/span&gt;&lt;br /&gt;A connection pool is a ‘collection of connections’ which are shared between the clients requesting one. Once the connection is closed, it returns back to the pool. This allows the connections to be reused.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a flat file?&lt;/span&gt;&lt;br /&gt;A flat file is the name given to text, which can be read or written only sequentially.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are functional and non-functional requirements?&lt;/span&gt;&lt;br /&gt;Functional requirements defines the behavior of a system whereas non-functional requirements specify how the system should behave; in other words they specify the quality requirements and judge the behavior of a system.&lt;br /&gt;E.g.&lt;br /&gt;Functional - Display a chart which shows the maximum number of products sold in a region.&lt;br /&gt;Non-functional – The data presented in the chart must be updated every 5 minutes.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the global assembly cache (GAC)?&lt;/span&gt;&lt;br /&gt;GAC is a machine-wide cache of assemblies that allows .NET applications to share libraries. GAC solves some of the problems associated with dll’s (DLL Hell).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a stack? What is a heap? Give the differences between the two?&lt;/span&gt;&lt;br /&gt;Stack is a place in the memory where value types are stored. Heap is a place in the memory where the reference types are stored.   Check &lt;a href="http://www.c-sharpcorner.com/UploadFile/rmcochran/csharp_memory01122006130034PM/csharp_memory.aspx?ArticleID=9adb0e3c-b3f6-40b5-98b5-413b6d348b91"&gt;this link&lt;/a&gt; for the differences.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is instrumentation?&lt;/span&gt;&lt;br /&gt;It is the ability to monitor an application so that information about the application’s progress, performance and status can be captured and reported.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is code review?&lt;/span&gt;&lt;br /&gt;The process of  examining the source code generally through a peer, to verify it against best practices.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is logging?&lt;/span&gt;&lt;br /&gt;Logging is the process of persisting information about the status of an application.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are mock-ups?&lt;/span&gt;&lt;br /&gt;Mock-ups are a set of designs in the form of screens, diagrams, snapshots etc., that helps verify the design and acquire feedback about the application’s requirements and use cases, at an early stage of the design process.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a Form?&lt;/span&gt;&lt;br /&gt;A form is a representation of any window displayed in your application. Form can be used to create standard, borderless, floating, modal windows.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a multiple-document interface(MDI)?&lt;/span&gt;&lt;br /&gt;A user interface container that enables a user to work with more than one document at a time. E.g. Microsoft Excel.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a single-document interface (SDI) ?&lt;/span&gt;&lt;br /&gt;A user interface that is created to manage graphical user interfaces and controls into single windows. E.g. Microsoft Word&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is BLOB ?&lt;/span&gt;&lt;br /&gt;A BLOB (binary large object) is a large item such as an image or an exe  represented in binary form.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is ClickOnce?&lt;/span&gt;&lt;br /&gt;ClickOnce is a new deployment technology that allows you to create and publish self-updating applications that can be installed and run with minimal user interaction.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is object role modeling (ORM) ?&lt;/span&gt;&lt;br /&gt;It is a logical model for designing and querying database models. There are various ORM tools in the market like CaseTalk, Microsoft Visio for Enterprise Architects, Infagon etc.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a private assembly?&lt;/span&gt;&lt;br /&gt;A private assembly is local to the installation directory of an application and is used only by that application.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a shared assembly?&lt;/span&gt;&lt;br /&gt;A shared assembly is kept in the global assembly cache (GAC) and can be used by one or more applications on a machine.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between user and custom controls?&lt;/span&gt;&lt;br /&gt;User controls are easier to create whereas custom controls require extra effort.&lt;br /&gt;User controls are used when the layout is static whereas custom controls are used in dynamic layouts.&lt;br /&gt;A user control cannot be added to the toolbox whereas a custom control can be.&lt;br /&gt;A separate copy of a user control is required in every application that uses it whereas since custom controls are stored in the GAC, only a single copy can be used by all applications.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Where do custom controls reside?&lt;/span&gt;&lt;br /&gt;In the global assembly cache (GAC).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a third-party control ?&lt;/span&gt;&lt;br /&gt;A third-party control is one that is not created by the owners of a project. They are usually used to save time and resources and reuse the functionality developed by others (third-party).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a binary formatter?&lt;/span&gt;&lt;br /&gt;Binary formatter is used to serialize and deserialize an object in binary format.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is Boxing/Unboxing?&lt;/span&gt;&lt;br /&gt;Boxing is used to convert value types to object.&lt;br /&gt;E.g. int x = 1;&lt;br /&gt;object obj = x ;&lt;br /&gt;Unboxing is used to convert the object back to the value type.&lt;br /&gt;E.g. int y = (int)obj;&lt;br /&gt;Boxing/unboxing is quiet an expensive operation.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a COM Callable Wrapper (CCW)?&lt;/span&gt;&lt;br /&gt;CCW is a wrapper created by the common language runtime(CLR) that enables COM components to access .NET objects.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;What is a Runtime Callable Wrapper (RCW)?&lt;/span&gt;&lt;br /&gt;RCW is a wrapper created by the common language runtime(CLR) to enable .NET components to call COM components.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a digital signature?&lt;/span&gt;&lt;br /&gt;A digital signature is an electronic signature used to verify/gurantee the identity of the individual who is sending the message.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is garbage collection?&lt;/span&gt;&lt;br /&gt;Garbage collection is the process of managing the allocation and release of memory in your applications.  Read &lt;a href="http://msdn2.microsoft.com/en-us/library/0xy59wtx%28vs.80%29.aspx"&gt;this article&lt;/a&gt; for more information.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is globalization?&lt;/span&gt;&lt;br /&gt;Globalization is the process of customizing applications that support multiple cultures and regions.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is localization?&lt;/span&gt;&lt;br /&gt;Localization is the process of customizing applications that support a given culture and regions.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-1859355732214375214?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/1859355732214375214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=1859355732214375214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1859355732214375214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1859355732214375214'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/net-interview-questions-answers.html' title='.NET  Interview Questions &amp; Answers'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-6844798026623046116</id><published>2008-04-20T02:28:00.000-07:00</published><updated>2008-04-20T02:34:47.783-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Preparation Kit'/><title type='text'>Java Interview Q &amp; A [ Part - IV ]</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is connection pooling?&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;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.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why should we go for interservlet communication?&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;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)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Is it possible to call servlet with parameters in the URL?&lt;/span&gt;&lt;br /&gt;Yes. You can call a servlet with parameters in the syntax as (?Param1 = xxx || m2 = yyy).&lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is Servlet chaining?&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;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.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do servlets handle multiple simultaneous requests?&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;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.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between TCP/IP and UDP?&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;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.&lt;br /&gt;&lt;/div&gt;      &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is Inet address?&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;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.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;What is Domain Naming Service(DNS)?&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;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.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is URL?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt; &lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;What is RMI and steps involved in developing an RMI object?&lt;/span&gt;&lt;br /&gt;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&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is RMI architecture?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is UnicastRemoteObject?&lt;/span&gt;&lt;br /&gt;All remote objects must extend UnicastRemoteObject, which provides functionality that is needed to make objects available from remote machines.&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Explain the methods, rebind() and lookup() in Naming class?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a Java Bean?&lt;/span&gt;&lt;br /&gt;A Java Bean is a software component that has been designed to be reusable in a variety of different environments.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a Jar file?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is BDK?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is JSP?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are JSP scripting elements?&lt;/span&gt;&lt;br /&gt;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 &lt;%= expression %&gt; that are evaluated and inserted into the output, b) Scriptlets of the form&lt;% code %&gt;that are inserted into the servlet’s service method, and c) Declarations of the form &lt;%! Code %&gt;that are inserted into the body of the servlet class, outside of any existing methods.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are JSP Directives?&lt;/span&gt;&lt;br /&gt;A JSP directive affects the overall structure of the servlet class. It usually has the following form:&lt;%@ directive attribute=”value” %&gt; However, you can also combine multiple attribute settings for a single directive, as follows:&lt;%@ directive attribute1=”value1? attribute 2=”value2? . . . attributeN =”valueN” %&gt; 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&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are Predefined variables or implicit objects?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are JSP ACTIONS?&lt;/span&gt;&lt;br /&gt;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&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do you pass data (including JavaBeans) to a JSP from a servlet?&lt;/span&gt;&lt;br /&gt;(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:&lt;jsp: id="”theBean”" scope="”request”" class="”."&gt;&lt;br /&gt;(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:&lt;jsp:usebean id="”theBean”" scope="”session”" class="”."&gt;&lt;br /&gt;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:&lt;jsp:usebean id="”theBean”" scope="”application”" class="”."&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How can I set a cookie in JSP?&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;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:&lt;% bean. setResponse (response); %&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How can I delete a cookie with JSP?&lt;/span&gt;&lt;br /&gt;Say that I have a cookie called “foo, ” that I set a while ago &amp;amp; I want it to go away. I simply: &lt;% Cookie killCookie = new Cookie(”foo”, null); KillCookie. setPath(”/”); killCookie. setMaxAge(0); response. addCookie(killCookie); %&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;      &lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How are Servlets and JSP Pages related?&lt;/span&gt;&lt;br /&gt;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. &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-6844798026623046116?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/6844798026623046116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=6844798026623046116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6844798026623046116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6844798026623046116'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/java-interview-q-part-iv.html' title='Java Interview Q &amp; A [ Part - IV ]'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-7676016435005064211</id><published>2008-04-20T02:15:00.000-07:00</published><updated>2008-04-20T02:35:46.648-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Preparation Kit'/><title type='text'>Java Interview Q &amp; A [ Part - III ]</title><content type='html'>&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Which containers use a Border layout as their default layout?&lt;/span&gt;&lt;br /&gt;Window, Frame and Dialog classes use a BorderLayout as their layout.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Which containers use a Flow layout as their default layout?&lt;/span&gt;&lt;br /&gt;Panel and Applet classes use the FlowLayout as their default layout.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are wrapper classes?&lt;/span&gt;&lt;br /&gt;Wrapper classes are classes that allow primitive types to be accessed as objects.&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are Vector, Hashtable, LinkedList and Enumeration?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between set and list?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a stream and what are the types of Streams and classes of the Streams?&lt;/span&gt;&lt;br /&gt;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 &amp;amp; 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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between Reader/Writer and InputStream/Output Stream?&lt;/span&gt;&lt;br /&gt;The Reader/Writer class is character-oriented and the InputStream/OutputStream class is byte-oriented.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an I/O filter?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is serialization and deserialization?&lt;/span&gt;&lt;br /&gt;Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is JDBC?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are drivers available?&lt;/span&gt;&lt;br /&gt;a) JDBC-ODBC Bridge driver b) Native API Partly-Java driver c) JDBC-Net Pure Java driver d) Native-Protocol Pure Java driver&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between JDBC and ODBC?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the types of JDBC Driver Models and explain them?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the steps involved for making a connection with a database or how do you connect to a database?&lt;/span&gt;&lt;br /&gt;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”);&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What type of driver did you use in project?&lt;/span&gt;&lt;br /&gt;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).&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the types of statements in JDBC?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is stored procedure?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How to create and call stored procedures?&lt;/span&gt;&lt;br /&gt;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();&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is servlet?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the classes and interfaces for servlets?&lt;/span&gt;&lt;br /&gt;There are two packages in servlets and they are javax. servlet and&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between an applet and a servlet?&lt;/span&gt;&lt;br /&gt;a) Servlets are to servers what applets are to browsers. b) Applets must have graphical user interfaces whereas servlets have no graphical user interfaces.&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;       &lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between doPost and doGet methods?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the life cycle of a servlet?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Who is loading the init() method of servlet?&lt;/span&gt;&lt;br /&gt;Web server&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the different servers available for developing and deploying Servlets?&lt;/span&gt;&lt;br /&gt;a) Java Web Server b) JRun g) Apache Server h) Netscape Information Server i) Web Logic&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How many ways can we track client and what are they?&lt;/span&gt;&lt;br /&gt;The servlet API provides two ways to track client state and they are: a) Using Session tracking and b) Using Cookies.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is session tracking and how do you track a user session in servlets?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;    &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is Server-Side Includes (SSI)?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are cookies and how will you use them?&lt;/span&gt;&lt;br /&gt;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().&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Is it possible to communicate from an applet to servlet and how many ways and how?&lt;/span&gt;&lt;br /&gt;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   &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-7676016435005064211?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/7676016435005064211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=7676016435005064211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7676016435005064211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7676016435005064211'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/java-interview-q-61-90.html' title='Java Interview Q &amp; A [ Part - III ]'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-2978176783713768374</id><published>2008-04-20T01:56:00.000-07:00</published><updated>2008-04-20T02:35:30.519-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Preparation Kit'/><title type='text'>Java Interview Q &amp; A [ Part - II ]</title><content type='html'>&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a cloneable interface and how many methods does it contain?&lt;/span&gt;&lt;br /&gt;It is not having any method because it is a TAGGED or MARKER interface.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;What is the difference between abstract class and interface?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;b) In abstract class, key word abstract must be used for the methods whereas interface we need not use that keyword for the methods.&lt;br /&gt;c) Abstract class must have subclasses whereas interface can’t have subclasses.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Can you have an inner class inside a method and what variables can you access?&lt;/span&gt;&lt;br /&gt;Yes, we can have an inner class inside a method and final variables can be accessed.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between String and String Buffer?&lt;/span&gt;&lt;br /&gt;a) String objects are constants and immutable whereas StringBuffer objects are not.&lt;br /&gt;b) String class supports constant strings whereas StringBuffer class supports growable and modifiable strings.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between Array and vector?&lt;/span&gt;&lt;br /&gt;Array is a set of related data type and static whereas vector is a growable array of objects and dynamic.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between exception and error?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;What is the difference between process and thread?&lt;/span&gt;&lt;br /&gt;Process is a program in execution whereas thread is a separate path of execution in a program.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;What is multithreading and what are the methods for inter-thread communication and what is the class in which these methods are defined?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the class and interface in java to create thread and which is the most advantageous method?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the states associated in the thread?&lt;/span&gt;&lt;br /&gt;Thread contains ready, running, waiting and dead states.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is synchronization?&lt;/span&gt;&lt;br /&gt;Synchronization is the mechanism that ensures that only one thread is accessed the resources at a time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;When you will synchronize a piece of your code?&lt;/span&gt;&lt;br /&gt;When you expect your code will be accessed by different threads and these threads may change a particular data causing data corruption.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is deadlock?&lt;/span&gt;&lt;br /&gt;When two threads are waiting each other and can’t precede the program is said to be deadlock.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is daemon thread and which method is used to create the daemon thread?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Are there any global variables in Java, which can be accessed by other part of your program?&lt;/span&gt;&lt;br /&gt;No, it is not the main method in which you define variables. Global variables is not possible because concept of encapsulation is eliminated here.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an applet?&lt;/span&gt;&lt;br /&gt;Applet is a dynamic and interactive program that runs inside a web page displayed by a java capable browser.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between applications and applets?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How does applet recognize the height and width?&lt;/span&gt;&lt;br /&gt;Using getParameters() method.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;When do you use codebase in applet?&lt;/span&gt;&lt;br /&gt;When the applet class file is not in the same directory, codebase is used.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the lifecycle of an applet?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do you set security in applets?&lt;/span&gt;&lt;br /&gt;using setSecurityManager() method&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an event and what are the models available for event handling?&lt;/span&gt;&lt;br /&gt;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&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the advantages of the model over the event-inheritance model?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is source and listener?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is adapter class?&lt;/span&gt;&lt;br /&gt;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() .&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is meant by controls and what are different types of controls in AWT?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between choice and list?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between scrollbar and scrollpane?&lt;/span&gt;&lt;br /&gt;A Scrollbar is a Component, but not a Container whereas Scrollpane is a Conatiner and handles its own events and perform its own scrolling.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a layout manager and what are different types of layout managers available in java AWT?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How are the elements of different layouts organized?&lt;/span&gt;&lt;br /&gt;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.   &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-2978176783713768374?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/2978176783713768374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=2978176783713768374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2978176783713768374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2978176783713768374'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/java-interview-q-31-60.html' title='Java Interview Q &amp; A [ Part - II ]'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-4981501345034681346</id><published>2008-04-20T01:47:00.000-07:00</published><updated>2008-04-20T02:35:07.415-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Preparation Kit'/><title type='text'>Java Interview Q &amp; A [ Part - I ]</title><content type='html'>&lt;ol style="text-align: justify;"&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between procedural and object-oriented programs?&lt;br /&gt;&lt;/span&gt;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.&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are Encapsulation, Inheritance and Polymorphism?&lt;br /&gt;&lt;/span&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between Assignment and Initialization?&lt;/span&gt;&lt;br /&gt;Assignment can be done as many times as desired whereas initialization can be done only once.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is OOPs?&lt;/span&gt;&lt;br /&gt;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. &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; What are Class, Constructor and Primitive data types?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an Object and how do you allocate memory to it?&lt;/span&gt;&lt;br /&gt;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.   &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between constructor and method?&lt;/span&gt;&lt;br /&gt;Constructor will be automatically invoked when an object is created whereas method has to be called explicitly.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are methods and how are they defined?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the use of bin and lib in JDK?&lt;/span&gt;&lt;br /&gt;Bin contains all tools such as javac, appletviewer, awt tool, etc., whereas lib contains API and all packages.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is casting?&lt;/span&gt;&lt;br /&gt;Casting is used to convert the value of one type to another.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How many ways can an argument be passed to a subroutine and explain them?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between an argument and a parameter?&lt;/span&gt;&lt;br /&gt;While defining method, variables passed in the method are called parameters. While using those methods, values passed to those variables are called arguments. &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are different types of access modifiers?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is final, finalize() and finally?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is UNICODE?&lt;/span&gt;&lt;br /&gt;Unicode is used for internal representation of characters and strings and it uses 16 bits to represent each other.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is Garbage Collection and how to call it explicitly?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is finalize() method?&lt;/span&gt;&lt;br /&gt;finalize () method is used just before an object is destroyed and can be called just prior to garbage collection.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are Transient and Volatile Modifiers?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is method overloading and method overriding?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is difference between overloading and overriding?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;b) Overloading does not block inheritance from the superclass whereas overriding blocks inheritance from the superclass.&lt;br /&gt;c) In overloading, separate methods share the same name whereas in overriding, subclass method replaces the superclass.&lt;br /&gt;d) Overloading must have different method signatures whereas overriding must have same signature.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is meant by Inheritance and what are its advantages?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between this() and super()?&lt;/span&gt;&lt;br /&gt;this() can be used to invoke a constructor of the same class whereas super() can be used to invoke a super class constructor.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between superclass and subclass?&lt;/span&gt;&lt;br /&gt;A super class is a class that is inherited whereas sub class is a class that does the inheriting.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; What modifiers may be used with top-level class?&lt;/span&gt;&lt;br /&gt;public, abstract and final can be used for top-level class.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are inner class and anonymous class?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a package?&lt;/span&gt;&lt;br /&gt;A package is a collection of classes and interfaces that provides a high-level layer of access protection and name space management.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a reflection package?&lt;/span&gt;&lt;br /&gt;java. lang. reflect package has the ability to analyze itself in runtime.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is interface and its use?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an abstract class?&lt;/span&gt;&lt;br /&gt;An abstract class is a class designed with implementation gaps for subclasses to fill in and is deliberately incomplete.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between Integer and int?&lt;/span&gt;&lt;br /&gt;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.&lt;br /&gt;b) Integer can be used as an argument for a method that requires an object, whereas int can be used for calculations.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-4981501345034681346?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/4981501345034681346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=4981501345034681346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/4981501345034681346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/4981501345034681346'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/java-interview-q-1-30.html' title='Java Interview Q &amp; A [ Part - I ]'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-773890259582721766</id><published>2008-04-19T10:24:00.000-07:00</published><updated>2008-04-19T10:34:52.697-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Preparation Kit'/><title type='text'>Important Interview Questions on Java</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What if the main method is declared as private?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The program compiles properly but at runtime it will give "Main method not public." message.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is meant by pass by reference and pass by value in Java?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Pass by reference means, passing the address itself rather than passing the value. Pass by value means passing a copy of the value.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;If you’re overriding the method equals() of an object, which other method you might also consider?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;hashCode()&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is Byte Code?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What gives java it’s “write once and run anywhere” nature?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All Java programs are compiled into class files that contain bytecodes. These byte codes can be run in any platform and hence java is said to be platform independent.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Expain the reason for each keyword of public static void main(String args[])?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;public&lt;/span&gt;- main(..) is the first method called by java environment when a program is executed so it has to accessible from java environment. Hence the access specifier has to be public.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;static&lt;/span&gt;: Java environment should be able to call this method without creating an instance of the class , so this method must be declared as static.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;void&lt;/span&gt;: main does not return anything so the return type must be void&lt;br /&gt;&lt;br /&gt;The argument String indicates the argument type which is given at the command line and arg is an array for string given during command line.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the differences between == and .equals() ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;what is difference between == and equals&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Difference between == and equals method&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What would you use to compare two String variables - the operator == or the method equals()?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How is it possible for two String objects with identical values not to be equal under the == operator?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The == operator compares two objects to determine if they are the same object in memory i.e. present in the same memory location. It is possible for two String objects to have the same value, but located in different areas of memory.&lt;br /&gt;&lt;br /&gt;== compares references while .equals compares contents. The method public boolean equals(Object obj) is provided by the Object class and can be overridden. The default implementation returns true only if the object is compared with itself, which is equivalent to the equality operator == being used to compare aliases to the object. String, BitSet, Date, and File override the equals() method. For two String objects, value equality means that they contain the same character sequence. For the Wrapper classes, value equality means that the primitive values are equal.&lt;br /&gt;&lt;br /&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;public class EqualsTest {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    public static void main(String[] args) {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        String s1 = "abc";&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        String s2 = s1;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        String s5 = "abc";&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        String s3 = new String("abc");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        String s4 = new String("abc");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        System.out.println("== comparison : " + (s1 == s5));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        System.out.println("== comparison : " + (s1 == s2));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        System.out.println("Using equals method : " + s1.equals(s2));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        System.out.println("== comparison : " + s3 == s4);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        System.out.println("Using equals method : " + s3.equals(s4));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Output&lt;/span&gt;&lt;br /&gt;== comparison : true&lt;br /&gt;== comparison : true&lt;br /&gt;Using equals method : true&lt;br /&gt;false&lt;br /&gt;Using equals method : true&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What if the static modifier is removed from the signature of the main method?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What if I do not provide the String array as the argument to the method?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Program compiles. But at runtime throws an error "NoSuchMethodError".&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why oracle Type 4 driver is named as oracle thin driver?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oracle provides a Type 4 JDBC driver, referred to as the Oracle “thin” driver. This driver includes its own implementation of a TCP/IP version of Oracle’s Net8 written entirely in Java, so it is platform independent, can be downloaded to a browser at runtime, and does not require any Oracle software on the client side. This driver requires a TCP/IP listener on the server side, and the client connection string uses the TCP/IP port address, not the TNSNAMES entry for the database name.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between final, finally and finalize? What do you understand by the java final keyword?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is final, finalize() and finally?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is finalize() method?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;What is the difference between final, finally and finalize?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What does it mean that a class or member is final?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;o final - declare constant&lt;br /&gt;o finally - handles exception&lt;br /&gt;o finalize - helps in garbage collection&lt;br /&gt;&lt;br /&gt;Variables defined in an interface are implicitly final. A final class can't be extended i.e., final class may not be subclassed. This is done for security reasons with basic classes like String and Integer. It also allows the compiler to make some optimizations, and makes thread safety a little easier to achieve. A final method can't be overridden when its class is inherited. You can't change value of a final variable (is a constant). finalize() method is used just before an object is destroyed and garbage collected. finally, a key word used in exception handling and will be executed whether or not an exception is thrown. For example, closing of open connections is done in the finally method.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the Java API?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the GregorianCalendar class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The GregorianCalendar provides support for traditional Western calendars.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the ResourceBundle class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The ResourceBundle class is used to store locale-specific resources that can be loaded by a program to tailor the program's appearance to the particular locale in which it is being run.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why there are no global variables in Java?&lt;/span&gt;&lt;br /&gt;Global variables are globally accessible. Java does not support globally accessible variables due to following reasons:&lt;br /&gt;&lt;br /&gt;    * The global variables breaks the referential transparency&lt;br /&gt;    * Global variables creates collisions in namespace.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How to convert String to Number in java program?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The valueOf() function of Integer class is is used to convert string to Number. Here is the code example:&lt;br /&gt;String numString = "1000";&lt;br /&gt;int id=Integer.valueOf(numString).intValue();&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the SimpleTimeZone class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The SimpleTimeZone class provides support for a Gregorian calendar.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between a while statement and a do statement?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A while statement (pre test) checks at the beginning of a loop to see whether the next loop iteration should occur. A do while statement (post test) checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will always execute the loop body at least once.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the Locale class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Locale class is used to tailor a program output to the conventions of a particular geographic, political, or cultural region.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Describe the principles of OOPS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are three main principals of oops which are called Polymorphism, Inheritance and Encapsulation.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Explain the Inheritance principle.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Inheritance is the process by which one object acquires the properties of another object. Inheritance allows well-tested procedures to be reused and enables changes to make once and have effect in all relevant places&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is implicit casting?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Implicit casting is the process of simply assigning one entity to another without any transformation guidance to the compiler. This type of casting is not permitted in all kinds of transformations and may not work for all scenarios.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;int i = 1000;&lt;br /&gt;&lt;br /&gt;long j = i; //Implicit casting&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Is sizeof a keyword in java?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The sizeof operator is not a keyword.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a native method?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A native method is a method that is implemented in a language other than Java.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;In System.out.println(), what is System, out and println?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;System is a predefined final class, out is a PrintStream object and println is a built-in overloaded method in the out object.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are Encapsulation, Inheritance and Polymorphism&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Explain the Polymorphism principle. Explain the different forms of Polymorphism.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Polymorphism in simple terms means one name many forms. Polymorphism enables one entity to be used as a general category for different types of actions. The specific action is determined by the exact nature of the situation.&lt;br /&gt;&lt;br /&gt;Polymorphism exists in three distinct forms in Java:&lt;br /&gt;• Method overloading&lt;br /&gt;• Method overriding through inheritance&lt;br /&gt;• Method overriding through the Java interface&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is explicit casting?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Explicit casting in the process in which the complier are specifically informed to about transforming the object.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;long i = 700.20;&lt;br /&gt;&lt;br /&gt;int j = (int) i; //Explicit casting&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the Java Virtual Machine (JVM)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Java Virtual Machine is software that can be ported onto various hardware-based platforms&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you understand by downcasting?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The process of Downcasting refers to the casting from a general to a more specific type, i.e. casting down the hierarchy&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are Java Access Specifiers?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between public, private, protected and default Access Specifiers?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are different types of access modifiers?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Access specifiers are keywords that determine the type of access to the member of a class. These keywords are for allowing&lt;br /&gt;privileges to parts of a program such as functions and variables. These are:&lt;br /&gt;• Public : accessible to all classes&lt;br /&gt;• Protected : accessible to the classes within the same package and any subclasses.&lt;br /&gt;• Private : accessible only to the class to which they belong&lt;br /&gt;• Default : accessible to the class to which they belong and to subclasses within the same package&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Which class is the superclass of every class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Object.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Name primitive Java types.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The 8 primitive types are byte, char, short, int, long, float, double, and boolean.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between static and non-static variables?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are class variables?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is static in java?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a static method?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A static variable is associated with the class as a whole rather than with specific instances of a class. Each object will share a common copy of the static variables i.e. there is only one copy per class, no matter how many objects are created from it. Class variables or static variables are declared with the static keyword in a class. These are declared outside a class and stored in static memory. Class variables are mostly used for constants. Static variables are always called by the class name. This variable is created when the program starts and gets destroyed when the programs stops. The scope of the class variable is same an instance variable. Its initial value is same as instance variable and gets a default value when its not initialized corresponding to the data type. Similarly, a static method is a method that belongs to the class rather than any object of the class and doesn't apply to an object or even require that any objects of the class have been instantiated.&lt;br /&gt;     Static methods are implicitly final, because overriding is done based on the type of the object, and static methods are attached to a class, not an object. A static method in a superclass can be shadowed by another static method in a subclass, as long as the original method was not declared final. However, you can't override a static method with a non-static method. In other words, you can't change a static method into an instance method in a subclass.&lt;br /&gt;&lt;br /&gt;Non-static variables take on unique values with each object instance.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between the boolean &amp;amp; operator and the &amp;amp;&amp;amp; operator?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If an expression involving the boolean &amp;amp; operator is evaluated, both operands are evaluated, whereas the &amp;amp;&amp;amp; operator is a short cut operator. When an expression involving the &amp;amp;&amp;amp; operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. If the first operand evaluates to false, the evaluation of the second operand is skipped.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How does Java handle integer overflows and underflows?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It uses those low order bytes of the result that can fit into the size of the type allowed by the operation.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What if I write static public void instead of public static void?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Program compiles and runs properly.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between declaring a variable and defining a variable?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In declaration we only mention the type of the variable and its name without initializing it. Defining means declaration + initialization. E.g. String s; is just a declaration while String s = new String ("bob"); Or String s = "bob"; are both definitions.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What type of parameter passing does Java support?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In Java the arguments (primitives and objects) are always passed by value. With objects, the object reference itself is passed by value and so both the original reference and parameter copy both refer to the same object.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Explain the Encapsulation principle.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. Objects allow procedures to be encapsulated with their data to reduce potential interference. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you understand by a variable?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Variable is a named memory location that can be easily referred in the program. The variable is used to hold the data and it can be changed during the course of the execution of the program.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you understand by numeric promotion?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Numeric promotion is the conversion of a smaller numeric type to a larger numeric type, so that integral and floating-point operations may take place. In the numerical promotion process the byte, char, and short values are converted to int values. The int values are also converted to long values, if necessary. The long and float values are converted to double values, as required.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you understand by casting in java language? What are the types of casting?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The process of converting one data type to another is called Casting. There are two types of casting in Java; these are implicit casting and explicit casting.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the first argument of the String array in main method?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The String array is empty. It does not have any element. This is unlike C/C++ where the first element by default is the program name. If we do not provide any arguments on the command line, then the String array of main method will be empty but not null.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How can one prove that the array is not null but empty?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Print array.length. It will print 0. That means it is empty. But if it would have been null then it would have thrown a NullPointerException on attempting to print array.length.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Can an application have multiple classes having main method?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes. While starting the application we mention the class name to be run. The JVM will look for the main method only in the class whose name you have mentioned. Hence there is not conflict amongst the multiple classes having main method.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;When is static variable loaded? Is it at compile time or runtime? When exactly a static block is loaded in Java?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Static variable are loaded when classloader brings the class to the JVM. It is not necessary that an object has to be created. Static variables will be allocated memory space when they have been loaded. The code in a static block is loaded/executed only once i.e. when the class is first initialized. A class can have any number of static blocks. Static block is not member of a class, they do not have a return statement and they cannot be called directly. Cannot contain this or super. They are primarily used to initialize static fields.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Can I have multiple main methods in the same class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We can have multiple overloaded main methods but there can be only one main method with the following signature :&lt;br /&gt;&lt;br /&gt;public static void main(String[] args) {}&lt;br /&gt;&lt;br /&gt;No the program fails to compile. The compiler says that the main method is already defined in the class.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Explain working of Java Virtual Machine (JVM)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JVM is an abstract computing machine like any other real computing machine which first converts .java file into .class file by using Compiler (.class is nothing but byte code file.) and Interpreter reads byte codes.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How can I swap two variables without using a third variable?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add two variables and assign the value into First variable. Subtract the Second value with the result Value. and assign to Second variable. Subtract the Result of First Variable With Result of Second Variable and Assign to First Variable. Example:&lt;br /&gt;&lt;br /&gt;int a=5,b=10;a=a+b; b=a-b; a=a-b;&lt;br /&gt;&lt;br /&gt;An other approach to the same question&lt;br /&gt;&lt;br /&gt;You use an XOR swap.&lt;br /&gt;&lt;br /&gt;for example:&lt;br /&gt;&lt;br /&gt;int a = 5; int b = 10;&lt;br /&gt;a = a ^ b;&lt;br /&gt;b = a ^ b;&lt;br /&gt;a = a ^ b;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is data encapsulation?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Encapsulation may be used by creating 'get' and 'set' methods in a class (JAVABEAN) which are used to access the fields of the object. Typically the fields are made private while the get and set methods are public. Encapsulation can be used to validate the data that is to be stored, to do calculations on data that is stored in a field or fields, or for use in introspection (often the case when using javabeans in Struts, for instance). Wrapping of data and function into a single unit is called as data encapsulation. Encapsulation is nothing but wrapping up the data and associated methods into a single unit in such a way that data can be accessed with the help of associated methods. Encapsulation provides data security. It is nothing but data hiding.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is reflection API? How are they implemented?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Reflection is the process of introspecting the features and state of a class at runtime and dynamically manipulate at run time. This is supported using Reflection API with built-in classes like Class, Method, Fields, Constructors etc. Example: Using Java Reflection API we can get the class name, by using the getName method.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Does JVM maintain a cache by itself? Does the JVM allocate objects in heap? Is this the OS heap or the heap maintained by the JVM? Why&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes, the JVM maintains a cache by itself. It creates the Objects on the HEAP, but references to those objects are on the STACK.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is phantom memory?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Phantom memory is false memory. Memory that does not exist in reality.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Can a method be static and synchronized?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A static method can be synchronized. If you do so, the JVM will obtain a lock on the java.lang.&lt;br /&gt;Class instance associated with the object. It is similar to saying:&lt;br /&gt;&lt;br /&gt;           synchronized(XYZ.class) {&lt;br /&gt;&lt;br /&gt;           }&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is difference between String and StringTokenizer?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A StringTokenizer is utility class used to break up string.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Example&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;StringTokenizer st = new StringTokenizer("Hello World");&lt;br /&gt;&lt;br /&gt;   while (st.hasMoreTokens()) {&lt;br /&gt;&lt;br /&gt;     System.out.println(st.nextToken());&lt;br /&gt;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;Output:&lt;br /&gt;&lt;br /&gt;Hello&lt;br /&gt;&lt;br /&gt;World&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-773890259582721766?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/773890259582721766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=773890259582721766' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/773890259582721766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/773890259582721766'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/important-interview-questions-on-java.html' title='Important Interview Questions on Java'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-8956467754105971305</id><published>2008-04-19T10:08:00.000-07:00</published><updated>2008-04-19T10:11:38.924-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Preparation Kit'/><title type='text'>Frequently Asked Questions In JAVA</title><content type='html'>1. Can a main() method of class be invoked in another class?&lt;br /&gt;   2. What is the difference between java command line arguments and C command line arguments?&lt;br /&gt;   3. What is the difference between == &amp;amp; .equals&lt;br /&gt;   4. What is the difference between abstract class &amp;amp; Interface.&lt;br /&gt;   5. What is singleton class &amp;amp; it’s implementation.&lt;br /&gt;   6. Use of static, final variable&lt;br /&gt;   7. Examples of final class&lt;br /&gt;   8. Difference between Event propagation &amp;amp; Event delegation&lt;br /&gt;   9. Difference between Unicast &amp;amp; Multicast model&lt;br /&gt;  10. What is a java bean&lt;br /&gt;  11. What is synchronized keyword used for.&lt;br /&gt;  12. What are the restrictions of an applet &amp;amp; how to make the applet access the local machines resources.&lt;br /&gt;  13. What is reflect package used for &amp;amp; the methods of it.&lt;br /&gt;  14. What is serialization used for&lt;br /&gt;  15. Can methods be overloaded based on the return types ?&lt;br /&gt;  16. Why do we need a finalze() method when Garbage Collection is there ?&lt;br /&gt;  17. Difference between AWT and Swing compenents ?&lt;br /&gt;  18. Is there any heavy weight component in Swings ?&lt;br /&gt;  19. Can the Swing application if you upload in net, be compatible with your browser?&lt;br /&gt;  20. What should you do get your browser compatible with swing components?&lt;br /&gt;  21. What are the methods in Applet ?&lt;span style="color: rgb(255, 255, 255);"&gt;http://knowledge-page.blogspot.com/&lt;/span&gt;&lt;br /&gt;  22. When is init(),start() called ?&lt;br /&gt;  23. When you navigate from one applet to another what are the methods called?&lt;br /&gt;  24. What is the difference between Trusted and Untrusted Applet ?&lt;br /&gt;  25. What is Exception ?&lt;br /&gt;  26. What are the ways you can handle exception ?&lt;br /&gt;  27. When is try,catch block used ?&lt;br /&gt;  28. What is finally method in Exceptions ?&lt;br /&gt;  29. What are the types of access modifiers ?&lt;br /&gt;  30. What is protected and friendly ?&lt;br /&gt;  31. What are the other modifiers ?&lt;br /&gt;  32. Is synchronised modifier ?&lt;br /&gt;  33. What is meant by polymorphism ?&lt;br /&gt;  34. What is inheritance ?&lt;br /&gt;  35. What is method Overloading ? What is this in OOPS ?&lt;br /&gt;  36. What is method Overriding ? What is it in OOPS ?&lt;br /&gt;  37. Does java support multi dimensional arrays ?&lt;br /&gt;  38. Is multiple inheritance used in Java ?&lt;br /&gt;  39. How do you send a message to the browser in JavaScript ?&lt;br /&gt;  40. Does javascript support multidimensional arrays ?&lt;br /&gt;  41. Is there any tool in java that can create reports ?&lt;br /&gt;  42. What is meant by Java ?&lt;br /&gt;  43. What is meant by a class ?&lt;br /&gt;  44. What is meant by a method ?&lt;br /&gt;  45. What are the OOPS concepts in Java ?&lt;br /&gt;  46. What is meant by encapsulation ? Explain with an example&lt;br /&gt;  47. What is meant by inheritance ? Explain with an example&lt;br /&gt;  48. What is meant by polymorphism ? Explain with an example&lt;br /&gt;  49. Is multiple inheritance allowed in Java ? Why ?&lt;br /&gt;  50. What is meant by Java interpreter ?&lt;br /&gt;  51. What is meant by JVM ?&lt;br /&gt;  52. What is a compilation unit ?&lt;br /&gt;  53. What is meant by identifiers ?&lt;br /&gt;  54. What are the different types of modifiers ?&lt;br /&gt;  55. What are the access modifiers in Java ?&lt;br /&gt;  56. What are the primitive data types in Java ?&lt;br /&gt;  57. What is meant by a wrapper class ?&lt;br /&gt;  58. What is meant by static variable and static method ?&lt;br /&gt;  59. What is meant by Garbage collection ?&lt;br /&gt;  60. What is meant by abstract class&lt;br /&gt;  61. What is meant by final class, methods and variables ?&lt;br /&gt;  62. What is meant by interface ?&lt;br /&gt;  63. What is meant by a resource leak ?&lt;br /&gt;  64. What is the difference between interface and abstract class ?&lt;br /&gt;  65. What is the difference between public private, protected and static&lt;br /&gt;  66. What is meant by method overloading ?&lt;br /&gt;  67. What is meant by method overriding ?&lt;br /&gt;  68. What is singleton class ?&lt;br /&gt;  69. What is the difference between an array and a vector ?&lt;br /&gt;  70. What is meant by constructor ?&lt;br /&gt;  71. What is meant by casting ?&lt;br /&gt;  72. What is the difference between final, finally and finalize ?&lt;br /&gt;  73. What is meant by packages ?&lt;br /&gt;  74. What are all the packages ?&lt;br /&gt;  75. Name 2 calsses you have used ?&lt;br /&gt;  76. Name 2 classes that can store arbitrary number of objects ?&lt;br /&gt;  77. What is the difference between java.applet.* and java.applet.Applet ?&lt;br /&gt;  78. What is a default package ?&lt;br /&gt;  79. What is meant by a super class and how can you call a super class ?&lt;br /&gt;  80. What is anonymous class ?&lt;br /&gt;  81. Name interfaces without a method ?&lt;br /&gt;  82. What is the use of an interface ?&lt;br /&gt;  83. What is a serializable interface ?&lt;br /&gt;  84. How to prevent field from serialization ?&lt;br /&gt;  85. What is meant by exception ?&lt;br /&gt;  86. How can you avoid the runtime exception ?&lt;br /&gt;  87. What is the difference between throw and throws ?&lt;br /&gt;  88. What is the use of finally ?&lt;br /&gt;  89. Can multiple catch statements be used in exceptions ?&lt;br /&gt;  90. Is it possible to write a try within a try statement ?&lt;br /&gt;  91. What is the method to find if the object exited or not ?&lt;br /&gt;  92. What is meant by a Thread ?&lt;br /&gt;  93. What is meant by multi-threading ?&lt;br /&gt;  94. What is the 2 way of creating a thread ? Which is the best way and why?&lt;br /&gt;  95. What is the method to find if a thread is active or not ?&lt;br /&gt;  96. What are the thread-to-thread communcation ?&lt;br /&gt;  97. What is the difference between sleep and suspend ?&lt;br /&gt;  98. Can thread become a member of another thread ?&lt;br /&gt;  99. What is meant by deadlock ?&lt;br /&gt; 100. How can you avoid a deadlock ?&lt;br /&gt; 101. What are the three typs of priority ?&lt;br /&gt; 102. What is the use of synchronizations ?&lt;br /&gt; 103. Garbage collector thread belongs to which priority ?&lt;br /&gt; 104. What is meant by time-slicing ?&lt;br /&gt; 105. What is the use of ‘this’ ?&lt;span style="color: rgb(255, 255, 255);"&gt;http://knowledge-page.blogspot.com/&lt;/span&gt;&lt;br /&gt; 106. How can you find the length and capacity of a string buffer ?&lt;br /&gt; 107. How to compare two strings ?&lt;br /&gt; 108. What are the interfaces defined by Java.lang ?&lt;br /&gt; 109. What is the purpose of run-time class and system class&lt;br /&gt; 110. What is meant by Stream and Types ?&lt;br /&gt; 111. What is the method used to clear the buffer ?&lt;br /&gt; 112. What is meant by Stream Tokenizer ?&lt;br /&gt; 113. What is serialization and de-serialisation ?&lt;br /&gt; 114. What is meant by Applet ?&lt;br /&gt; 115. How to find the host from which the Applet has originated ?&lt;br /&gt; 116. What is the life cycle of an Applet ?&lt;br /&gt; 117. How do you load an HTML page from an Applet ?&lt;br /&gt; 118. What is meant by Applet Stub Interface ?&lt;br /&gt; 119. What is meant by getCodeBase and getDocumentBase method ?&lt;br /&gt; 120. How can you call an applet from a HTML file&lt;br /&gt; 121. What is meant by Applet Flickering ?&lt;br /&gt; 122. What is the use of parameter tag ?&lt;br /&gt; 123. What is audio clip Interface and what are all the methods in it ?&lt;br /&gt; 124. What is the difference between getAppletInfo and getParameterInfo ?&lt;br /&gt; 125. How to communicate between applet and an applet ?&lt;br /&gt; 126. What is meant by event handling ?&lt;br /&gt; 127. What are all the listeners in java and explain ?&lt;br /&gt; 128. What is meant by an adapter class ?&lt;br /&gt; 129. What are the types of mouse event listeners ?&lt;br /&gt; 130. What are the types of methods in mouse listeners ?&lt;br /&gt; 131. What is the difference between panel and frame ?&lt;br /&gt; 132. What is the default layout of the panel and frame ?&lt;br /&gt; 133. What is meant by controls and types ?&lt;br /&gt; 134. What is the difference between a scroll bar and a scroll panel.&lt;br /&gt; 135. What is the difference between list and choice ?&lt;br /&gt; 136. How to place a component on Windows ?&lt;br /&gt; 137. What are the different types of Layouts ?&lt;br /&gt; 138. What is meant by CardLayout ?&lt;br /&gt; 139. What is the difference between GridLayout and GridBagLayout&lt;br /&gt; 140. What is the difference between menuitem and checkboxmenu item.&lt;br /&gt; 141. What is meant by vector class, dictionary class , hash table class,and property class ?&lt;br /&gt; 142. Which class has no duplicate elements ?&lt;br /&gt; 143. What is resource bundle ?&lt;br /&gt; 144. What is an enumeration class ?&lt;br /&gt; 145. What is meant by Swing ?&lt;br /&gt; 146. What is the difference between AWT and Swing ?&lt;br /&gt; 147. What is the difference between an applet and a Japplet&lt;br /&gt; 148. What are all the components used in Swing ?&lt;br /&gt; 149. What is meant by tab pans ?&lt;br /&gt; 150. What is the use of JTree ?&lt;br /&gt; 151. How can you add and remove nodes in Jtree.&lt;br /&gt; 152. What is the method to expand and collapse nodes in a Jtree&lt;br /&gt; 153. What is the use of JTable ?&lt;br /&gt; 154. What is meant by JFC ?&lt;br /&gt; 155. What is the class in Swing to change the appearance of the Frame in Runtime.&lt;br /&gt; 156. How to reduce flicking in animation ?&lt;br /&gt; 157. What is meant by Javabeans ?&lt;br /&gt; 158. What is JAR file ?&lt;br /&gt; 159. What is meant by manifest files ?&lt;br /&gt; 160. What is Introspection ?&lt;br /&gt; 161. What are the steps involved to create a bean ?&lt;br /&gt; 162. Say any two properties in Beans ?&lt;br /&gt; 163. What is persistence ?&lt;br /&gt; 164. What is the use of beaninfo ?&lt;br /&gt; 165. What are the interfaces you used in Beans ?&lt;br /&gt; 166. What are the classes you used in Beans ?&lt;br /&gt; 167. What is the diffrence between an Abstract class and Interface&lt;br /&gt; 168. What is user defined exception ?&lt;br /&gt; 169. What do you know about the garbate collector ?&lt;br /&gt; 170. What is the difference between C++ &amp;amp; Java ?&lt;br /&gt; 171. How do you communicate in between Applets &amp;amp; Servlets ?&lt;br /&gt; 172. What is the use of Servlets ?&lt;br /&gt; 173. In an HTML form I have a Button which makes us to open another page in 15 seconds. How will do you that ?&lt;br /&gt; 174. What is the difference between Process and Threads ?&lt;br /&gt; 175. How will you initialize an Applet ?&lt;br /&gt; 176. What is the order of method invocation in an Applet ?&lt;br /&gt; 177. When is update method called ?&lt;br /&gt; 178. How will you communicate between two Applets ?&lt;br /&gt; 179. Have you ever used HashTable and Dictionary ?&lt;br /&gt; 180. What are statements in JAVA ?&lt;br /&gt; 181. What is JAR file ?&lt;br /&gt; 182. What is JNI ?&lt;br /&gt; 183. What is the base class for all swing components ?&lt;br /&gt; 184. What is JFC ?&lt;br /&gt; 185. What is Difference between AWT and Swing ?&lt;br /&gt; 186. Considering notepad/IE or any other thing as process, What will Happen if you start notepad or IE 3 times? Where 3 processes are started or 3 threads are started ?&lt;br /&gt; 187. How does thread synchronization occurs inside a monitor ?&lt;br /&gt; 188. How will you call an Applet using a Java Script function ?&lt;br /&gt; 189. Is there any tag in HTML to upload and download files ?&lt;br /&gt; 190. Why do you Canvas ?&lt;br /&gt; 191. How can you push data from an Applet to Servlet ?&lt;br /&gt; 192. What are the benefits of Swing over AWT ?&lt;br /&gt; 193. Where the CardLayout is used ?&lt;br /&gt; 194. What is the Layout for ToolBar ?&lt;br /&gt; 195. What is the difference between Grid and GridbagLayout ?&lt;br /&gt; 196. How will you add panel to a Frame ?&lt;br /&gt; 197. What is the corresponding Layout for Card in Swing ?&lt;br /&gt; 198. What is light weight component ?&lt;br /&gt; 199. What is bean ? Where it can be used ?&lt;br /&gt; 200. What is difference in between Java Class and Bean ?&lt;br /&gt; 201. What is the mapping mechanism used by Java to identify IDL language ?&lt;br /&gt; 202. Diff between Application and Applet ?&lt;br /&gt; 203. What is serializable Interface ?&lt;br /&gt; 204. What is the difference between CGI and Servlet ?&lt;br /&gt; 205. What is the use of Interface ?&lt;br /&gt; 206. Why Java is not fully objective oriented ?&lt;br /&gt; 207. Why does not support multiple Inheritance ?&lt;br /&gt; 208. What it the root class for all Java classes ?&lt;br /&gt; 209. What is polymorphism ? &lt;span style="color: rgb(255, 255, 255);"&gt;http://knowledge-page.blogspot.com/&lt;/span&gt;&lt;br /&gt; 210. Suppose If we have variable ' I ' in run method, If I can create one or More thread each thread will occupy a separate copy or same variable will be shared ?&lt;br /&gt; 211. What is Constructor and Virtual function? Can we call Virtual&lt;br /&gt; 212. Funciton in a constructor ?&lt;br /&gt; 213. Why we use OOPS concepts? What is its advantage ?&lt;br /&gt; 214. What is the difference in between C++ and Java ? can u explain in detail?&lt;br /&gt; 215. What is the exact difference in between Unicast and Multicast object ? Where we will use ?&lt;br /&gt; 216. How do you sing an Applet ?&lt;br /&gt; 217. In a Container there are 5 components. I want to display the all the components names, how will you do that one ?&lt;br /&gt; 218. Why there are some null interface in java ? What does it mean ?&lt;br /&gt; 219. Give me some null interfaces in JAVA ?&lt;br /&gt; 220. Tell me the latest versions in JAVA related areas ?&lt;br /&gt; 221. What is meant by class loader ? How many types are there? When will we use them ?&lt;br /&gt; 222. What is meant by flickering ?&lt;br /&gt; 223. What is meant by cookies ? Explain ?&lt;br /&gt; 224. Problem faced in your earlier project&lt;br /&gt; 225. How OOPS concept is achieved in Java&lt;br /&gt; 226. Features for using Java&lt;br /&gt; 227. How does Java 2.0 differ from Java 1.0&lt;br /&gt; 228. Public static void main - Explain&lt;br /&gt; 229. What are command line arguments&lt;br /&gt; 230. Explain about the three-tier model&lt;br /&gt; 231. Difference between String &amp;amp; StringBuffer&lt;br /&gt; 232. Wrapper class. Is String a Wrapper Class&lt;br /&gt; 233. What are the restriction for static method Purpose of the file class&lt;br /&gt; 234. Default modifier in Interface&lt;br /&gt; 235. Difference between Interface &amp;amp; Abstract class&lt;br /&gt; 236. Can abstract be declared as Final&lt;br /&gt; 237. Can we declare variables inside a method as Final Variables&lt;br /&gt; 238. What is the package concept and use of package&lt;br /&gt; 239. How can a dead thread be started&lt;br /&gt; 240. Difference between Applet &amp;amp; Application&lt;br /&gt; 241. Life cycle of the Applet&lt;br /&gt; 242. Can Applet have constructors&lt;br /&gt; 243. Difference between canvas class &amp;amp; graphics class&lt;br /&gt; 244. Explain about Superclass &amp;amp; subclass&lt;br /&gt; 245. What is AppletStub&lt;br /&gt; 246. Explain Stream Tokenizer&lt;br /&gt; 247. What is the difference between two types of threads&lt;br /&gt; 248. Checked &amp;amp; Unchecked exception&lt;br /&gt; 249. Use of throws exception&lt;br /&gt; 250. What is finally in exception handling Vector class&lt;br /&gt; 251. What will happen to the Exception object after exception handling&lt;br /&gt; 252. Two types of multi-tasking&lt;br /&gt; 253. Two ways to create the thread&lt;br /&gt; 254. Synchronization&lt;br /&gt; 255. I/O Filter&lt;br /&gt; 256. Can applet in different page communicate with each other&lt;br /&gt; 257. Why Java is not 100 % pure OOPS ? ( EcomServer )&lt;br /&gt; 258. When we will use an Interface and Abstract class ?&lt;br /&gt; 259. How to communicate 2 threads each other ?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-8956467754105971305?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/8956467754105971305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=8956467754105971305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/8956467754105971305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/8956467754105971305'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/frequently-asked-questions-in-java.html' title='Frequently Asked Questions In JAVA'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-2654854951202405748</id><published>2008-04-19T09:47:00.000-07:00</published><updated>2008-04-19T09:53:57.158-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='J2EE Preparation Kit'/><title type='text'>EJB Interview Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;1. What is EJB?&lt;/span&gt;&lt;br /&gt;EJB stands for Enterprise JavaBean and is a widely-adopted server side component architecture for J2EE. It enables rapid development of mission-critical application that are versatile, reusable and portable across middleware while protecting IT investment and preventing vendor lock-in.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;2. What is session Facade?&lt;/span&gt;&lt;br /&gt;Session Facade is a design pattern to access the Entity bean through local interface than accessing directly. It increases the performance over the network. In this case we call session bean which on turn call entity bean.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;3. What is EJB role in J2EE?&lt;/span&gt;&lt;br /&gt;EJB technology is the core of J2EE. It enables developers to write reusable and portable server-side business logic for the J2EE platform.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;4. What is the difference between EJB and Java beans?&lt;/span&gt;&lt;br /&gt;EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;5. What are the key features of the EJB technology?&lt;/span&gt;&lt;br /&gt;1. EJB components are server-side components written entirely in the Java programming language&lt;br /&gt;2. EJB components contain business logic only - no system-level programming &amp;amp; services, such as transactions, security, life-cycle, threading, persistence, etc. are automatically managed for the EJB component by the EJB server.&lt;br /&gt;3. EJB architecture is inherently transactional, distributed, portable multi-tier, scalable and secure.&lt;br /&gt;4. EJB components are fully portable across any EJB server and any OS.&lt;br /&gt;5. EJB architecture is wire-protocol neutral–any protocol can be utilized like IIOP,JRMP, HTTP, DCOM,etc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;6. What are the key benefits of the EJB technology?&lt;/span&gt;&lt;br /&gt;1. Rapid application development&lt;br /&gt;2. Broad industry adoption&lt;br /&gt;3. Application portability&lt;br /&gt;4. Protection of IT investment&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;7. How many enterprise beans?&lt;/span&gt;&lt;br /&gt;There are three kinds of enterprise beans:&lt;br /&gt;1. session beans,&lt;br /&gt;2. entity beans, and&lt;br /&gt;3. message-driven beans.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;8. What is message-driven bean?&lt;/span&gt;&lt;br /&gt;A message-driven bean combines features of a session bean and a Java Message Service (JMS) message listener, allowing a business component to receive JMS. A message-driven bean enables asynchronous clients to access the business logic in the EJB tier.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;9. What is Entity Bean and Session Bean ?&lt;/span&gt;&lt;br /&gt;Entity Bean is a Java class which implements an Enterprise Bean interface and provides the implementation of the business methods. There are two types: Container Managed Persistence(CMP) and Bean-Managed Persistence(BMP).&lt;br /&gt;Session Bean is used to represent a workflow on behalf of a client. There are two types: Stateless and Stateful. Stateless bean is the simplest bean. It doesn’t maintain any conversational state with clients between method invocations. Stateful bean maintains state between invocations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;10. How EJB Invocation happens?&lt;/span&gt;&lt;br /&gt;Retrieve Home Object reference from Naming Service via JNDI. Return Home Object reference to the client. Create me a new EJB Object through Home Object interface. Create EJB Object from the Ejb Object. Return EJB Object reference to the client. Invoke business method using EJB Object reference. Delegate request to Bean (Enterprise Bean).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;11. Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB?&lt;/span&gt;&lt;br /&gt;You can pass the HttpSession as parameter to an EJB method, only if all objects in session are serializable.This has to be consider as passed-by-value, that means that it’s read-only in the EJB. If anything is altered from inside the EJB, it won’t be reflected back to the HttpSession of the Servlet Container.The pass-by-reference can be used between EJBs Remote Interfaces, as they are remote references. While it is possible to pass an HttpSession as a parameter to an EJB object, it is considered to be bad practice in terms of object-oriented design. This is because you are creating an unnecessary coupling between back-end objects (EJBs) and front-end objects (HttpSession). Create a higher-level of abstraction for your EJBs API. Rather than passing the whole, fat, HttpSession (which carries with it a bunch of http semantics), create a class that acts as a value object (or structure) that holds all the data you need to pass back and forth between front-end/back-end. Consider the case where your EJB needs to support a non HTTP-based client. This higher level of abstraction will be flexible enough to support it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;12. The EJB container implements the EJBHome and EJBObject classes. For every request from a unique client, does the container create a separate instance of the generated EJBHome and EJBObject classes?&lt;/span&gt;&lt;br /&gt;The EJB container maintains an instance pool. The container uses these instances for the EJB Home reference irrespective of the client request. while refering the EJB Object classes the container creates a separate instance for each client request. The instance pool maintenance is up to the implementation of the container. If the container provides one, it is available otherwise it is not mandatory for the provider to implement it. Having said that, yes most of the container providers implement the pooling functionality to increase the performance of the application server. The way it is implemented is, again, up to the implementer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;13. Can the primary key in the entity bean be a Java primitive type such as int?&lt;/span&gt;&lt;br /&gt;The primary key can’t be a primitive type. Use the primitive wrapper classes, instead. For example, you can use java.lang.Integer as the primary key class, but not int (it has to be a class, not a primitive).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;14. Can you control when passivation occurs?&lt;/span&gt;&lt;br /&gt;The developer, according to the specification, cannot directly control when passivation occurs. Although for Stateful Session Beans, the container cannot passivate an instance that is inside a transaction. So using transactions can be a a strategy to control passivation. The ejbPassivate() method is called during passivation, so the developer has control over what to do during this exercise and can implement the require optimized logic. Some EJB containers, such as BEA WebLogic, provide the ability to tune the container to minimize passivation calls. Taken from the WebLogic 6.0 DTD -The passivation-strategy can be either default or transaction. With the default setting the container will attempt to keep a working set of beans in the cache. With the transaction setting, the container will passivate the bean after every transaction (or method call for a non-transactional invocation).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;15. What is the advantage of using Entity bean for database operations, over directly using JDBC API to do database operations? When would I use one over the other?&lt;/span&gt;&lt;br /&gt;Entity Beans actually represents the data in a database. It is not that Entity Beans replaces JDBC API. There are two types of Entity Beans Container Managed and Bean Mananged. In Container Managed Entity Bean - Whenever the instance of the bean is created the container automatically retrieves the data from the DB/Persistance storage and assigns to the object variables in bean for user to manipulate or use them. For this the developer needs to map the fields in the database to the variables in deployment descriptor files (which varies for each vendor). In the Bean Managed Entity Bean - The developer has to specifically make connection, retrive values, assign them to the objects in the ejbLoad() which will be called by the container when it instatiates a bean object. Similarly in the ejbStore() the container saves the object values back the the persistance storage. ejbLoad and ejbStore are callback methods and can be only invoked by the container. Apart from this, when you use Entity beans you dont need to worry about database transaction handling, database connection pooling etc. which are taken care by the ejb container.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;16. What is EJB QL?&lt;/span&gt;&lt;br /&gt;EJB QL is a Query Language provided for navigation across a network of enterprise beans and dependent objects defined by means of container managed persistence. EJB QL is introduced in the EJB 2.0 specification. The EJB QL query language defines finder methods for entity beans with container managed persistence and is portable across containers and persistence managers. EJB QL is used for queries of two types of finder methods: Finder methods that are defined in the home interface of an entity bean and which return entity objects. Select methods, which are not exposed to the client, but which are used by the Bean Provider to select persistent values that are maintained by the Persistence Manager or to select entity objects that are related to the entity bean on which the query is defined.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;17. Brief description about local interfaces?&lt;/span&gt;&lt;br /&gt;EEJB was originally designed around remote invocation using the Java Remote Method Invocation (RMI) mechanism, and later extended to support to standard CORBA transport for these calls using RMI/IIOP. This design allowed for maximum flexibility in developing applications without consideration for the deployment scenario, and was a strong feature in support of a goal of component reuse in J2EE. Many developers are using EJBs locally, that is, some or all of their EJB calls are between beans in a single container. With this feedback in mind, the EJB 2.0 expert group has created a local interface mechanism. The local interface may be defined for a bean during development, to allow streamlined calls to the bean if a caller is in the same container. This does not involve the overhead involved with RMI like marshalling etc. This facility will thus improve the performance of applications in which co-location is planned. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;18. What are the special design care that must be taken when you work with local interfaces?&lt;/span&gt;&lt;br /&gt;It is important to understand that the calling semantics of local interfaces are different from those of remote interfaces. For example, remote interfaces pass parameters using call-by-value semantics, while local interfaces use call-by-reference. This means that in order to use local interfaces safely, application developers need to carefully consider potential deployment scenarios up front, then decide which interfaces can be local and which remote, and finally, develop the application code with these choices in mind. While EJB 2.0 local interfaces are extremely useful in some situations, the long-term costs of these choices, especially when changing requirements and component reuse are taken into account, need to be factored into the design decision.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;19. What happens if remove( ) is never invoked on a session bean?&lt;/span&gt;&lt;br /&gt;In case of a stateless session bean it may not matter if we call or not as in both cases nothing is done. The number of beans in cache is managed by the container. In case of stateful session bean, the bean may be kept in cache till either the session times out, in which case the bean is removed or when there is a requirement for memory in which case the data is cached and the bean is sent to free pool.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;20. What is the difference between Message Driven Beans and Stateless Session beans?&lt;/span&gt;&lt;br /&gt;In several ways, the dynamic creation and allocation of message-driven bean instances mimics the behavior of stateless session EJB instances, which exist only for the duration of a particular method call. However, message-driven beans are different from stateless session EJBs (and other types of EJBs) in several significant ways: Message-driven beans process multiple JMS messages asynchronously, rather than processing a serialized sequence of method calls. Message-driven beans have no home or remote interface, and therefore cannot be directly accessed by internal or external clients. Clients interact with message-driven beans only indirectly, by sending a message to a JMS Queue or Topic. Only the container directly interacts with a message-driven bean by creating bean instances and passing JMS messages to those instances as necessary. The Container maintains the entire lifecycle of a message-driven bean; instances cannot be created or removed as a result of client requests or other API calls.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;22. How can I call one EJB from inside of another EJB?&lt;/span&gt;&lt;br /&gt;EJBs can be clients of other EJBs. It just works. Use JNDI to locate the Home Interface of the other bean, then acquire an instance reference, and so forth.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;23. What is an EJB Context?&lt;/span&gt;&lt;br /&gt;EJBContext is an interface that is implemented by the container, and it is also a part of the bean-container contract. Entity beans use a subclass of EJBContext called EntityContext. Session beans use a subclass called SessionContext. These EJBContext objects provide the bean class with information about its container, the client using the bean and the bean itself. They also provide other functions. See the API docs and the spec for more details.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;24. Is is possible for an EJB client to marshal an object of class java.lang.Class to an EJB?&lt;/span&gt;&lt;br /&gt;Technically yes, spec. compliant NO! - The enterprise bean must not attempt to query a class to obtain information about the declared members that are not otherwise accessible to the enterprise bean because of the security rules of the Java language&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;25. Is it legal to have static initializer blocks in EJB?&lt;/span&gt;&lt;br /&gt;Although technically it is legal, static initializer blocks are used to execute some piece of code before executing any constructor or method while instantiating a class. Static initializer blocks are also typically used to initialize static fields - which may be illegal in EJB if they are read/write - In EJB this can be achieved by including the code in either the ejbCreate(), setSessionContext() or setEntityContext() methods.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;26. Is it possible to stop the execution of a method before completion in a SessionBean?&lt;/span&gt;&lt;br /&gt;Stopping the execution of a method inside a Session Bean is not possible without writing code inside the Session Bean. This is because you are not allowed to access Threads inside an EJB.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;27. What is the default transaction attribute for an EJB?&lt;/span&gt;&lt;br /&gt;There is no default transaction attribute for an EJB. Section 11.5 of EJB v1.1 spec says that the deployer must specify a value for the transaction attribute for those methods having container managed transaction. In WebLogic, the default transaction attribute for EJB is SUPPORTS.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;28. What is the difference between session and entity beans? When should I use one or the other?&lt;/span&gt;&lt;br /&gt;An entity bean represents persistent global data from the database; a session bean represents transient user-specific data that will die when the user disconnects (ends his session). Generally, the session beans implement business methods (e.g. Bank.transferFunds) that call entity beans (e.g. Account.deposit, Account.withdraw)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;29. Is there any default cache management system with Entity beans ?&lt;/span&gt;&lt;br /&gt;In other words whether a cache of the data in database will be maintained in EJB ? - Caching data from a database inside the AAApplication Server are what Entity EJB’s are used for.The ejbLoad() and ejbStore() methods are used to synchronize the Entity Bean state with the persistent storage(database). Transactions also play an important role in this scenario. If data is removed from the database, via an external application - your Entity Bean can still be alive the EJB container. When the transaction commits, ejbStore() is called and the row will not be found, and the transaction rolled back.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;30. Why is ejbFindByPrimaryKey mandatory?&lt;/span&gt;&lt;br /&gt;An Entity Bean represents persistent data that is stored outside of the EJB Container/Server. The ejbFindByPrimaryKey is a method used to locate and load an Entity Bean into the container, similar to a SELECT statement in SQL. By making this method mandatory, the client programmer can be assured that if they have the primary key of the Entity Bean, then they can retrieve the bean without having to create a new bean each time - which would mean creating duplications of persistent data and break the integrity of EJB.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;31. Why do we have a remove method in both EJBHome and EJBObject?&lt;/span&gt;&lt;br /&gt;With the EJBHome version of the remove, you are able to delete an entity bean without first instantiating it (you can provide a PrimaryKey object as a parameter to the remove method). The home version only works for entity beans. On the other hand, the Remote interface version works on an entity bean that you have already instantiated. In addition, the remote version also works on session beans (stateless and stateful) to inform the container of your loss of interest in this bean.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;32. How can I call one EJB from inside of another EJB?&lt;/span&gt;&lt;br /&gt;EJBs can be clients of other EJBs. It just works. Use JNDI to locate the Home Interface of the other bean, then acquire an instance reference, and so forth.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;33. What is the difference between a Server, a Container, and a Connector?&lt;/span&gt;&lt;br /&gt;An EJB server is an application, usually a product such as BEA WebLogic, that provides (or should provide) for concurrent client connections and manages system resources such as threads, processes, memory, database connections, network connections, etc. An EJB container runs inside (or within) an EJB server, and provides deployed EJB beans with transaction and security management, etc. The EJB container insulates an EJB bean from the specifics of an underlying EJB server by providing a simple, standard API between the EJB bean and its container. A Connector provides the ability for any Enterprise Information System (EIS) to plug into any EJB server which supports the Connector architecture. See Sun’s J2EE Connectors for more in-depth information on Connectors.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;34. How is persistence implemented in enterprise beans?&lt;/span&gt;&lt;br /&gt;Persistence in EJB is taken care of in two ways, depending on how you implement your beans: container managed persistence (CMP) or bean managed persistence (BMP) For CMP, the EJB container which your beans run under takes care of the persistence of the fields you have declared to be persisted with the database - this declaration is in the deployment descriptor. So, anytime you modify a field in a CMP bean, as soon as the method you have executed is finished, the new data is persisted to the database by the container. For BMP, the EJB bean developer is responsible for defining the persistence routines in the proper places in the bean, for instance, the ejbCreate(), ejbStore(), ejbRemove() methods would be developed by the bean developer to make calls to the database. The container is responsible, in BMP, to call the appropriate method on the bean. So, if the bean is being looked up, when the create() method is called on the Home interface, then the container is responsible for calling the ejbCreate() method in the bean, which should have functionality inside for going to the database and looking up the data.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;35. What is an EJB Context?&lt;/span&gt;&lt;br /&gt;EJBContext is an interface that is implemented by the container, and it is also a part of the bean-container contract. Entity beans use a subclass of EJBContext called EntityContext. Session beans use a subclass called SessionContext. These EJBContext objects provide the bean class with information about its container, the client using the bean and the bean itself. They also provide other functions. See the API docs and the spec for more details.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;36. Is method overloading allowed in EJB?&lt;/span&gt;&lt;br /&gt;Yes you can overload methods Should synchronization primitives be used on bean methods? - No. The EJB specification specifically states that the enterprise bean is not allowed to use thread primitives. The container is responsible for managing concurrent access to beans at runtime.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;37. Are we allowed to change the transaction isolation property in middle of a transaction?&lt;/span&gt;&lt;br /&gt;No. You cannot change the transaction isolation level in the middle of transaction.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;38. For Entity Beans, What happens to an instance field not mapped to any persistent storage, when the bean is passivated?&lt;/span&gt;&lt;br /&gt;The specification infers that the container never serializes an instance of an Entity bean (unlike stateful session beans). Thus passivation simply involves moving the bean from the ready to the pooled bin. So what happens to the contents of an instance variable is controlled by the programmer. Remember that when an entity bean is passivated the instance gets logically disassociated from it’s remote object. Be careful here, as the functionality of passivation/activation for Stateless Session, Stateful Session and Entity beans is completely different. For entity beans the ejbPassivate method notifies the entity bean that it is being disassociated with a particular entity prior to reuse or for dereference.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;39. What is a Message Driven Bean, what functions does a message driven bean have and how do they work in collaboration with JMS?&lt;/span&gt;&lt;br /&gt;Message driven beans are the latest addition to the family of component bean types defined by the EJB specification. The original bean types include session beans, which contain business logic and maintain a state associated with client sessions, and entity beans, which map objects to persistent data. Message driven beans will provide asynchrony to EJB based applications by acting as JMS message consumers. A message bean is associated with a JMS topic or queue and receives JMS messages sent by EJB clients or other beans. Unlike entity beans and session beans, message beans do not have home or remote interfaces. Instead, message driven beans are instantiated by the container as required. Like stateless session beans, message beans maintain no client-specific state, allowing the container to optimally manage a pool of message-bean instances. Clients send JMS messages to message beans in exactly the same manner as they would send messages to any other JMS destination. This similarity is a fundamental design goal of the JMS capabilities of the new specification. To receive JMS messages, message driven beans implement the javax.jms.MessageListener interface, which defines a single onMessage() method. When a message arrives, the container ensures that a message bean corresponding to the message topic/queue exists (instantiating it if necessary), and calls its onMessage method passing the client’s message as the single argument. The message bean’s implementation of this method contains the business logic required to process the message. Note that session beans and entity beans are not allowed to function as message beans.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;40. Does RMI-IIOP support code downloading for Java objects sent by value across an IIOP connection in the same way as RMI does across a JRMP connection?&lt;/span&gt;&lt;br /&gt;Yes. The JDK 1.2 support the dynamic class loading. The EJB container implements the EJBHome and EJBObject classes. For every request from a unique client,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;41. Does the container create a separate instance of the generated EJBHome and EJBObject classes?&lt;/span&gt;&lt;br /&gt;The EJB container maintains an instance pool. The container uses these instances for the EJB Home reference irrespective of the client request. while refering the EJB Object classes the container creates a separate instance for each client request. The instance pool maintainence is up to the implementation of the container. If the container provides one, it is available otherwise it is not mandatory for the provider to implement it. Having said that, yes most of the container providers implement the pooling functionality to increase the performance of the application server. The way it is implemented is again up to the implementer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;42. What is the advantage of putting an Entity Bean instance from the Ready State to Pooled state?&lt;/span&gt;&lt;br /&gt;The idea of the Pooled State is to allow a container to maintain a pool of entity beans that has been created, but has not been yet synchronized or assigned to an EJBObject. This mean that the instances do represent entity beans, but they can be used only for serving Home methods (create or findBy), since those methods do not relay on the specific values of the bean. All these instances are, in fact, exactly the same, so, they do not have meaningful state. Jon Thorarinsson has also added: It can be looked at it this way: If no client is using an entity bean of a particular type there is no need for cachig it (the data is persisted in the database). Therefore, in such cases, the container will, after some time, move the entity bean from the Ready State to the Pooled state to save memory. Then, to save additional memory, the container may begin moving entity beans from the Pooled State to the Does Not Exist State, because even though the bean’s cache has been cleared, the bean still takes up some memory just being in the Pooled State.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-2654854951202405748?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/2654854951202405748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=2654854951202405748' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2654854951202405748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2654854951202405748'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/ejb-interview-questions.html' title='EJB Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-1120874474967874384</id><published>2008-04-19T09:35:00.000-07:00</published><updated>2008-04-19T09:54:15.280-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Preparation Kit'/><title type='text'>Core Java Interview Questions</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;These questions are often asked by the interviewer for core java job interview. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why threads block or enters to waiting state on I/O?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Threads enters to waiting state or block on I/O because other threads can execute while the I/O operations are performed.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are transient variables in java?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Transient variables are variable that cannot be serialized.&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How Observer and Observable are used?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Subclass of Observable class maintain a list of observers. Whenever an Observable object is updated, it invokes the update() method of each of its observers to notify the observers that it has a changed state. An observer is  any object that implements the interface Observer.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is synchronization?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Synchronization is the ability to control the access of multiple threads to shared resources. Synchronization stops multithreading. With synchronization , at  a time only one thread will be able to access a shared resource.&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is List interface ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;List is an ordered collection of objects.&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a Vector?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Vector is a grow able array of objects.&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between yield() and sleep()?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When a object invokes yield() it returns to ready state. But when an object invokes sleep() method enters to not ready state.&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are Wrapper Classes ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;They are wrappers to primitive data types. They allow us to access primitives as objects.&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Can we call finalize() method ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes.  Nobody will stop us to call any method , if it is accessible in our class. But a garbage collector cannot call an object's finalize method if that object is reachable.&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between  time slicing and  preemptive scheduling ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In preemptive scheduling, highest priority task continues execution till it enters a not running state or a higher priority task comes into existence. In time slicing, the task continues its execution for a predefined period of time and reenters the pool of ready tasks.  &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the initial state of a thread when it is created and started?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The thread is in ready state.&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Can we declare an anonymous class as both extending a class and implementing an interface?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No. An anonymous class can extend a class or implement an interface, but it cannot be declared to do both&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the differences between boolean &amp;amp; operator and  &amp;amp; operator?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When an expression containing the &amp;amp; operator is evaluated, both operands are evaluated. And the &amp;amp; operator is applied to the operand. When an expression containing &amp;amp;&amp;amp; operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then only the second operand is evaluated otherwise the second part will not get executed.  &amp;amp;&amp;amp; is also called short cut and.&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the use of the finally block?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally is the block of code that executes always. The code in finally block will execute even if an exception is occurred. finally will not execute when the user calls System.exit().&lt;br /&gt;     &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an abstract method ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;An abstract method is a method that don't have a body. It is declared with modifier abstract.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-1120874474967874384?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/1120874474967874384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=1120874474967874384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1120874474967874384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/1120874474967874384'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/core-java-interview-questions.html' title='Core Java Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-7901660533932368140</id><published>2008-04-18T12:53:00.000-07:00</published><updated>2008-04-18T13:24:32.613-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>C Aptitude Questions and Answers</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;1.    void main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int  const * p=5;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%d",++(*p));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;Compiler error: Cannot modify a constant value.&lt;br /&gt;Explanation: &lt;br /&gt;p is a pointer to a "constant integer". But we tried to change the value of the "constant integer".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;2.    main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            char s[ ]="man";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            for(i=0;s[ i ];i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;                       mmmm&lt;br /&gt;                      aaaa&lt;br /&gt;                      nnnn&lt;br /&gt;Explanation:&lt;br /&gt;s[i], *(i+s), *(s+i), i[s] are all different ways of expressing the same idea. Generally array name is the base address for that array. Here s is the base address. i is the index number/displacement from the base address. So, indirecting it with * is same as s[i]. i[s] may be surprising. But in the case of C it is same as s[i].&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;3.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            float me = 1.1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            double you = 1.1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            if(me==you)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("I love U");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                        printf("I hate U");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;I hate U&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;For floating point numbers (float, double, long double) the values cannot be predicted exactly. Depending on the number of bytes, the precession with of the value represented varies. Float takes 4 bytes and long double takes 10 bytes. So float stores 0.9 with less precision than long double.&lt;br /&gt;Rule of Thumb:&lt;br /&gt;Never compare or at-least be cautious when using floating point numbers with relational operators (== , &gt;, &lt;, &lt;=, &gt;=,!= ) .&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;4.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            static int var = 5;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%d ",var--);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            if(var)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                        main();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;5 4 3 2 1&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;When static storage class is given, it is initialized once. The change in the value of a static variable is retained even between the function calls. Main is also treated like any other ordinary function, which can be called recursively.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;5.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;             int c[ ]={2.8,3.4,4,6.7,5};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;             int j,*p=c,*q=c;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;             for(j=0;j&lt;5;j++)&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                        printf(" %d ",*c);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                        ++q;     }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;             for(j=0;j&lt;5;j++){&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf(" %d ",*p);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;++p;     }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;                       2 2 2 2 2 2 3 4 6 5&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;Initially pointer c is assigned to both p and q. In the first loop, since only q is incremented and not c , the value 2 will be printed 5 times. In second loop p itself is incremented. So the values 2 3 4 6 5 will be printed.&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;6.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            extern int i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            i=20;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d",i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Linker Error : Undefined symbol '_i'&lt;br /&gt;Explanation:&lt;br /&gt;                       extern storage class in the following declaration,&lt;br /&gt;                                   extern int i;&lt;br /&gt;specifies to the compiler that the memory for i is allocated in some other program and that address will be given to the current program at the time of linking. But linker finds that no other variable of name i is available in any other program with memory space allocated for it. Hence a linker error has occurred.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;7.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int i=-1,j=-1,k=0,l=2,m;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            m=i++&amp;amp;&amp;amp;j++&amp;amp;&amp;amp;k++||l++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%d %d %d %d %d",i,j,k,l,m);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;                       0 0 1 3 1&lt;br /&gt;&lt;br /&gt;Explanation :&lt;br /&gt;Logical operations always give a result of 1 or 0 . And also the logical AND (&amp;amp;&amp;amp;) operator has higher priority over the logical OR (||) operator. So the expression ‘i++ &amp;amp;&amp;amp; j++ &amp;amp;&amp;amp; k++’ is executed first. The result of this expression is 0 (-1 &amp;amp;&amp;amp; -1 &amp;amp;&amp;amp; 0 = 0). Now the expression is 0 || 2 which evaluates to 1 (because OR operator always gives 1 except for ‘0 || 0’ combination- for which it gives 0). So the value of m is 1. The values of other variables are also incremented by 1.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;8.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;            char *p;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;            printf("%d %d ",sizeof(*p),sizeof(p));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                        1 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;The sizeof() operator gives the number of bytes taken by its operand. P is a character pointer, which needs one byte for storing its value (a character). Hence sizeof(*p) gives a value of 1. Since it needs two bytes to store the address of the character pointer sizeof(p) gives 2.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;9.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int i=3;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            switch(i)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;             {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                default:printf("zero");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                case 1: printf("one");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                           break;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;               case 2:printf("two");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                          break;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;              case 3: printf("three");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                          break;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;              } &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer :&lt;br /&gt;three&lt;br /&gt;&lt;br /&gt;Explanation :&lt;br /&gt;The default case can be placed anywhere inside the loop. It is executed only when all other cases doesn't match.&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;10.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;              printf("%x",-1&lt;&lt;4);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;fff0&lt;br /&gt;&lt;br /&gt;Explanation :&lt;br /&gt;-1 is internally represented as all 1's. When left shifted four times the least significant 4 bits are filled with 0's.The %x format specifier specifies that the integer value be printed as a hexadecimal value.&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;11.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            char string[]="Hello World";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            display(string);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;void display(char *string)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%s",string);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler Error : Type mismatch in redeclaration of function display&lt;br /&gt;&lt;br /&gt;Explanation :&lt;br /&gt;In third line, when the function display is encountered, the compiler doesn't know anything about the function display. It assumes the arguments and return types to be integers, (which is the default type). When it sees the actual function display, the arguments and type contradicts with what it has assumed previously. Hence a compile time error occurs.&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;12.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int c=- -2;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("c=%d",c);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                                    c=2;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Here unary minus (or negation) operator is used twice. Same maths  rules applies, ie. minus * minus= plus.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Note:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;However you cannot give like --2. Because -- operator can only be applied to variables as a decrement operator (eg., i--). 2 is a constant and not a variable.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;13.      #define int char&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;            int i=65;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;            printf("sizeof(i)=%d",sizeof(i));&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;                       sizeof(i)=1&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;Since the #define replaces the string  int by the macro char&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;14.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int i=10;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;i=!i&gt;14;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Printf ("i=%d",i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;i=0&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;In the expression !i&gt;14 , NOT (!) operator has more precedence than ‘ &gt;’ symbol. ! is a unary logical operator. !i (!10) is 0 (not of true is false). 0&gt;14 is false (zero).&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;15.      #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;char s[]={'a','b','c','\n','c','\0'};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;char *p,*str,*str1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;p=&amp;amp;s[3];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;str=p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;str1=s;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d",++*p + ++*str1-32);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;77     &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;p is pointing to character '\n'. str1 is pointing to character 'a' ++*p. "p is pointing to '\n' and that is incremented by one." the ASCII value of '\n' is 10, which is then incremented to 11. The value of ++*p is 11. ++*str1, str1 is pointing to 'a' that is incremented by 1 and it becomes 'b'. ASCII value of 'b' is 98.&lt;br /&gt;Now performing (11 + 98 – 32), we get 77("M");&lt;br /&gt;So we get the output 77 :: "M" (Ascii is 77).&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;16.      #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int a[2][2][2] = { {10,2,3,4}, {5,6,7,8}  };&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int *p,*q;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;p=&amp;amp;a[2][2][2];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;*q=***a;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d----%d",*p,*q);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SomeGarbageValue---1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;p=&amp;amp;a[2][2][2] you declare only two 2D arrays, but you are trying to access the third 2D(which you are not declared) it will print garbage values. *q=***a starting address of a is assigned integer pointer. Now q is pointing to starting address of a. If you print *q, it will print first element of 3D array.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;17.      #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;struct xx&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;      int x=3;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;      char name[]="hello";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; };&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;struct xx *s;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d",s-&gt;x);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%s",s-&gt;name);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler Error&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;You should not initialize variables in declaration&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;18.      #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;struct xx&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int x;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;struct yy&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;char s;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            struct xx *p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;struct yy *q;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler Error&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;The structure yy is nested within structure xx. Hence, the elements are of yy are to be accessed through the instance of structure xx, which needs an instance of yy to be known. If the instance is created after defining the structure the compiler will not know about the instance relative to xx. Hence for nested structure yy you have to declare member.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;19.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("\nab");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("\bsi");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("\rha");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;hai&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;\n  - newline&lt;br /&gt;\b  - backspace&lt;br /&gt;\r  - linefeed&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;20.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int i=5;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d%d%d%d%d%d",i++,i--,++i,--i,i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;45545&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;The arguments in a function call are pushed into the stack from left to right. The evaluation is by popping out from the stack. and the evaluation is from right to left, hence the result.&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;21.      #define square(x) x*x&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;i = 64/square(4);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d",i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;64&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;the macro call square(4) will substituted by 4*4 so the expression becomes i = 64/4*4 . Since / and * has equal priority the expression will be evaluated as (64/4)*4 i.e. 16*4 = 64&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;22.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;char *p="hai friends",*p1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;p1=p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;while(*p!='\0') ++*p++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%s   %s",p,p1);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ibj!gsjfoet&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                        ++*p++ will be parse in the given order&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Ø  *p that is value at the location currently pointed by p will be taken&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Ø  ++*p the retrieved value will be incremented&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Ø  when ; is encountered the location will be incremented that is p++ will be executed&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Hence, in the while loop initial value pointed by p is ‘h’, which is changed to ‘i’ by executing ++*p and pointer moves to point, ‘a’ which is similarly changed to ‘b’ and so on. Similarly blank space is converted to ‘!’. Thus, we obtain value in p becomes “ibj!gsjfoet” and since p reaches ‘\0’ and p1 points to p thus p1doesnot print anything.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;23.      #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;#define a 10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;#define a 50&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d",a);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;50&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;The preprocessor directives can be redefined anywhere in the program. So the most recently assigned value will be taken.&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;24.      #define clrscr() 100&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;clrscr();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d\n",clrscr());&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;100&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;Preprocessor executes as a seperate pass before the execution of the compiler. So textual replacement of clrscr() to 100 occurs.The input program to compiler looks like this :&lt;br /&gt;                       main()&lt;br /&gt;                       {&lt;br /&gt;                            100;&lt;br /&gt;                            printf("%d\n",100);&lt;br /&gt;                       }&lt;br /&gt;           Note:&lt;br /&gt;100; is an executable statement but with no action. So it doesn't give any problem&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;25.   main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%p",main);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;                       Some address will be printed.&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;           Function names are just addresses (just like array names are addresses).&lt;br /&gt;main() is also a function. So the address of function main will be printed. %p in printf specifies that the argument is an address. They are printed as hexadecimal numbers.&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;26.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;clrscr();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;clrscr();&lt;/span&gt;&lt;br /&gt;        &lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;No output/error&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;The first clrscr() occurs inside a function. So it becomes a function call. In the second clrscr(); is a function declaration (because it is not inside any function).&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;27.       enum colors {BLACK,BLUE,GREEN}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf("%d..%d..%d",BLACK,BLUE,GREEN);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; return(1);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;0..1..2&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;enum assigns numbers starting from 0, if not explicitly defined.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;28.       void main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; char far *farther,*farthest;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf("%d..%d",sizeof(farther),sizeof(farthest));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;4..2&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;           the second pointer is of char type and not a far pointer&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;29.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; int i=400,j=300;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf("%d..%d");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;400..300&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;printf takes the values of the first two assignments of the program. Any number of printf's may be given. All of them take only the first two values. If more number of assignments given in the program, then printf will take garbage values.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;30.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; char *p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; p="Hello";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf("%c\n",*&amp;amp;*p);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;H&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;* is a dereference operator &amp;amp; is a reference operator. They can be applied any number of times provided it is meaningful. Here p points to the first character in the string "Hello". *p dereferences it and so its value is H. Again &amp;amp; references it to an address and * dereferences it to the value H.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;31.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;    int i=1;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;    while (i&lt;=5)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;       printf("%d",i);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;       if (i&gt;2)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;              goto here;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;       i++;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;fun()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;   here:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;     printf("PP");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler error: Undefined label 'here' in function main&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;Labels have functions scope, in other words The scope of the labels is limited to functions . The label 'here' is available in function fun() Hence it is not visible in function main.&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;32.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;   static char names[5][20]={"pascal","ada","cobol","fortran","perl"};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    int i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    char *t;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    t=names[3];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    names[3]=names[4];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    names[4]=t;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    for (i=0;i&lt;=4;i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%s",names[i]);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler error: Lvalue required in function main&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;Array names are pointer constants. So it cannot be modified.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;33.     void main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int i=5;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%d",i++ + ++i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Output Cannot be predicted  exactly.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Side effects are involved in the evaluation of   i&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;34.       void main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int i=5;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%d",i+++++i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler Error&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;The expression i+++++i is parsed as i ++ ++ + i which is an illegal combination of operators.&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;35.       #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int i=1,j=2;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;switch(i)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; case 1:  printf("GOOD");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                break;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; case j:  printf("BAD");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;               break;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler Error: Constant expression required in function main.&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;The case statement can have only constant expressions (this implies that we cannot use variable names directly so an error).&lt;br /&gt;           Note:&lt;br /&gt;Enumerated types can be used in case statements.&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;36.    main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d",scanf("%d",&amp;amp;i));  // value 10 is given as input here&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;1&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;Scanf returns number of items successfully read and not 1/0. Here 10 is given as input which should have been scanned successfully. So number of items read is 1.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;37.       #define f(g,g2) g##g2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int var12=100;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d",f(var,12));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;100&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;38.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int i=0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;for(;i++;printf("%d",i)) ;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d",i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;           1&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;before entering into the for loop the checking condition is "evaluated". Here it evaluates to 0 (false) and comes out of the loop, and i is incremented (note the semicolon after the for loop).&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;39.       #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  char s[]={'a','b','c','\n','c','\0'};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  char *p,*str,*str1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  p=&amp;amp;s[3];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  str=p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  str1=s;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  printf("%d",++*p + ++*str1-32);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;M&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;p is pointing to character '\n'.str1 is pointing to character 'a' ++*p meAnswer:"p is pointing to '\n' and that is incremented by one." the ASCII value of '\n' is 10. then it is incremented to 11. the value of ++*p is 11. ++*str1 meAnswer:"str1 is pointing to 'a' that is incremented by 1 and it becomes 'b'. ASCII value of 'b' is 98. both 11 and 98 is added and result is subtracted from 32.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;i.e. (11+98-32)=77("M");&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;40.       #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  struct xx&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;   {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;      int x=3;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;      char name[]="hello";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;   };&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;struct xx *s=malloc(sizeof(struct xx));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d",s-&gt;x);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%s",s-&gt;name);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler Error&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;Initialization should not be done for structure members inside the structure declaration&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;41.       #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;struct xx&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;              int x;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;              struct yy&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;               {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                 char s;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                 struct xx *p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;               };&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                         struct yy *q;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            };&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler Error&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;in the end of nested structure yy a member have to be declared&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;42.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; extern int i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; i=20;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf("%d",sizeof(i));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Linker error: undefined symbol '_i'.&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;extern declaration specifies that the variable i is defined somewhere else. The compiler passes the external variable to be resolved by the linker. So compiler doesn't find an error. During linking the linker searches for the definition of i. Since it is not found the linker flags an error.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;43.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf("%d", out);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;int out=100;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler error: undefined symbol out in function main.&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;The rule is that a variable is available for use from the point of declaration. Even though a is a global variable, it is not available for main. Hence an error.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;44.    main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; extern out;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf("%d", out);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; int out=100;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;100   &lt;br /&gt;&lt;br /&gt;           Explanation:&lt;br /&gt;This is the correct way of writing the previous program.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;45.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; show();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;void show()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf("I'm the greatest");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Compier error: Type mismatch in redeclaration of show.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;When the compiler sees the function show it doesn't know anything about it. So the default return type (ie, int) is assumed. But when compiler sees the actual definition of show mismatch occurs since it is declared as void. Hence the error.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;The solutions are as follows:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1. declare void show() in main() .&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2. define show() before main().&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;3. declare extern void show() before the use of show().&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;46.  main( )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  printf(“%u %u %u %d \n”,a,*a,**a,***a);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;        printf(“%u %u %u %d \n”,a+1,*a+1,**a+1,***a+1);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;       }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;100, 100, 100, 2&lt;br /&gt;114, 104, 102, 3&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;47.   main( )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  int a[ ] = {10,20,30,40,50},j,*p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  for(j=0; j&lt;5;&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf(“%d” ,*a);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;a++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    p = a;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;   for(j=0; j&lt;5;&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;      {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf(“%d ” ,*p);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;p++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;      }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;Answer:&lt;br /&gt;Compiler error: lvalue required.&lt;br /&gt;                    &lt;br /&gt;Explanation:&lt;br /&gt;Error is in line with statement a++. The operand must be an lvalue and may be of any of scalar type for the any operator, array name only when subscripted is an lvalue. Simply array name is a non-modifiable lvalue.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;48.       main( )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; static int  a[ ]   = {0,1,2,3,4};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; int  *p[ ] = {a,a+1,a+2,a+3,a+4};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; int  **ptr =  p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; ptr++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf(“\n %d  %d  %d”, ptr-p, *ptr-a, **ptr);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; *ptr++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf(“\n %d  %d  %d”, ptr-p, *ptr-a, **ptr);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; *++ptr;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf(“\n %d  %d  %d”, ptr-p, *ptr-a, **ptr);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; ++*ptr;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;       printf(“\n %d  %d  %d”, ptr-p, *ptr-a, **ptr);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;Answer:&lt;br /&gt;           111&lt;br /&gt;           222&lt;br /&gt;           333&lt;br /&gt;           344&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;49.       main( )&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt; void *vp;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt; char ch = ‘g’, *cp = “goofy”;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt; int j = 20;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt; vp = &amp;ch;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt; printf(“%c”, *(char *)vp);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt; vp = &amp;j;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt; printf(“%d”,*(int *)vp);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt; vp = cp;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt; printf(“%s”,(char *)vp + 3);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            g20fy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Since a void pointer is used it can be type casted to any other type pointer. vp = &amp;amp;ch stores address of char ch and the next statement prints the value stored in vp after type casting it to the proper data type pointer. the output is ‘g’. Similarly the output from second printf is ‘20’. The third printf statement type casts it to print the string from the 4th value hence the output is ‘fy’.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;50.    main ( )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; static char *s[ ]  = {“black”, “white”, “yellow”, “violet”};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; p = ptr;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; **++p;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; printf(“%s”,*--*++p + 3);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            ck&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;In this problem we have an array of char pointers pointing to start of 4 strings. Then we have ptr which is a pointer to a pointer of type char and a variable p which is a pointer to a pointer to a pointer of type char. p hold the initial value of ptr, i.e. p = s+3. The next statement increment value in p by 1 , thus now value of p = s+2. In the printf statement the expression is evaluated *++p causes gets value s+1 then the pre decrement is executed and we get s+1 – 1 = s . the indirection operator now gets the value from the array of s and adds 3 to the starting address. The string is printed starting from this position. Thus, the output is ‘ck’.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;51.    main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; int  i, n;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; char *x = “girl”;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; n = strlen(x);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; *x = x[n];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; for(i=0; i&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;   {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf(“%s\n”,x);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;x++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;   }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(blank space)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;irl&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;rl&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;l&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;Here a string (a pointer to char) is initialized with a value “girl”. The strlen function returns the length of the string, thus n has a value 4. The next statement assigns value at the nth location (‘\0’) to the first location. Now the string becomes “\0irl” . Now the printf statement prints the string after each iteration it increments it starting position. Loop starts from 0 to 4. The first time x[0] = ‘\0’ hence it prints nothing and pointer value is incremented. The second time it prints from x[1] i.e “irl” and the third time it prints “rl” and the last time it prints “l” and the loop terminates.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;52.     int i,j;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            for(i=0;i&lt;=10;i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            j+=5;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            assert(i&lt;5);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;br /&gt;Runtime error: Abnormal program termination.&lt;br /&gt;assert failed (i&lt;5),&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;53.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int i=-1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            +i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("i = %d, +i = %d \n",i,+i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; i = -1, +i = -1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Unary + is the only dummy operator in C. Where-ever it comes you can just ignore it just because it has no effect in the expressions (hence the name dummy operator).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;54. What are the files which are automatically opened when a C file is executed?&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;stdin, stdout, stderr (standard input,standard output,standard error).&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;55.  what will be the position of the file marker?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            a: fseek(ptr,0,SEEK_SET);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            b: fseek(ptr,0,SEEK_CUR);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer :&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            a: The SEEK_SET sets the file position marker to the starting of the file.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                        b: The SEEK_CUR sets the file position marker to the current position&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            of the file.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;56.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            char name[10],s[12];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            scanf(" \"%[^\"]\"",s);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            How scanf will execute?&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;First it checks for the leading white space and discards it.Then it matches with a quotation mark and then it reads all character upto another quotation mark.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;57.       What is the problem with the following code segment?&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;            while ((fgets(receiving array,50,file_ptr)) != EOF)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                                    ;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer &amp;amp; Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;fgets returns a pointer. So the correct end of file check is checking for != NULL.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;58.   main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            main();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; Runtime error : Stack overflow.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;main function calls itself again and again. Each time the function is called its return address is stored in the call stack. Since there is no condition to terminate the function call, the call stack overflows at runtime. So it terminates the program and results in an error.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;59.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            char *cptr,c;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            void *vptr,v;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            c=10;  v=0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            cptr=&amp;c; vptr=&amp;v;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%c%v",c,v);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Compiler error (at line number 4): size of v is Unknown.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;You can create a variable of type void * but not of type void, since void is an empty type. In the second line you are creating variable vptr of type void * and v of type void hence an error.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;60.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            char *str1="abcd";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            char str2[]="abcd";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd"));&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2 5 5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;In first sizeof, str1 is a character pointer so it gives you the size of the pointer variable. In second sizeof the name str2 indicates the name of the array whose size is 5 (including the '\0' termination character). The third sizeof is similar to the second one.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;61.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            char not;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            not=!2;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%d",not);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;! is a logical operator. In C the value 0 is considered to be the boolean value FALSE, and any non-zero value is considered to be the boolean value TRUE. Here 2 is a non-zero value so TRUE. !TRUE is FALSE (0) so it prints 0.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;62.       #define FALSE -1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            #define TRUE   1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            #define NULL   0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            main() {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;               if(NULL)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                        puts("NULL");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;               else if(FALSE)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                        puts("TRUE");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;               else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                        puts("FALSE");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;               }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;TRUE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;The input program to the compiler after processing by the preprocessor is,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            main(){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                        if(0)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                                    puts("NULL");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            else if(-1)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                                    puts("TRUE");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                                    puts("FALSE");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                        }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Preprocessor doesn't replace the values given inside the double quotes. The check by if condition is boolean value false so it goes to else. In second if -1 is boolean value true hence "TRUE" is printed.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;63.     main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int k=1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;1==1 is TRUE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;When two strings are placed together (or separated by white-space) they are concatenated (this is called as "stringization" operation). So the string is as if it is given as "%d==1 is %s". The conditional operator( ?: ) evaluates to "TRUE".&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;64.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int y;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            scanf("%d",&amp;amp;y); // input given is 2000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            if( (y%4==0 &amp;amp;&amp;amp; y%100 != 0) || y%100 == 0 )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                 printf("%d is a leap year");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                 printf("%d is not a leap year");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2000 is a leap year&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;An ordinary program to check if leap year or not.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;65.       #define max 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            #define int arr1[max]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            typedef char arr2[max];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            arr1 list={0,1,2,3,4};&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            arr2 name="name";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%d %s",list[0],name);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Compiler error (in the line arr1 list = {0,1,2,3,4})&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;arr2 is declared of type array of size 5 of characters. So it can be used to declare the variable name of the type arr2. But it is not the case of arr1. Hence an error.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Rule of Thumb:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;#defines are used for textual replacement whereas typedefs are used for declaring new types.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;66.       int i=10;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;             extern int i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;              {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                 int i=20;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                         const volatile unsigned i=30;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                         printf("%d",i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                        }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                  printf("%d",i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;               }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("%d",i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;30,20,10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;'{' introduces new block and thus new scope. In the innermost block i is declared as,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            const volatile unsigned&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;which is a valid declaration. i is assumed of type int. So printf prints 30. In the next block, i has value 20 and so printf prints 20. In the outermost block, i is declared as extern, so no storage space is allocated for it. After compilation is over the linker resolves it to global variable i (since it is the only variable visible there). So it prints i's value as 10.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;67.       main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                int *j;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                 int i=10;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                 j=&amp;i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                 }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;                 printf("%d",*j);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;10&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;The variable i is a block level variable and the visibility is inside that block only. But the lifetime of i is lifetime of the function so it lives upto the exit of main function. Since the i is still allocated space, *j prints the value stored in i since j points i.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;68.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            int i=-1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            -i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            printf("i = %d, -i = %d \n",i,-i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;            }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;i = -1, -i = 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;-i is executed and this execution doesn't affect the value of i. In printf first you just print the value of i. After that the value of the expression -i = -(-1) is printed.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;69.       #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;   const int i=4;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;   float j;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;   j = ++i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;   printf("%d  %f", i,++j);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Compiler error&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;i is a constant. you cannot change the value of constant&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;70.       #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  int a[2][2][2] = { {10,2,3,4}, {5,6,7,8}  };&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  int *p,*q;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  p=&amp;amp;a[2][2][2];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  *q=***a;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  printf("%d..%d",*p,*q);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;garbagevalue..1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;p=&amp;amp;a[2][2][2] you declare only two 2D arrays. but you are trying to access the third 2D(which you are not declared) it will print garbage values. *q=***a starting address of a is assigned integer pointer. now q is pointing to starting address of a.if you print *q meAnswer:it will print first element of 3D array.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;71.      #include&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    register i=5;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;    char j[]= "hello";                    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;     printf("%s  %d",j,i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;hello 5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;if you declare i as register compiler will treat it as ordinary integer and it will take integer value. i value may be stored either in register or in memory.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;72.      main()&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;              int i=5,j=6,z;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;              printf("%d",i+++j);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;             }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;11&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Explanation:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;the expression i+++j is treated as (i++ + j)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-7901660533932368140?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/7901660533932368140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=7901660533932368140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7901660533932368140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/7901660533932368140'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/c-aptitude-questions-and-answers.html' title='C Aptitude Questions and Answers'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-4632021818613883502</id><published>2008-04-18T12:44:00.000-07:00</published><updated>2008-04-18T12:48:02.504-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='J2EE Preparation Kit'/><title type='text'>J2EE Interview Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is J2EE?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;J2EE Stands for Java 2 Enterprise Edition. J2EE is an environment for developing and deploying enterprise applications. J2EE specification is defined by Sun Microsystems Inc. The J2EE platform is one of the best platform for the development and deployment of enterprise applications. The J2EE platform is consists of a set of services, application programming interfaces (APIs), and protocols, which provides the functionality necessary for developing multi-tiered, web-based applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you understand by a J2EE module?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A J2EE module is a software unit that consists of one or more J2EE components of the same container type along with one deployment descriptor of that type. J2EE specification defines four types of modules:&lt;br /&gt;a) EJB&lt;br /&gt;b) Web&lt;br /&gt;c) application client and&lt;br /&gt;d) resource adapter&lt;br /&gt;In the J2EE applications modules can be deployed as stand-alone units. Modules can also be assembled into J2EE applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Tell me something about J2EE component?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;J2EE component is a self-contained functional software unit supported by a container and configurable at deployment time. The J2EE specification defines the following J2EE components:&lt;br /&gt;Application clients and applets are components that run on the client.&lt;br /&gt;Java servlet and JavaServer Pages (JSP) technology components are Web components that run on the server.&lt;br /&gt;Enterprise JavaBeans (EJB) components (enterprise beans) are business components that run on the server. J2EE components are written in the Java programming language and are compiled in the same way as any program in the language. The difference between J2EE components and "standard" Java classes is that J2EE components are assembled into a J2EE application, verified to be well formed and in compliance with the J2EE specification, and deployed to production, where they are run and managed by the J2EE server or client container.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the contents of web module?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; A web module may contain:&lt;br /&gt;a) JSP files&lt;br /&gt;b) Java classes&lt;br /&gt;c) gif and html files and&lt;br /&gt;d) web component deployment descriptors&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Differentiate between .ear, .jar and .war files.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;These files are simply zipped file using java jar tool. These files are created for different purposes. Here is the description of these files:&lt;br /&gt;.jar files: These files are with the .jar extenstion. The .jar files contains the libraries, resources and accessories files like property files.&lt;br /&gt;.war files: These files are with the .war extension. The war file contains the web application that can be deployed on the any servlet/jsp container. The .war file contains jsp, html, javascript and other files for necessary for the development of web applications.&lt;br /&gt;.ear files: The .ear file contains the EJB modules of the application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between Session Bean and Entity Bean?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Session Bean: Session is one of the EJBs and it represents a single client inside the Application Server. Stateless session is easy to develop and its efficient. As compare to entity beans session beans require few server resources.&lt;br /&gt;A session bean is similar to an interactive session and is not shared; it can have only one client, in the same way that an interactive session can have only one user. A session bean is not persistent and it is destroyed once the session terminates.&lt;br /&gt;Entity Bean: An entity bean represents persistent global data from the database. Entity beans data are stored into database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why J2EE is suitable for the development distributed multi-tiered enterprise applications?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The J2EE platform consists of multi-tiered distributed application model. J2EE applications allows the developers to design and implement the business logic into components according to business requirement. J2EE architecture allows the development of multi-tired applications and the developed applications can be installed on different machines depending on the tier in the multi-tiered J2EE environment . The J2EE application parts are:&lt;br /&gt;a) Client-tier components run on the client machine.&lt;br /&gt;b) Web-tier components run on the J2EE server.&lt;br /&gt;c) Business-tier components run on the J2EE server and the&lt;br /&gt;d) Enterprise information system (EIS)-tier software runs on the EIS servers&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why do understand by a container?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Normally, thin-client multi-tiered applications are hard to write because they involve many lines of intricate code to handle transaction and state management, multithreading, resource pooling, and other complex low-level details. The component-based and platform-independent J2EE architecture makes J2EE applications easy to write because business logic is organized into reusable components. In addition, the J2EE server provides underlying services in the form of a container for every component type. Because you do not have to develop these services yourself, you are free to concentrate on solving the business problem at hand&lt;br /&gt;In short containers are the interface between a component and the low-level platform specific functionality that supports the component. The application like Web, enterprise bean, or application client component must be assembled and deployed on the J2EE container before executing.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the services provided by a container?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The services provided by container are as follows:&lt;br /&gt;a) Transaction management for the bean&lt;br /&gt;b) Security for the bean&lt;br /&gt;c) Persistence of the bean&lt;br /&gt;d) Remote access to the bean&lt;br /&gt;e) Lifecycle management of the bean&lt;br /&gt;f) Database-connection pooling&lt;br /&gt;g) Instance pooling for the bean&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are types of J2EE clients?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;J2EE clients are the software that access the services components installed on the J2EE container. Following are the J2EE clients:&lt;br /&gt;a) Applets&lt;br /&gt;b) Java-Web Start clients&lt;br /&gt;c) Wireless clients&lt;br /&gt;d) Web applications&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is Deployment Descriptor?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A deployment descriptor is simply an XML(Extensible Markup Language) file with the extension of .xml. Deployment descriptor describes the component deployment settings. Application servers reads the deployment descriptor to deploy the components contained in the deployment unit. For example ejb-jar.xml file is used to describe the setting of the EJBs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you understand by JTA and JTS?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JTA stands for Java Transaction API and JTS stands for Java Transaction Service. JTA provides a standard interface which allows the developers to demarcate transactions in a manner that is independent of the transaction manager implementation. The J2EE SDK uses the JTA transaction manager to implement the transaction. The code developed by developers does not calls the JTS methods directly, but only invokes the JTA methods. Then JTA internally invokes the JTS routines. JTA is a high level transaction interface used by the application code to control the transaction.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is JAXP?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Java API for XML Processing (JAXP) enables applications to parse and transform XML documents independent of a particular XML processing implementation. JAXP or Java API for XML Parsing is an optional API provided by Javasoft. It provides basic functionality for reading, manipulating, and generating XML documents through pure Java APIs. It is a thin and lightweight API that provides a standard way to seamlessly integrate any XML-compliant parser with a Java application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is J2EE Connector architecture?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;J2EE Connector Architecture (JCA) is a Java-based technology solution for connecting application servers and enterprise information systems (EIS) as part of enterprise application integration (EAI) solutions. While JDBC is specifically used to connect Java EE applications to databases, JCA is a more generic architecture for connection to legacy systems (including databases). JCA was developed under the Java Community Process as JSR 16 (JCA 1.0) and JSR 112 (JCA 1.5). As of 2006, the current version of JCA is version 1.5. The J2EE Connector API is used by J2EE tools developers and system integrators to create resource adapters.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is difference between Java Bean and Enterprise Java Bean?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Java Bean as is a plain java class with member variables and getter setter methods. Java Beans are defined under JavaBeans specification as Java-Based software component model which includes the features like introspection, customization, events, properties and persistence.&lt;br /&gt;Enterprise JavaBeans or EJBs for short are Java-based software components that comply with Java's EJB specification. EJBs are delpoyed on the EJB container and executes in the EJB container. EJB is not that simple, it is used for building distributed applications. Examples of EJB are Session Bean, Entity Bean and Message Driven Bean. EJB is used for server side programming whereas java bean is a client side. Bean is only development but the EJB is developed and then deploy on EJB Container.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between JTS and JTA?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In any J2EE application transaction management is one of the most crucial requirements of the application. Given the complexity of today's business requirements, transaction processing occupies one of the most complex segments of enterprise level distributed applications to build, deploy and maintain. JTS specifies the implementation of a Java transaction manager. JTS specifies the implementation of a Transaction Manager which supports the Java Transaction API (JTA) 1.0 This transaction manager supports the JTA, using which application servers can be built to support transactional Java applications. Internally the JTS implements the Java mapping of the OMG OTS 1.1 specifications. The Java mapping is specified in two packages: org.omg.CosTransactions and org.omg.CosTSPortability. The JTS thus provides a new architecture for transactional application servers and applications, while complying to the OMG OTS 1.1 interfaces internally. This allows the JTA compliant applications to interoperate with other OTS 1.1 complaint applications through the standard IIOP. Java-based applications and Java-based application servers access transaction management functionality via the JTA interfaces. The JTA interacts with a transaction management implementation via JTS. Similarly, the JTS can access resources via the JTA XA interfaces or can access OTS-enabled non-XA resources. JTS implementations can interoperate via CORBA OTS interfaces.&lt;br /&gt;&lt;br /&gt;The JTA specifies an architecture for building transactional application servers and defines a set of interfaces for various components of this architecture. The components are: the application, resource managers, and the application server. The JTA specifies standard interfaces for Java-based applications and application servers to interact with transactions, transaction managers, and resource managers JTA transaction management provides a set of interfaces utilized by an application server to manage the beginning and completion of transactions. Transaction synchronization and propagation services are also provided under the domain of transaction management.&lt;br /&gt;&lt;br /&gt;In the Java transaction model, the Java application components can conduct transactional operations on JTA compliant resources via the JTS. The JTS acts as a layer over the OTS. The applications can therefore initiate global transactions to include other OTS transaction managers, or participate in global transactions initiated by other OTS compliant transaction managers.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Can Entity Beans have no create() methods?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Entity Beans can have no create() methods. Entity Beans have no create() method, when entity bean is not used to store the data in the database. In this case entity bean is used to retrieve the data from database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the call back methods in Session bean?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Callback methods are called by the container to notify the important events to the beans in its life cycle. The callback methods are defined in the javax.ejb.EntityBean interface.The callback methods example are ejbCreate(), ejbPassivate(), and ejbActivate().&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is bean managed transaction?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In EJB transactions can be maintained by the container or developer can write own code to maintain the transaction. If a developer doesn’t want a Container to manage transactions, developer can write own code to maintain the database transaction.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are transaction isolation levels in EJB?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thre are four levels of transaction isolation are:&lt;br /&gt;* Uncommitted Read&lt;br /&gt;* Committed Read&lt;br /&gt;* Repeatable Read&lt;br /&gt;* Serializable&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-4632021818613883502?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/4632021818613883502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=4632021818613883502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/4632021818613883502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/4632021818613883502'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/j2ee-interview-questions.html' title='J2EE Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-6227055881268308140</id><published>2008-04-18T12:12:00.000-07:00</published><updated>2008-04-18T12:36:43.669-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>C/C++ Interview Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do you find out if a linked-list has an end? (i.e. the list is not a cycle)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can find out by using 2 pointers. One of them goes 2 nodes each time. The second one goes at 1 nodes each time. If there is a cycle, the one that goes 2 nodes each time will eventually meet the one that goes slower. If that is the case, then you will know the linked-list is a cycle.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between realloc() and free()?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The free subroutine frees a block of memory previously allocated by the malloc subroutine. Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, no action will occur. The realloc subroutine changes the size of the block of memory pointed to by the Pointer parameter to the number of bytes specified by the Size parameter and returns a new pointer to the block. The pointer specified by the Pointer parameter must have been created with the malloc, calloc, or realloc subroutines and not been deallocated with the free or realloc subroutines. Undefined results occur if the Pointer parameter is not a valid pointer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is function overloading and operator overloading?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This capability is called function overloading. When an overloaded function is called, the C++ compiler selects the proper function by examining the number, types and order of the arguments in the call. Function overloading is commonly used to create several functions of the same name that perform similar tasks but on different data types.&lt;br /&gt;&lt;br /&gt;Operator overloading allows existing C++ operators to be redefined so that they work on objects of user-defined classes. Overloaded operators are syntactic sugar for equivalent function calls. They form a pleasant facade that doesn’t add anything fundamental to the language (but they can improve understandability and reduce maintenance costs).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between declaration and definition?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The declaration tells the compiler that at some later point we plan to present the definition of this declaration.&lt;br /&gt;E.g.: void stars () //function declaration&lt;br /&gt;The definition contains the actual implementation.&lt;br /&gt;E.g.: void stars () // declarator&lt;br /&gt;{&lt;br /&gt;for(int j=10; j &gt; =0; j–) //function body&lt;br /&gt;cout &lt;&lt; *; cout &lt;&lt;&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the advantages of inheritance?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It permits code reusability. Reusability saves time in program development. It encourages the reuse of proven and debugged high-quality software, thus reducing problem after a system becomes functional.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do you write a function that can reverse a linked-list?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;void reverselist(void)&lt;br /&gt;{&lt;br /&gt;if(head==0)&lt;br /&gt;return;&lt;br /&gt;if(head-&gt;next==0)&lt;br /&gt;return;&lt;br /&gt;if(head-&gt;next==tail)&lt;br /&gt;{&lt;br /&gt;head-&gt;next = 0;&lt;br /&gt;tail-&gt;next = head;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;node* pre = head;&lt;br /&gt;node* cur = head-&gt;next;&lt;br /&gt;node* curnext = cur-&gt;next;&lt;br /&gt;head-&gt;next = 0;&lt;br /&gt;cur-&gt; next = head;&lt;br /&gt;&lt;br /&gt;for(; curnext!=0; )&lt;br /&gt;{&lt;br /&gt;cur-&gt;next = pre;&lt;br /&gt;pre = cur;&lt;br /&gt;cur = curnext;&lt;br /&gt;curnext = curnext-&gt;next;&lt;br /&gt;}&lt;br /&gt;curnext-&gt;next = cur;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you mean by inline function?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The idea behind inline functions is to insert the code of a called function at the point where the function is called. If done carefully, this can improve the application’s performance in exchange for increased compile time and possibly (but not always) an increase in the size of the generated binary executables.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Write a program that ask for user input from 5 to 9 then calculate the average&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#include “iostream.h”&lt;br /&gt;int main() {&lt;br /&gt;int MAX = 4;&lt;br /&gt;int total = 0;&lt;br /&gt;int average;&lt;br /&gt;int numb;&lt;br /&gt;for (int i=0; icout &lt;&lt; “Please enter your input between 5 and 9: “; cin &gt;&gt; numb;&lt;br /&gt;while ( numb&lt;5&gt;9) {&lt;br /&gt;cout &lt;&lt; “Invalid input, please re-enter: “; cin &gt;&gt; numb;&lt;br /&gt;}&lt;br /&gt;total = total + numb;&lt;br /&gt;}&lt;br /&gt;average = total/MAX;&lt;br /&gt;cout &lt;&lt; “The average number is: ” &lt;&lt;&gt;return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is public, protected, private?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* Public, protected and private are three access specifiers in C++.&lt;br /&gt;* Public data members and member functions are accessible outside the class.&lt;br /&gt;* Protected data members and member functions are only available to derived classes.&lt;br /&gt;* Private data members and member functions can’t be accessed outside the class. However there is an exception can be using friend classes.&lt;br /&gt;&lt;br /&gt;Write a function that swaps the values of two integers, using int* as the argument type.&lt;br /&gt;void swap(int* a, int*b) {&lt;br /&gt;int t;&lt;br /&gt;t = *a;&lt;br /&gt;*a = *b;&lt;br /&gt;*b = t;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Tell how to check whether a linked list is circular.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Create two pointers, each set to the start of the list. Update each as follows:&lt;br /&gt;while (pointer1) {&lt;br /&gt;pointer1 = pointer1-&gt;next;&lt;br /&gt;pointer2 = pointer2-&gt;next; if (pointer2) pointer2=pointer2-&gt;next;&lt;br /&gt;if (pointer1 == pointer2) {&lt;br /&gt;print (\”circular\n\”);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;OK, why does this work?&lt;/span&gt;&lt;br /&gt;If a list is circular, at some point pointer2 will wrap around and be either at the item just before pointer1, or the item before that. Either way, it’s either 1 or 2 jumps until they meet.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is polymorphism?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Polymorphism is the idea that a base class can be inherited by several classes. A base class pointer can point to its child class and a base class array can store different child class objects.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is virtual constructors/destructors?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Virtual destructors:&lt;/span&gt;&lt;br /&gt;If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching the pointer type) is called on the object.&lt;br /&gt;There is a simple solution to this problem declare a virtual base-class destructor.&lt;br /&gt;This makes all derived-class destructors virtual even though they don’t have the same name as the base-class destructor. Now, if the object in the hierarchy is destroyed explicitly by applying the delete operator to a base-class pointer to a derived-class object, the destructor for the appropriate class is called. Virtual constructor: Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Virtual destructors:&lt;/span&gt; If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching the pointer type) is called on the object.&lt;br /&gt;There is a simple solution to this problem – declare a virtual base-class destructor. This makes all derived-class destructors virtual even though they don’t have the same name as the base-class destructor. Now, if the object in the hierarchy is destroyed explicitly by applying the delete operator to a base-class pointer to a derived-class object, the destructor for the appropriate class is called.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Virtual constructor: &lt;/span&gt;Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Does c++ support multilevel and multiple inheritance?&lt;/span&gt;&lt;br /&gt;Yes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the advantages of inheritance?&lt;/span&gt;&lt;br /&gt;• It permits code reusability.&lt;br /&gt;• Reusability saves time in program development.&lt;br /&gt;• It encourages the reuse of proven and debugged high-quality software, thus reducing problem after a system becomes functional.&lt;br /&gt;What is the difference between declaration and definition?&lt;br /&gt;The declaration tells the compiler that at some later point we plan to present the definition of this declaration.&lt;br /&gt;E.g.: void stars () //function declaration&lt;br /&gt;The definition contains the actual implementation.&lt;br /&gt;E.g.: void stars () // declarator&lt;br /&gt;{&lt;br /&gt;for(int j=10; j&gt;=0; j–) //function body&lt;br /&gt;cout&lt;&lt;”*”; cout&lt;  &lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between an ARRAY and a LIST?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1&lt;/span&gt;&lt;br /&gt;Array is collection of homogeneous elements.&lt;br /&gt;List is collection of heterogeneous elements.&lt;br /&gt;&lt;br /&gt;For Array memory allocated is static and continuous.&lt;br /&gt;For List memory allocated is dynamic and Random.&lt;br /&gt;&lt;br /&gt;Array: User need not have to keep in track of next memory allocation.&lt;br /&gt;List: User has to keep in Track of next location where memory is allocated.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2&lt;/span&gt;&lt;br /&gt;Array uses direct access of stored members, list uses sequencial access for members.&lt;br /&gt;&lt;br /&gt;//With Array you have direct access to memory position 5&lt;br /&gt;Object x = a[5]; // x takes directly a reference to 5th element of array&lt;br /&gt;&lt;br /&gt;//With the list you have to cross all previous nodes in order to get the 5th node:&lt;br /&gt;list mylist;&lt;br /&gt;list::iterator it;&lt;br /&gt;&lt;br /&gt;for( it = list.begin() ; it != list.end() ; it++ )&lt;br /&gt;{&lt;br /&gt;if( i==5)&lt;br /&gt;{&lt;br /&gt;x = *it;&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;i++;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a template?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Templates allow to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until certain point they fulfill the functionality of a macro. Its prototype is any of the two following ones:&lt;br /&gt;&lt;br /&gt;template function_declaration; template function_declaration;&lt;br /&gt;&lt;br /&gt;The only difference between both prototypes is the use of keyword class or typename, its use is indistinct since both expressions have exactly the same meaning and behave exactly the same way.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. new() and malloc()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1&lt;/span&gt;&lt;br /&gt;1.) “new and delete” are preprocessors while “malloc() and free()” are functions. [we dont use brackets will calling new or delete].&lt;br /&gt;2.) no need of allocate the memory while using “new” but in “malloc()” we have to use “sizeof()”.&lt;br /&gt;3.) “new” will initlize the new memory to 0 but “malloc()” gives random value in the new alloted memory location [better to use calloc()]&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2&lt;/span&gt;&lt;br /&gt;new() allocates continous space for the object instace&lt;br /&gt;malloc() allocates distributed space.&lt;br /&gt;new() is castless, meaning that allocates memory for this specific type,&lt;br /&gt;malloc(), calloc() allocate space for void * that is cated to the specific class type pointer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between class and structure?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also. The major difference is that all declarations inside a structure are by default public.&lt;br /&gt;Class: Class is a successor of Structure. By default all the members inside the class are private.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is RTTI?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Runtime type identification (RTTI) lets you find the dynamic type of an object when you have only a pointer or a reference to the base type. RTTI is the official way in standard C++ to discover the type of an object and to convert the type of a pointer or reference (that is, dynamic typing). The need came from practical experience with C++. RTTI replaces many homegrown versions with a solid, consistent approach.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is encapsulation?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Packaging an object’s variables within its methods is called encapsulation.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Explain term POLIMORPHISM and give an example using eg. SHAPE object: If I have a base class SHAPE, how would I define DRAW methods for two objects CIRCLE and SQUARE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1&lt;/span&gt;&lt;br /&gt;POLYMORPHISM : A phenomenon which enables an object to react differently to the same function call.&lt;br /&gt;in C++ it is attained by using a keyword virtual&lt;br /&gt;&lt;br /&gt;Example&lt;br /&gt;public class SHAPE&lt;br /&gt;{&lt;br /&gt;public virtual void SHAPE::DRAW()=0;&lt;br /&gt;}&lt;br /&gt;Note here the function DRAW() is pure virtual which means the sub classes must implement the DRAW() method and SHAPE cannot be instatiated&lt;br /&gt;&lt;br /&gt;public class CIRCLE::public SHAPE&lt;br /&gt;{&lt;br /&gt;public void CIRCLE::DRAW()&lt;br /&gt;{&lt;br /&gt;// TODO drawing circle&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;public class SQUARE::public SHAPE&lt;br /&gt;{&lt;br /&gt;public void SQUARE::DRAW()&lt;br /&gt;{&lt;br /&gt;// TODO drawing square&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;now from the user class the calls would be like&lt;br /&gt;globally&lt;br /&gt;SHAPE *newShape;&lt;br /&gt;&lt;br /&gt;When user action is to draw&lt;br /&gt;public void MENU::OnClickDrawCircle(){&lt;br /&gt;newShape = new CIRCLE();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void MENU::OnClickDrawCircle(){&lt;br /&gt;newShape = new SQUARE();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;the when user actually draws&lt;br /&gt;public void CANVAS::OnMouseOperations(){&lt;br /&gt;newShape-&gt;DRAW();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2&lt;/span&gt;&lt;br /&gt;class SHAPE{&lt;br /&gt;public virtual Draw() = 0; //abstract class with a pure virtual method&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;class CIRCLE{&lt;br /&gt;public int r;&lt;br /&gt;public virtual Draw() { this-&gt;drawCircle(0,0,r); }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;class SQURE&lt;br /&gt;public int a;&lt;br /&gt;public virtual Draw() { this-&gt;drawRectangular(0,0,a,a); }&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Each object is driven down from SHAPE implementing Draw() function in its own way.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an object?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Object is a software bundle of variables and related methods. Objects have state and behavior.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How can you tell what shell you are running on UNIX system?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can do the Echo $RANDOM. It will return a undefined variable if you are from the C-Shell, just a return prompt if you are from the Bourne shell, and a 5 digit random numbers if you are from the Korn shell. You could also do a ps -l and look for the shell with the highest PID.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Describe PRIVATE, PROTECTED and PUBLIC – the differences and give examples.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;class Point2D{&lt;br /&gt;int x; int y;&lt;br /&gt;public int color;&lt;br /&gt;protected bool pinned;&lt;br /&gt;public Point2D() : x(0) , y(0) {} //default (no argument) constructor&lt;br /&gt;};&lt;br /&gt;Point2D MyPoint;&lt;br /&gt;You cannot directly access private data members when they are declared (implicitly) private:&lt;br /&gt;MyPoint.x = 5; // Compiler will issue a compile ERROR&lt;br /&gt;//Nor yoy can see them:&lt;br /&gt;int x_dim = MyPoint.x; // Compiler will issue a compile ERROR&lt;br /&gt;On the other hand, you can assign and read the public data members:&lt;br /&gt;MyPoint.color = 255; // no problem&lt;br /&gt;int col = MyPoint.color; // no problem&lt;br /&gt;With protected data members you can read them but not write them: MyPoint.pinned = true; // Compiler will issue a compile ERROR&lt;br /&gt;bool isPinned = MyPoint.pinned; // no problem&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is namespace?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Namespaces allow us to group a set of global classes, objects and/or functions under a name. To say it somehow, they serve to split the global scope in sub-scopes known as namespaces.&lt;br /&gt;The form to use namespaces is:&lt;br /&gt;namespace identifier { namespace-body }&lt;br /&gt;Where identifier is any valid identifier and namespace-body is the set of classes, objects and functions that are included within the namespace. For example:&lt;br /&gt;namespace general { int a, b; } In this case, a and b are normal variables integrated within the general namespace. In order to access to these variables from outside the namespace we have to use the scope operator ::. For example, to access the previous variables we would have to put:&lt;br /&gt;general::a general::b&lt;br /&gt;The functionality of namespaces is specially useful in case that there is a possibility that a global object or function can have the same name than another one, causing a redefinition error.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you mean by inheritance?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Inheritance is the process of creating new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class, but can add embellishments and refinements of its own.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a COPY CONSTRUCTOR and when is it called?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A copy constructor is a method that accepts an object of the same class and copies it’s data members to the object on the left part of assignement:&lt;br /&gt;class Point2D{&lt;br /&gt;int x; int y;&lt;br /&gt;public int color;&lt;br /&gt;protected bool pinned;&lt;br /&gt;public Point2D() : x(0) , y(0) {} //default (no argument) constructor&lt;br /&gt;public Point2D( const Point2D &amp;amp; ) ;&lt;br /&gt;};&lt;br /&gt;Point2D::Point2D( const Point2D &amp;amp; p )&lt;br /&gt;{&lt;br /&gt;this-&gt;x = p.x;&lt;br /&gt;this-&gt;y = p.y;&lt;br /&gt;this-&gt;color = p.color;&lt;br /&gt;this-&gt;pinned = p.pinned;&lt;br /&gt;}&lt;br /&gt;main(){&lt;br /&gt;Point2D MyPoint;&lt;br /&gt;MyPoint.color = 345;&lt;br /&gt;Point2D AnotherPoint = Point2D( MyPoint ); // now AnotherPoint has color = 345&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is Boyce Codd Normal form?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form a-&gt; , where a and b is a subset of R, at least one of the following holds:&lt;br /&gt;* a- &gt; b is a trivial functional dependency (b is a subset of a)&lt;br /&gt;* a is a superkey for schema R&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is virtual class and friend class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Friend classes are used when two or more classes are designed to work together and need access to each other’s implementation in ways that the rest of the world shouldn’t be allowed to have. In other words, they help keep private things private. For instance, it may be desirable for class DatabaseCursor to have more privilege to the internals of class Database than main() has.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;virtual&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you mean by binding of data and functions?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Encapsulation.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are 2 ways of exporting a function from a DLL?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1.Taking a reference to the function from the DLL instance.&lt;br /&gt;2. Using the DLL ’s Type Library.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between an object and a class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.&lt;br /&gt;- A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don’t change.&lt;br /&gt;- The class to which an object belongs is also (usually) static. If a particular object belongs to a certain class at the time that it is created then it almost certainly will still belong to that class right up until the time that it is destroyed.&lt;br /&gt;- An Object on the other hand has a limited lifespan. Objects are created and eventually destroyed. Also during that lifetime, the attributes of the object may undergo significant change.&lt;br /&gt;&lt;br /&gt;Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].&lt;br /&gt;&lt;br /&gt;quicksort ((data + 222), 100);&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is friend function?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its private and protected members. A friend function is not a member of the class. But it must be listed in the class definition.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Mergesort always makes recursive calls to sort subarrays that are about half size of the original array, resulting in O(n log n) time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is abstraction?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Abstraction is of the process of hiding unwanted details from the user.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are virtual functions?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually of the derived class, even if the object is accessed by a base pointer rather than a derived pointer. This allows algorithms in the base class to be replaced in the derived class, even if users don’t know about the derived class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;An internal iterator is implemented with member functions of the class that has items to step through. An external iterator is implemented as a separate class that can be “attach” to the object that has items to step through. .An external iterator has the advantage that many difference iterators can be active simultaneously on the same object.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a scope resolution operator?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A scope resolution operator (::), can be used to define the member functions of a class outside the class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you mean by pure virtual functions?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A pure virtual member function is a member function that the base class forces derived classes to provide. Normally these member functions have no implementation. Pure virtual functions are equated to zero.&lt;br /&gt;&lt;br /&gt;class Shape { public: virtual void draw() = 0; };&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is polymorphism? Explain with an example?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;“Poly” means “many” and “morph” means “form”. Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of object.&lt;br /&gt;Example: function overloading, function overriding, virtual functions. Another example can be a plus ‘+’ sign, used for adding two integers or for using it to concatenate two strings.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How can you quickly find the number of elements stored in a a) static array b) dynamic array ?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why is it difficult to store linked list in an array?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How can you find the nodes with repetetive data in a linked list?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Write a prog to accept a given string in any order and flash error if any of the character is different. For example : If abc is the input then abc, bca, cba, cab bac are acceptable but aac or bcd are unacceptable.&lt;br /&gt;Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What’s the output of the following program? Why?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;typedef union&lt;br /&gt;{&lt;br /&gt;int a;&lt;br /&gt;char b[10];&lt;br /&gt;float c;&lt;br /&gt;}&lt;br /&gt;Union;&lt;br /&gt;Union x,y = {100};&lt;br /&gt;x.a = 50;&lt;br /&gt;strcpy(x.b,\”hello\”);&lt;br /&gt;x.c = 21.50;&lt;br /&gt;printf(\”Union x : %d %s %f \n\”,x.a,x.b,x.c );&lt;br /&gt;printf(\”Union y :%d %s%f \n\”,y.a,y.b,y.c);&lt;br /&gt;}&lt;br /&gt;Given inputs X, Y, Z and operations | and &amp;amp; (meaning bitwise OR and AND, respectively)&lt;br /&gt;What is output equal to in&lt;br /&gt;&lt;br /&gt;output = (X &amp;amp; Y) | (X &amp;amp; Z) | (Y &amp;amp; Z)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why are arrays usually processed with for loop?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The real power of arrays comes from their facility of using an index variable to traverse the array, accessing each element with the same expression a[i]. All the is needed to make this work is a iterated statement in which the variable i serves as a counter, incrementing from 0 to a.length -1. That is exactly what a loop does.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an HTML tag?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;An HTML tag is a syntactical construct in the HTML language that abbreviates specific instructions to be executed when the HTML script is loaded into a Web browser. It is like a method in Java, a function in C++, a procedure in Pascal, or a subroutine in FORTRAN.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What problems might the following macro bring to the application?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#define sq(x) x*x&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Anything wrong with this code?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;T *p = new T[10];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;delete p;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Everything is correct, Only the first element of the array will be deleted”, The entire array will be deleted, but only the first element destructor will be called.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Anything wrong with this code?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;T *p = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;delete p;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes, the program will crash in an attempt to delete a null pointer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do you decide which integer type to use?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It depends on our requirement. When we are required an integer to be stored in 1 byte (means less than or equal to 255) we use short int, for 2 bytes we use int, for 8 bytes we use long int.&lt;br /&gt;A char is for 1-byte integers, a short is for 2-byte integers, an int is generally a 2-byte or 4-byte integer (though not necessarily), a long is a 4-byte integer, and a long long is a 8-byte integer.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What’s the best way to declare and define global variables?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The best way to declare global variables is to declare them after including all the files so that it can be used in all the functions.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What does extern mean in a function declaration?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using extern in a function declaration we can make a function such that it can used outside the file in which it is defined.&lt;br /&gt;An extern variable, function definition, or declaration also makes the described variable or function usable by the succeeding part of the current source file. This declaration does not replace the definition. The declaration is used to describe the variable that is externally defined.&lt;br /&gt;If a declaration for an identifier already exists at file scope, any extern declaration of the same identifier found within a block refers to that same object. If no other declaration for the identifier exists at file scope, the identifier has external linkage.&lt;br /&gt;&lt;br /&gt;What can I safely assume about the initial values of variables which are not explicitly initialized?&lt;br /&gt;&lt;br /&gt;It depends on complier which may assign any garbage value to a variable if it is not initialized.&lt;br /&gt;&lt;br /&gt;What is the difference between char a[] = “string”; and char *p = “string”;?&lt;br /&gt;&lt;br /&gt;In the first case 6 bytes are allocated to the variable a which is fixed, where as in the second case if *p is assigned to some other value the allocate memory can change.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What’s the auto keyword good for?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1&lt;/span&gt;&lt;br /&gt;Not much. It declares an object with automatic storage duration. Which means the object will be destroyed at the end of the objects scope. All variables in functions that are not declared as static and not dynamically allocated have automatic storage duration by default.&lt;br /&gt;For example&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;int a; //this is the same as writing “auto int a;”&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2&lt;/span&gt;&lt;br /&gt;Local variables occur within a scope; they are “local” to a function. They are often called automatic variables because they automatically come into being when the scope is entered and automatically go away when the scope closes. The keyword auto makes this explicit, but local variables default to auto auto auto auto so it is never necessary to declare something as an auto auto auto auto.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between char a[] = “string”; and char *p = “string”; ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1&lt;/span&gt;&lt;br /&gt;a[] = “string”;&lt;br /&gt;char *p = “string”;&lt;br /&gt;&lt;br /&gt;The difference is this:&lt;br /&gt;p is pointing to a constant string, you can never safely say&lt;br /&gt;p[3]=’x’;&lt;br /&gt;however you can always say a[3]=’x’;&lt;br /&gt;char a[]=”string”; - character array initialization.&lt;br /&gt;char *p=”string” ; - non-const pointer to a const-string.( this is permitted only in the case of char pointer in C++ to preserve backward compatibility with C.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2&lt;/span&gt;&lt;br /&gt;a[] = “string”;&lt;br /&gt;char *p = “string”;&lt;br /&gt;a[] will have 7 bytes. However, p is only 4 bytes. P is pointing to an adress is either BSS or the data section (depending on which compiler — GNU for the former and CC for the latter).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer3&lt;/span&gt;&lt;br /&gt;char a[] = “string”;&lt;br /&gt;char *p = “string”;&lt;br /&gt;&lt;br /&gt;for char a[]…….using the array notation 7 bytes of storage in the static memory block are taken up, one for each character and one for the terminating nul character.&lt;br /&gt;But, in the pointer notation char *p………….the same 7 bytes required, plus N bytes to store the pointer variable “p” (where N depends on the system but is usually a minimum of 2 bytes and can be 4 or more)……&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1&lt;/span&gt;&lt;br /&gt;If you want the code to be even slightly readable, you will use typedefs.&lt;br /&gt;typedef char* (*functiontype_one)(void);&lt;br /&gt;typedef functiontype_one (*functiontype_two)(void);&lt;br /&gt;functiontype_two myarray[N]; //assuming N is a const integral&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2&lt;/span&gt;&lt;br /&gt;char* (* (*a[N])())()&lt;br /&gt;Here a is that array. And according to question no function will not take any parameter value.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What does extern mean in a function declaration?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It tells the compiler that a variable or a function exists, even if the compiler hasn’t yet seen it in the file currently being compiled. This variable or function may be defined in another file or further down in the current file.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do I initialize a pointer to a function?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is the way to initialize a pointer to a function&lt;br /&gt;void fun(int a)&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;void (*fp)(int);&lt;br /&gt;fp=fun;&lt;br /&gt;fp(1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do you link a C++ program to C functions?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;By using the extern “C” linkage specification around the C function declarations.&lt;br /&gt;&lt;br /&gt;Explain the scope resolution operator.&lt;br /&gt;&lt;br /&gt;It permits a program to reference an identifier in the global scope that has been hidden by another identifier with the same name in the local scope.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the differences between a C++ struct and C++ class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The default member and base-class access specifiers are different.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How many ways are there to initialize an int with a constant?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Two.&lt;br /&gt;There are two formats for initializers in C++ as shown in the example that follows. The first format uses the traditional C notation. The second format uses constructor notation.&lt;br /&gt;int foo = 123;&lt;br /&gt;int bar (123);&lt;br /&gt;&lt;br /&gt;How does throwing and catching exceptions differ from using setjmp and longjmp?&lt;br /&gt;&lt;br /&gt;The throw operation calls the destructors for automatic objects instantiated since entry to the try block.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a default constructor?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Default constructor WITH arguments class B { public: B (int m = 0) : n (m) {} int n; }; int main(int argc, char *argv[]) { B b; return 0; }&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a conversion constructor?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A constructor that accepts one argument of a different type.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between a copy constructor and an overloaded assignment operator?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A copy constructor constructs a new object by using the content of the argument object. An overloaded assignment operator assigns the contents of an existing object to another existing object of the same class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;When should you use multiple inheritance?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are three acceptable answers: “Never,” “Rarely,” and “When the problem domain cannot be accurately modeled any other way.”&lt;br /&gt;&lt;br /&gt;Explain the ISA and HASA class relationships. How would you implement each in a class design?&lt;br /&gt;&lt;br /&gt;A specialized class “is” a specialization of another class and, therefore, has the ISA relationship with the other class. An Employee ISA Person. This relationship is best implemented with inheritance. Employee is derived from Person. A class may have an instance of another class. For example, an employee “has” a salary, therefore the Employee class has the HASA relationship with the Salary class. This relationship is best implemented by embedding an object of the Salary class in the Employee class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;When is a template a better solution than a base class?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you are designing a generic class to contain or otherwise manage objects of other types, when the format and behavior of those other types are unimportant to their containment or management, and particularly when those other types are unknown (thus, the genericity) to the designer of the container or manager class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is a mutable member?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One that can be modified by the class even when the object of the class or the member function doing the modification is const.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is an explicit constructor?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. It’s purpose is reserved explicitly for construction.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the Standard Template Library (STL)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A library of container templates approved by the ANSI committee for inclusion in the standard C++ specification.&lt;br /&gt;A programmer who then launches into a discussion of the generic programming model, iterators, allocators, algorithms, and such, has a higher than average understanding of the new technology that STL brings to C++ programming.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Describe run-time type identification.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The ability to determine at run time the type of an object by using the typeid operator or the dynamic_cast operator.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What problem does the namespace feature solve?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The namespace feature surrounds a library’s external declarations with a unique namespace that eliminates the potential for those collisions.&lt;br /&gt;This solution assumes that two library vendors don’t use the same namespace identifier, of course.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Are there any new intrinsic (built-in) data types?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes. The ANSI committee added the bool intrinsic type and its true and false value keywords.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Will the following program execute?&lt;/span&gt;&lt;br /&gt;void main()&lt;br /&gt;{&lt;br /&gt;void *vptr = (void *) malloc(sizeof(void));&lt;br /&gt;vptr++;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1&lt;/span&gt;&lt;br /&gt;It will throw an error, as arithmetic operations cannot be performed on void pointers.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2&lt;/span&gt;&lt;br /&gt;It will not build as sizeof cannot be applied to void* ( error “Unknown size” )&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer3&lt;/span&gt;&lt;br /&gt;How can it execute if it won’t even compile? It needs to be int main, not void main. Also, cannot increment a void *.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer4&lt;/span&gt;&lt;br /&gt;According to gcc compiler it won’t show any error, simply it executes. but in general we can’t do arthematic operation on void, and gives size of void as 1&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer5&lt;/span&gt;&lt;br /&gt;The program compiles in GNU C while giving a warning for “void main”. The program runs without a crash. sizeof(void) is “1? hence when vptr++, the address is incremented by 1.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer6&lt;/span&gt;&lt;br /&gt;Regarding arguments about GCC, be aware that this is a C++ question, not C. So gcc will compile and execute, g++ cannot. g++ complains that the return type cannot be void and the argument of sizeof() cannot be void. It also reports that ISO C++ forbids incrementing a pointer of type ‘void*’.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer7&lt;/span&gt;&lt;br /&gt;in C++&lt;br /&gt;voidp.c: In function `int main()’:&lt;br /&gt;voidp.c:4: error: invalid application of `sizeof’ to a void type&lt;br /&gt;voidp.c:4: error: `malloc’ undeclared (first use this function)&lt;br /&gt;voidp.c:4: error: (Each undeclared identifier is reported only once for each function it appears in.)&lt;br /&gt;voidp.c:6: error: ISO C++ forbids incrementing a pointer of type `void*’&lt;br /&gt;But in c, it work without problems&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;void main()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;char *cptr = 0?2000;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;long *lptr = 0?2000;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;cptr++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;lptr++;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;printf(” %x %x”, cptr, lptr);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;}Will it execute or not?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1&lt;/span&gt;&lt;br /&gt;For Q2: As above, won’t compile because main must return int. Also, 0×2000 cannot be implicitly converted to a pointer (I assume you meant 0×2000 and not 0?2000.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2&lt;/span&gt;&lt;br /&gt;Not Excute.&lt;br /&gt;Compile with VC7 results following errors:&lt;br /&gt;error C2440: ‘initializing’ : cannot convert from ‘int’ to ‘char *’&lt;br /&gt;error C2440: ‘initializing’ : cannot convert from ‘int’ to ‘long *’&lt;br /&gt;Not Excute if it is C++, but Excute in C.&lt;br /&gt;The printout:&lt;br /&gt;2001 2004&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is the difference between Mutex and Binary semaphore?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;semaphore is used to synchronize processes. where as mutex is used to provide synchronization between threads running in the same process.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;In C++, what is the difference between method overloading and method overriding?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Overloading a method (or function) in C++ is the ability for functions of the same name to be defined as long as these methods have different signatures (different set of parameters). Method overriding is the ability of the inherited class rewriting the virtual method of the base class.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What methods can be overridden in Java?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In C++ terminology, all public methods in Java are virtual. Therefore, all Java methods can be overwritten in subclasses except those that are declared final, static, and private.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are the defining traits of an object-oriented language?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The defining traits of an object-oriented langauge are:&lt;br /&gt;* encapsulation&lt;br /&gt;* inheritance&lt;br /&gt;* polymorphism&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Write a program that ask for user input from 5 to 9 then calculate the average&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;int MAX=4;&lt;br /&gt;int total =0;&lt;br /&gt;int average=0;&lt;br /&gt;int numb;&lt;br /&gt;cout&lt;&lt;”Please enter your input from 5 to 9?; cin&gt;&gt;numb;&lt;br /&gt;if((numb &lt;5)&amp;amp;&amp;amp;(numb&gt;9))&lt;br /&gt;cout&lt;&lt;”please re type your input”; else for(i=0;i&lt;=MAX; i++) { total = total + numb; average= total /MAX; } cout&lt;&lt;”The average number is”&lt;&lt;return&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;Assignment Operator - What is the diffrence between a “assignment operator” and a “copy constructor”?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1.&lt;/span&gt;&lt;br /&gt;In assignment operator, you are assigning a value to an existing object. But in copy constructor, you are creating a new object and then assigning a value to that object. For example:&lt;br /&gt;complex c1,c2;&lt;br /&gt;c1=c2; //this is assignment&lt;br /&gt;complex c3=c2; //copy constructor&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2.&lt;/span&gt;&lt;br /&gt;A copy constructor is used to initialize a newly declared variable from an existing variable. This makes a deep copy like assignment, but it is somewhat simpler:&lt;br /&gt;There is no need to test to see if it is being initialized from itself.&lt;br /&gt;There is no need to clean up (eg, delete) an existing value (there is none).&lt;br /&gt;A reference to itself is not returned.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;“mutable” Keyword - What is “mutable”?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1.&lt;/span&gt;&lt;br /&gt;“mutable” is a C++ keyword. When we declare const, none of its data members can change. When we want one of its members to change, we declare it as mutable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2.&lt;/span&gt;&lt;br /&gt;A “mutable” keyword is useful when we want to force a “logical const” data member to have its value modified. A logical const can happen when we declare a data member as non-const, but we have a const member function attempting to modify that data member. For example:&lt;br /&gt;class Dummy {&lt;br /&gt;public:&lt;br /&gt;bool isValid() const;&lt;br /&gt;private:&lt;br /&gt;mutable int size_ = 0;&lt;br /&gt;mutable bool validStatus_ = FALSE;&lt;br /&gt;// logical const issue resolved&lt;br /&gt;};&lt;br /&gt;bool Dummy::isValid() const&lt;br /&gt;// data members become bitwise const&lt;br /&gt;{&lt;br /&gt;if (size &gt; 10) {&lt;br /&gt;validStatus_ = TRUE; // fine to assign&lt;br /&gt;size = 0; // fine to assign&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2.&lt;/span&gt;&lt;br /&gt;“mutable” keyword in C++ is used to specify that the member may be updated or modified even if it is member of constant object. Example:&lt;br /&gt;class Animal {&lt;br /&gt;private:&lt;br /&gt;string name;&lt;br /&gt;string food;&lt;br /&gt;mutable int age;&lt;br /&gt;public:&lt;br /&gt;void set_age(int a);&lt;br /&gt;};&lt;br /&gt;void main() {&lt;br /&gt;const Animal Tiger(â€™Fulffyâ€™,’antelopeâ€™,1);&lt;br /&gt;Tiger.set_age(2);&lt;br /&gt;// the age can be changed since its mutable&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;RTTI - What is RTTI?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer1.&lt;/span&gt;&lt;br /&gt;RTTI stands for “Run Time Type Identification”. In an inheritance hierarchy, we can find out the exact type of the objet of which it is member. It can be done by using:&lt;br /&gt;1) dynamic id operator&lt;br /&gt;2) typecast operator&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer2.&lt;/span&gt;&lt;br /&gt;RTTI is defined as follows: Run Time Type Information, a facility that allows an object to be queried at runtime to determine its type. One of the fundamental principles of object technology is polymorphism, which is the ability of an object to dynamically change at runtime.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;STL Containers - What are the types of STL containers?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are 3 types of STL containers:&lt;br /&gt;1. Adaptive containers like queue, stack&lt;br /&gt;2. Associative containers like set, map&lt;br /&gt;3. Sequence containers like vector, deque&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Virtual Destructor - What is the need for â€œVirtual Destructor?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Destructors are declared as virtual because if do not declare it as virtual the base class destructor will be called before the derived class destructor and that will lead to memory leak because derived classâ€™s objects will not get freed.Destructors are declared virtual so as to bind objects to the methods at runtime so that appropriate destructor is called.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Differences of C and C++&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Could you write a small program that will compile in C but not in C++?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In C, if you can a const variable e.g.&lt;br /&gt;const int i = 2;&lt;br /&gt;you can use this variable in other module as follows&lt;br /&gt;extern const int i;&lt;br /&gt;C compiler will not complain.&lt;br /&gt;&lt;br /&gt;But for C++ compiler u must write&lt;br /&gt;extern const int i = 2;&lt;br /&gt;else error would be generated.&lt;br /&gt;&lt;br /&gt;Bitwise Operations - Given inputs X, Y, Z and operations | and &amp;amp; (meaning bitwise OR and AND, respectively), what is output equal to in?&lt;br /&gt;output = (X &amp;amp; Y) | (X &amp;amp; Z) | (Y &amp;amp; Z);&lt;br /&gt;&lt;/return&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-6227055881268308140?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/6227055881268308140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=6227055881268308140' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6227055881268308140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/6227055881268308140'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/cc-interview-questions.html' title='C/C++ Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-2788297398870169636</id><published>2008-04-18T11:56:00.000-07:00</published><updated>2008-04-18T12:12:06.511-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C/C++ Preparation Kit'/><title type='text'>C Interview Questions</title><content type='html'>&lt;ol style="text-align: justify;"&gt;&lt;li&gt;What does static variable mean?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is a pointer?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is a structure?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What are the differences between structures and arrays?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;In header files whether functions are declared or defined?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What are the differences between malloc() and calloc()?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What are macros? What are the advantages and disadvantages?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Difference between pass by reference and pass by value?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is static identifier?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Where are the auto variables stored?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Where does global, static, local, register variables, free memory and C Program instructions get stored?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Difference between arrays and linked list?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What are enumerations?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Describe about storage allocation and scope of global, extern, static, local and register variables?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What are register variables? What are the advantage of using register variables?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is the use of typedef?&lt;/li&gt;&lt;li&gt;Can we specify variable field width in a scanf() format string? If possible how?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Out of fgets() and gets() which function is safe to use and why?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Difference between strdup and strcpy?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is recursion?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Differentiate between a for loop and a while loop? What are it uses?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What are the different storage classes in C?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is difference between Structure and Unions?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What the advantages of using Unions?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What are the advantages of using pointers in a program?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is the difference between Strings and Arrays?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;In a header file whether functions are declared or defined?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is a far pointer? where we use it?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How will you declare an array of three function pointers where each function receives two ints and returns a float?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is a NULL Pointer? Whether it is same as an uninitialized pointer?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What does the error 'Null Pointer Assignment' mean and what causes this error?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is near, far and huge pointers? How many bytes are occupied by them?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you obtain segment and offset addresses from a far address of a memory location?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Are the expressions arr and *arr same for an array of integers?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Does mentioning the array name gives the base address in all the contexts?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Explain one method to process an entire string as one unit?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is the similarity between a Structure, Union and enumeration?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Can a Structure contain a Pointer to itself?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How can we check whether the contents of two structure variables are same or not?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How are Structure passing and returning implemented by the complier?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How can we read/write Structures from/to data files?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is the difference between an enumeration and a set of pre-processor # defines?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What do the 'c' and 'v' in argc and argv stand for?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Are the variables argc and argv are local to main?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is the maximum combined length of command line arguments including the space between adjacent arguments?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What are bit fields? What is the use of bit fields in a Structure declaration?&lt;br /&gt;To which numbering system can the binary number 1101100100111100 be easily converted to?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Which bit wise operator is suitable for checking whether a particular bit is on or off?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Which bit wise operator is suitable for turning off a particular bit in a number?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Which bit wise operator is suitable for putting on a particular bit in a number?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Which bit wise operator is suitable for checking whether a particular bit is on or off?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Which one is equivalent to multiplying by 2?&lt;br /&gt;        * Left shifting a number by 1&lt;br /&gt;        * Left shifting an unsigned int or char by 1?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write a program to compare two strings without using the strcmp() function.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write a program to concatenate two strings.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write a program to interchange 2 variables without using the third one.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write programs for String Reversal. The same for Palindrome check.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write a program to find the Factorial of a number.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write a program to generate the Fibonacci Series?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write a program which employs Recursion?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write a program which uses command line arguments.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Write a program which uses functions like strcmp(), strcpy(), etc.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What are the advantages of using typedef in a program?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you dynamically allocate a one-dimensional and two-dimensional array of integers?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How can you increase the size of a dynamically allocated array?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How can you increase the size of a statically allocated array?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Which function should be used to free the memory allocated by calloc()?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How much maximum can you allocate in a single call to malloc()?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Can you dynamically allocate arrays in expanded memory?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is object file? How can you access object file?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Which header file should you include if you are to develop a function which can accept variable number of arguments?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Can you write a function similar to printf()?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How can a called function determine the number of arguments that have been passed to it?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Can there be at least some solution to determine the number of arguments passed to a variable argument list function?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How do you declare the following:&lt;br /&gt;        * An array of three pointers to chars&lt;br /&gt;        * An array of three char pointers&lt;br /&gt;        * A pointer to array of three chars&lt;br /&gt;        * A pointer to function which receives an int pointer and returns a float pointer&lt;br /&gt;        * A pointer to a function which receives nothing and returns nothing&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What do the functions atoi(), itoa() and gcvt() do?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Does there exist any other function which can be used to convert an integer or a float to a string?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you use qsort() function to sort an array of structures?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you use qsort() function to sort the name stored in an array of pointers to string?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you use bsearch() function to search a name stored in array of pointers to string?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you use the functions sin(), pow(), sqrt()?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you use the functions memcpy(), memset(), memmove()?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you use the functions fseek(), freed(), fwrite() and ftell()?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you obtain the current time and difference between two times?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you use the functions randomize() and random()?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How would you implement a substr() function that extracts a sub string from a given string?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is the difference between the functions rand(), random(), srand() and randomize()?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is the difference between the functions memmove() and memcpy()?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How do you print a string on the printer?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Can you use the function fprintf() to display the output on the screen?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is a linklist and why do we use it when we have arrays? - I feel the correct answer should be linklist is used in cases where you don't know the memory required to store a data structure and need to allocate is dynamically on demand.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;How do you detect a loop in linked list?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What is the difference between main() in C and main() in C++?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ajz at his interviews asks what will be printed out when the following code is executed:&lt;br /&gt;        main()&lt;br /&gt;        {&lt;br /&gt;        printf("%x",-1&lt;&lt;4);&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-2788297398870169636?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/2788297398870169636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=2788297398870169636' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2788297398870169636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2788297398870169636'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/c-interview-questions.html' title='C Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-2765164937145319591</id><published>2008-04-18T11:23:00.000-07:00</published><updated>2008-04-18T11:41:48.266-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interview Questions'/><title type='text'>Most Common Interview Questions</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_91tt1egoisU/SAjrIW2VnbI/AAAAAAAAABw/5q7dRELfGZ0/s1600-h/72.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://1.bp.blogspot.com/_91tt1egoisU/SAjrIW2VnbI/AAAAAAAAABw/5q7dRELfGZ0/s320/72.jpg" alt="" id="BLOGGER_PHOTO_ID_5190657099349466546" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;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.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Be confident and positive&lt;/span&gt;&lt;br /&gt;One of the best ways to get confidence before a job interview is to formulate answers to the common questions and practice many times before interview.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Different types of questions&lt;/span&gt;&lt;br /&gt;There are different types of interview questions that you can expect at the time of interview. However, becoming familiar with various types of categories will help you to understand what the interviewer is looking for. Different types of questions are: Behavioral questions, Hypothetical questions and Stress questions.&lt;br /&gt;&lt;br /&gt;Behavioral questions determine if you have desired skills for the job. Hypothetical questions require handling different types of situations. Stress questions are designed to test your sense of humor.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Here are a few job interview questions you might want to rehearse:&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why have you applied for this job?&lt;/span&gt;&lt;br /&gt;Think carefully and mention the positive aspects that have attracted you to joining the company. Tell them about your relevant qualifications and experiences you have already possessed for this job. You can also explain that how this position and company suit your needs and expectations.&lt;br /&gt;You could say: "I am looking for a role that helps utilizing my skills, work experience and knowledge to make a difference."&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Can you talk through your resume?&lt;/span&gt;&lt;br /&gt;Use this opportunity to give your professional experience in detail. Grab the chance and present the employer list of your achievements, greatest talents and accomplishments. Remember never say negative about your past companies or bosses.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Where would you like to see yourself five years down the line?&lt;br /&gt;&lt;/span&gt;In this question the interviewer is looking to see that how dedicated you are to the job and the company. Even if you really do not know where would you be in five years, never say, I don't know.&lt;br /&gt;You could say: I exactly don't know but I hope that the skills and experience gained will help the company reach its goals.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are your strengths?&lt;br /&gt;&lt;/span&gt;This is your chance to sell yourself. Stress on skills and experience that are relevant to the post. Tell them your ability to work under pressure, inquisitiveness to learn new things, quick learning ability and good interpersonal skills.&lt;br /&gt;Give examples to prove you to be meticulous, cooperative and result oriented.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is your weakness?&lt;br /&gt;&lt;/span&gt;This is a very popular question. Be confident while answering this question and turn your weakness into your strength. Pick a weakness that is harmless to your job. For example emotional nature, never want to be a loser, highly ambitious, etc.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you look for in a job?&lt;br /&gt;&lt;/span&gt;You can frame your answer like: "I am looking for opportunities that helps me to grow as a professional and enables me to serve the organization."&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Cite an example when you have had to take initiative?&lt;br /&gt;&lt;/span&gt;This is an opportunity to prove that you have quick learning abilities, make the best impression in all conditions and work effectively with staff members for achieving goals.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How do you get along with your colleagues?&lt;br /&gt;&lt;/span&gt;In this question the interviewer wants to know your compatibility with your co-workers. Stress on points that show you are able to build strong working relationships and strong teams to meet goals.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How would your coworkers describe you?&lt;br /&gt;&lt;/span&gt;This is a chance to use encouraging and praising words to describe you. Use words like a good team leader, excellent communication skills, truthful, decisive and sensible.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;How reliable you were?&lt;br /&gt;&lt;/span&gt;The interviewer wants to know that how you work on deadlines and how you come up with new ideas in a limited time to solve a specific problem.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What are your salary requirements?&lt;br /&gt;&lt;/span&gt;Be careful to answer this question you should know market value of the job you have applied. You could also say that you are expecting a salary based on your job responsibilities, work experience, skills and market value. But if you have a specific salary package in your mind go for it.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why do you want to work for this company?&lt;br /&gt;&lt;/span&gt;Stress the positive aspects of the target company. It is always good to research the company in depth before interview. Talk about company turnover, products, policies, services, etc.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you know about this company?&lt;br /&gt;&lt;/span&gt;You would be surprised at the number of candidates who turn up for interviews with very less or no information about the company. It is important that you should gather information about the company. Collect all information on company's share, turnover, etc.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Have you been interviewing for other jobs?&lt;br /&gt;&lt;/span&gt;Say yes but also add:  "I have given first choice to your company."&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What has been your greatest professional achievement so far?&lt;br /&gt;&lt;/span&gt;Use this question as an opportunity to explain your most rewarding achievement.&lt;br /&gt;Talk about substantial contribution, team achievement, unique expertise, etc.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(153, 0, 0); font-weight: bold;"&gt;How do you prioritize various activities?&lt;br /&gt;&lt;/span&gt;Often you might be in a position to decide on which activity to accomplish first. Respond this question by saying how you set priorities between urgent and important.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What motivates you to give your best?&lt;br /&gt;&lt;/span&gt;This is not the time to say money, even if it is. You could be motivated by recognition for a good job done.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What do you think of your boss?&lt;br /&gt;&lt;/span&gt;Tell them about your boss good points. If you do not like your boss even though don't say negative, find something good to say.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What is your code of conduct?&lt;br /&gt;&lt;/span&gt;You must be aware of the sense of rightness, fairness and goodness that are defined within the company. Instead of defining guidelines for conduct, you should define yourself as an all rounder candidate who loves to work and enjoys the challenges.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;When would you start work?&lt;br /&gt;&lt;/span&gt;No hard and fast rule in your answer. Ask for 1 or 2 weeks grace period before starting your new job so that you would start your work without any hurdles.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Can you tell me something about yourself?&lt;br /&gt;&lt;/span&gt;It is the most common question. Be prepared to answer this question in about two minutes. Stress on the relevant facts about your education, career, work experience, skills and personal and professional life. Don't forget to answer briefly and honestly.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why do you think this job is good for you?&lt;br /&gt;&lt;/span&gt;This is your chance to prove yourself. Tell about additional experiences and qualifications you have possessed which are relevant to the job.&lt;br /&gt;You can also say: "I would like a role that gives me an opportunity to serve the company, the society and above all, my nation."&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Do you have any questions for me?&lt;br /&gt;&lt;/span&gt;Don't forget to ask a question because it shows that you are interested in this job. You may ask anything about company and job you are applying for.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;Why do you want to leave your current job?&lt;br /&gt;&lt;/span&gt;Be very careful to answer this tricky question. Don't mention anything negative about your current company or employer and not to sound angry or rude.&lt;br /&gt;&lt;br /&gt;For example instead of saying "I do get more challenges in my current job" respond, "I am keen to get more challenges and chances to prove myself."&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; color: rgb(153, 0, 0);"&gt;What experience do you have?&lt;br /&gt;&lt;/span&gt;Tell them your experience related to the company's concerns. Try to give examples to describe your job responsibilities. If you do not have relevant experience, you can mention about your training programs, skills and show them how customer service experience can be applied to management positions.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8752774920344563789-2765164937145319591?l=knowledge-page.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowledge-page.blogspot.com/feeds/2765164937145319591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8752774920344563789&amp;postID=2765164937145319591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2765164937145319591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8752774920344563789/posts/default/2765164937145319591'/><link rel='alternate' type='text/html' href='http://knowledge-page.blogspot.com/2008/04/most-common-interview-questions.html' title='Most Common Interview Questions'/><author><name>admin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_91tt1egoisU/SAjrIW2VnbI/AAAAAAAAABw/5q7dRELfGZ0/s72-c/72.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8752774920344563789.post-978347615158870571</id><published>2008-04-18T11:08:00.000-07:00</published><updated>2008-04-18T11:19:10.371-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interview Tips'/><title type='text'>Job Interview Technique &amp; Body Language</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_91tt1egoisU/SAjkcm2Vn
