<?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-3578123614327069913</id><updated>2011-04-21T16:47:26.885-07:00</updated><category term='VBScript'/><category term='FMS Mock Test'/><category term='hcl placement papers'/><category term='college students'/><category term='sbi general knowledge paper'/><category term='Microprocessor Interview Questions'/><category term='adobe'/><category term='Interview Questions'/><category term='Winforms'/><category term='ASP.NET Interview'/><category term='Resume Preparation Guidelines'/><category term='MCSD'/><category term='C interviews'/><category term='J2EE Interview Questions'/><category term='Dispose'/><category term='SAP R/3 Modularization'/><category term='campus interview questions'/><category term='PHP interview Questions'/><category term='Sharepoint Server'/><category term='Threading'/><category term='Algorithm Analysis'/><category term='C++INTERVIEWS'/><category term='GOOGLE'/><category term='XSL'/><category term=': Framework 3.0'/><category term='Object Oriented system design'/><category term='reasoning verbal questions'/><category term='SBI Clerical Exam'/><category term='Exams'/><category term='management schools'/><category term='Load Runner Interview Questions'/><category term='C# 3.0'/><category term='VBA'/><category term='Application_Start'/><category term='cts interview questions'/><category term='constructor Interview Questions'/><category term='Dataset'/><category term='Bank Probationary Officers’ Aptitude Test'/><category term='Web user controls'/><category term='SBI Placement Papers'/><category term='Test Director interview questions'/><category term='Quick Test Professional questions'/><category term='CAT'/><category term='puzzles'/><category term='Garbage Collection'/><category term='Capgemini Placement Papers'/><category term='Interview helper'/><category term='IBM interview questions'/><category term='fresher'/><category term='ASP.Net'/><category term='USA visa'/><category term='Enginerring test'/><category term='OSI'/><category term='Wipro Interview Questions'/><category term='IT interview Question Papers'/><category term='net framework'/><category term='others.'/><category term='Microsoft'/><category term='Postback'/><category term='C language'/><category term='Teacher Interview Questions'/><category term='Career Advice'/><category term='JSP interview questions'/><category term='wipro placement papers'/><category term='.Net'/><category term='GATE entrance exam questions'/><category term=': Java'/><category term='oops'/><category term='Answers'/><category term='Interview'/><category term='job interview questions and answers'/><category term='J2EE Questions'/><category term='group discussion iim'/><category term='C++ interview questions'/><category term='TechMahindra Placement Test Papers'/><category term='C interview Questions'/><category term='Resources'/><category term='Interviews'/><category term='Finance Interview Questions'/><category term='core java interview questions and answers'/><category term='Resume creator'/><category term='SSL'/><category term='SAP Basis'/><category term='OOAD'/><category term='Shares'/><category term='Costing'/><category term='.net framework'/><category term='Manual testing Interview Questions'/><category term='Sharepoint Portal Interview Questions'/><category term='.net Interview Questions'/><category term='Unix Interview Questions'/><category term='1st Normal Form'/><category term='SAP ADM325'/><category term='Jobs'/><category term='Open Source'/><category term='cat questions'/><category term='interview questions on core java'/><category term='Hotel Management Questions'/><category term='Software process'/><category term='SQL Optimization Interview Questions'/><category term='Visual Basic Interview Questions'/><category term='Job Interview Questions'/><category term='Php'/><category term='Databases'/><category term='Oracle Questions'/><category term='FMS'/><category term='Full Duplex'/><category term='Mainframes'/><category term='Interview Concepts'/><category term='B.Ed GK Questions'/><category term='C'/><category term='Amazon'/><category term='PL/SQL'/><category term='ADSL'/><category term='group discussion'/><category term='iim'/><category term='SBI BANK PO Questions'/><category term='Tata Consultancy Services'/><category term='sql interview questions'/><category term='Sql'/><category term='HR Interview Questions'/><category term='SAP R/3 Release 4 - BA4x'/><category term='infosys interview questions'/><category term='Resume Helper'/><category term='Bank PO Important Dates in history'/><category term='ABAP interview Questions'/><category term='Networking'/><category term='IP'/><category term='Interop Services'/><category term='Operating system Job Interview Questions'/><category term='Web Interview'/><category term='IBM GLOBAL SERVICES'/><category term='SBI Test Question Paper'/><category term='IGRP'/><category term='Data Structures'/><category term='TANCET 2008 exam information resources'/><category term='Accounting'/><category term='formula list CAT'/><category term='C++ interviews'/><category term='asax'/><category term='cobol questions and'/><category term='XML'/><category term='Hub'/><category term='Interop'/><category term='Visa Stamping'/><category term='questions on cobol'/><category term='Unboxing'/><category term='Ping'/><category term='Testing Interview questions'/><category term='intel'/><category term='DB2'/><category term='HP Placement Papers'/><category term='asp net interview questions'/><category term='gd'/><category term='SAP Reporting'/><category term='Networking Interview Questions'/><category term='COM Job Interview Questions'/><category term=': C#'/><category term='cobol interview questions'/><category term='IIS 7.0'/><category term='yahoo'/><category term='Technical Interview Questions'/><category term='AS/400 Interview Questions'/><category term='COM/DCOM'/><category term='ECE'/><category term='excel VBA Interview Questions'/><category term='ContextUtil'/><category term='Engineering entrance test'/><category term='TCP/IP'/><category term='Competition exam'/><category term='internship'/><category term='SBI BANK PO Numerical Ability Questions'/><category term='Oracle9i'/><category term='Microsoft Interview Questions'/><category term='XmlSerializer'/><category term='Routers'/><category term='070-316'/><category term='Boxing'/><category term='cat papers'/><category term='engineering students'/><category term='TCS'/><category term='IIS Interview Questions'/><category term='COM+'/><category term='GATE'/><category term='Asp interview questions'/><category term='ADO'/><category term='LAMP'/><category term='operating systems'/><category term='Webservices Interview Questions'/><category term='common entrance test'/><category term='cts placement papers'/><category term='VB Interview questions'/><category term='SQL Tools Interview Questions'/><category term='Win Runner interview Questions'/><category term='XML Interview Questions'/><category term='Investment Management Interview Questions'/><category term='VB6'/><category term='experience'/><category term='ASP'/><category term='cobol questions'/><category term='Portal server'/><category term='Java'/><category term='Quantitative Interview Questions'/><category term='VB'/><category term='C#'/><category term='SOAP'/><category term='Testing QA'/><category term='Remoting'/><category term='TANCET'/><category term='Webservice'/><category term='Win Runner QA Part 1'/><category term='Project Management Interview Questions'/><category term='WCF'/><category term='H1B Visa'/><category term='Portfolio Management'/><category term='intervew questions'/><category term='b.ed questions'/><category term='Accounting Interview Questions'/><category term='Bank PO Important Abbreviations'/><category term='medicines'/><category term='Host'/><category term='SEO/SEM'/><category term='VB.net Interview Questions'/><category term='Risk Management'/><category term='core java interview questions with answers'/><category term='SQL Injection'/><category term='SQL Indexes'/><category term='Java Interview Questions'/><category term='Cisco'/><category term='interview preparation'/><category term='core java question'/><category term='Web Development'/><category term='IPV4'/><category term='DataInstance'/><category term='database interview questions'/><category term='Computer Network Questions'/><category term='An XML fragment is an XML document with no single top-level root element. To put it simple it is a part (fragment) of a well-formed xml document.'/><category term='Finalize'/><category term='Tree View Control'/><category term='Bank PO General Knowledge Questions'/><category term='Common Law Admission Test'/><category term='Resume'/><category term='authentication'/><category term='BANK PO NUMERICAL ABILITY Questions'/><category term='PHP Job interview Questions'/><category term='satellite assembly'/><category term='Six Sigma'/><category term='TANCET engineering Entrance admission test form prospectus online and samples'/><category term='Oracle Interview Questions'/><category term='corejava interview questions'/><category term='VB.net'/><category term='ADO.net Interview Questions'/><category term='H1 B Visa Interview Questions'/><category term='3rd Normal Form'/><category term='core java interview questions'/><category term='SQL Server Stored Procedures'/><category term='RCW'/><category term='Mainframe Interview Questions'/><category term='infosys placement papers'/><category term='Unix'/><category term='Datareader'/><category term='WinRunner Interview Questions'/><category term='Salary Negotiation'/><category term='WAN'/><category term='plecement papers'/><category term='GATE Computer Science'/><category term='MS SQL Server questions'/><category term='Share Market'/><category term='RDBMS Interview Questions'/><category term='Object Oriented Application Development'/><category term='Software Testing'/><category term='Bank PO Reasoning verbal'/><category term='solutions'/><category term='Oracle'/><category term='MTU'/><category term='ca'/><category term='Internships'/><category term='Bioinformatics Interview Questions'/><category term='SQL Server interview questions'/><category term='Basic .net Framework'/><category term='Negotiation'/><category term='network interview questions'/><category term='CIDR'/><category term='learning'/><category term='teaching questions'/><category term='Investment Banking'/><category term='sap interview questions'/><category term='biotech questions'/><category term='.net Framework Interview Questions'/><category term='H1 Interview Questions'/><category term='RDBMS'/><category term='constructors'/><category term='interview questions for cobol'/><category term='iim questions'/><category term='JDBC'/><category term='Software Testing interview questions'/><category term='TCS Interview Papers'/><category term='Technical and Quantitative Interview Questions'/><category term='Database'/><category term='Linux'/><category term='Campus interview'/><category term='Data Warehousing'/><category term='SQL Views'/><category term='CMMI'/><category term='net Framework Interview Questions'/><category term='java job interview questions'/><category term='C Questions'/><category term='gk questions'/><category term='Oracle8'/><category term='DNS'/><category term='JSP'/><category term='Broadcast'/><category term='Assemblies'/><category term='CMC Interview Questions'/><category term='CCNA Interview Questions'/><category term='Switch'/><category term='SAP R/3 Interactive Reporting'/><category term='OS interview Questions'/><category term='How to prepare for an interview'/><category term='Points to remmeber'/><category term='DOM'/><category term='Net'/><category term='ActiveX'/><category term='DSL'/><category term='Questions'/><category term='Cardspace'/><category term='infosys test paper'/><category term='PO Questions'/><category term='number theory'/><category term='Asset Management Interview Questions'/><category term='B.Ed Abbreviation Questions'/><category term='Freshers interview questions'/><category term='cognizant'/><category term='Interview tips'/><category term='CrackTheInterview'/><category term='Examination'/><category term='web.config'/><category term='Windows service'/><category term='Group Discussions'/><category term='LINQ'/><category term='C# Interview Questions'/><category term='hcl interview questions'/><category term='.Net 3.0'/><category term='SQL Triggers'/><category term='Birlasoft Placement Test Papers'/><category term='State Bank Of India Papers'/><category term='salary'/><category term='VS2008'/><category term='SAX'/><category term='management questions'/><category term='freshers'/><category term='CET'/><category term='subnet'/><category term='SQL Transactions'/><category term='QA interview questions'/><category term='DBA'/><category term='CCW'/><category term='Money market'/><category term='SAP Logical Database'/><category term='2nd Normal Form'/><category term='others'/><category term='HR Questions'/><category term='SAP R/3 ARCHITECTURE Interview Questions'/><category term='cobol objective questions'/><category term='connizant'/><category term='law interview questions'/><category term='J2ME interview questions'/><category term='ASP.net interview questions'/><category term='Security'/><category term='C++'/><category term='SQL Admin Interview Questions'/><category term='law questions'/><category term='Aptitude Questions'/><category term='Semester'/><category term='General'/><category term='Behavioral Interview Questions'/><category term='Visual Basic'/><category term='Basics of project management'/><category term='HR Interviews'/><category term='net Interview Questions'/><category term='Net 3.0'/><category term='SQL Trigger Interview Questions'/><category term='cobol questions and answers'/><category term='Framework 3.0'/><category term='point-to-point'/><category term='Bank PO General Knowledge Test'/><category term='current affair questions'/><category term='ajax'/><category term='Win Runner QA'/><category term='C/C++'/><category term='programming'/><category term='CAT mocks'/><category term='LAMP interview questions'/><category term='SQL View Interview Questions'/><category term='clr'/><category term='Viewstate'/><category term='Technical Interview'/><category term='mainframe cobol questions'/><category term='employer interview questions'/><category term='C interview Question'/><title type='text'>Interview Questions For All</title><subtitle type='html'>Interview Questions For All Who Are Waiting For Jobs</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default?start-index=101&amp;max-results=100'/><author><name>Reddy Suresh Sharma</name><uri>http://www.blogger.com/profile/16126981503698542931</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://4.bp.blogspot.com/_uXhXn7SICm4/SK8FhFNmOMI/AAAAAAAAABE/4dsiC2z45YY/S220/New+Image2.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>992</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3578123614327069913.post-1330535359728712065</id><published>2008-10-02T01:48:00.000-07:00</published><updated>2008-10-02T01:51:38.852-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cobol questions and'/><category scheme='http://www.blogger.com/atom/ns#' term='cobol interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='cobol questions'/><category scheme='http://www.blogger.com/atom/ns#' term='cobol objective questions'/><category scheme='http://www.blogger.com/atom/ns#' term='interview questions for cobol'/><category scheme='http://www.blogger.com/atom/ns#' term='cobol questions and answers'/><category scheme='http://www.blogger.com/atom/ns#' term='questions on cobol'/><category scheme='http://www.blogger.com/atom/ns#' term='mainframe cobol questions'/><title type='text'>Cobol Interview Questions Part-11</title><content type='html'>&lt;h3 class="post-title entry-title"&gt; &lt;/h3&gt;  &lt;div class="post-body entry-content"&gt; &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;151. What are the few advantages of VS COBOL II over OS/VS COBOL? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: The working storage and linkage section limit has been increased. They are 128 megabytes as supposed to 1 megabytes in OS/VS COBOL. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Introduction of ADDRESS special register. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;31-bit addressing. In using COBOL on &lt;span class="klink"&gt;PC&lt;/span&gt; we have only flat files and the programs can access only limited storage, whereas in VS COBOL II on M/F the programs can access up to 16MB or 2GB depending on the addressing and can use VSAM files to make I/O operations faster &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;152. What are the steps you go through while creating a COBOL program executable? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: &lt;span class="klink"&gt;DB2&lt;/span&gt; pre-compiler (if embedded SQL is used), CICS translator (if CICS program), Cobol &lt;span class="klink"&gt;compiler&lt;/span&gt;, Link editor. If DB2 program, create plan by binding the DBRMs. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;153. Name the divisions in a COBOL Program &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Identification / Environment/ Data/ Procedure Divisions &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;154. What are the different data types available in COBOL? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Alpha-numeric (X) , Alphabetic (A) and numeric (9). &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;155. What does the INITIALIZE verb do? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Alphabetic, Alphanumeric fields &amp;amp; alphanumeric edited items are set to SPACES. Numeric, Numeric edited items set to ZERO. FILLER , OCCURS DEPENDING ON items left untouched &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;156. What is the difference between a 01 level and 77 levels? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: 01 level can have sublevels from 02 to 49. 77 cannot have sublevel. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;157. What are 77 levels used for? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Elementary level item. Cannot be subdivisions of other items (cannot be qualified), nor can they be subdivided themselves. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;158. What is 88 level used for? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: For condition names. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;159. What is level 66 used for? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: For RENAMES clause. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;160. What does the IS NUMERIC clause establish? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: IS NUMERIC can be used on alphanumeric items, signed numeric &amp;amp; packed decimal items and unsigned numeric &amp;amp; packed decimal items. IS NUMERIC returns TRUE if the item only consists of 0-9. However, if the item being tested is a signed item, then it may contain 0-9, + and - . &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;161. Is compute w=u a valid statement? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Yes, it is. It is equivalent to move u to w. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;162. In the above example, when will you prefer compute statement over the move statement? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: When significant left-order digits would be lost in execution, the COMPUTE statement can detect the condition and allow you to handle it. The MOVE statement carries out the assignment with destructive truncation. Therefore, if the size error is needs to be detected, COMPUTE will be preferred over MOVE. The ON SIZE ERROR phrase of COMPUTE statement, compiler generates code to detect size-overflow. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;163. What happens when the ON SIZE ERROR phrase is specified on a COMPUTE statement? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: If the condition occurs, the code in the ON SIZE ERROR phrase is performed, and the content of the destination field remains unchanged. If the ON SIZE ERROR phrase is not specified, the assignment is carried out with truncation. There is no ON SIZE ERROR support for the MOVE statement. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;164. How will you associate your files with external data sets where they physically reside? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Using SELECT clause, the files can be associated with external data sets. The SELECT clause is defined in the FILE-CONTROL paragraph of Input-Output Section that is coded Environment Division. The File structure is defined by FD entry under File-Section of Data Division for the OS. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;165. How will you define your file to the &lt;span class="klink"&gt;&lt;span style=""&gt;operating system&lt;/span&gt;&lt;/span&gt;? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Associate the file with the external data set using SELECT clause of INPUT-OUTPUT SECTION. INPUT-OUTPUT SECTION appears inside the ENVIRONMENT DIVISION. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;166. Explain the use of Declaratives in COBOL? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Declaratives provide special section that are executed when an exceptional condition occurs. They must be grouped together and coded at the beginning of procedure division and the entire procedure division must be divided into sections. The Declaratives start with a USE statement. The entire group of declaratives is preceded by DECLARIVES and followed by END DECLARITIVES in area A. The three types of declaratives are Exception (when error occurs during file handling), Debugging (to debug lines with 'D' coded in w-s section) and Label (for EOF or beginning...) declaratives. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;167. How do you define a table/array in COBOL? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;01 ARRAYS. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;05 ARRAY1 PIC X(9) OCCURS 10 TIMES. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;168. Can the OCCURS clause be at the 01 level? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: No &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;169. A statically bound subprogram is called twice. What happens to working-storage variables? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans:The working-storage section is allocated at the start of the run-unit and any data items with VALUE clauses are initialized to the appropriate value at the time. When the subprogram is called the second time, a working-storage items persist in their last used state. However, if the program is specified with INITIAL on the PROGRAM-ID, working-storage section is reinitialized each time the program is entered. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;170. Significance of the COMMON Attribute ? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans:COMMON attribute is used with nested COBOL programs. If it is not specified, other nested programs will not be able to access the program. PROGRAM-ID. Pgmname is COMMON PROGRAM. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;171. In which division and section, the Special-names paragraph appears? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Environment division and Configuration Section. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;172. What is the LOCAL-STORAGE SECTION? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans:Local-Storage is allocated each time the program is called and is de-allocated when the program returns via an EXIT PROGRAM, GOBACK, or STOP RUN. Any data items with a VALUE clauses are initialized to the appropriate value each time the program is called. The value in the data items is lost when the program returns. It is defined in the DATA DIVISION after WORKING-STORAGE SECTION &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;173. What does passing BY REFERENCE mean? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans:When the data is passed between programs, the subprogram refers to and processes the data items in the calling program's storage, rather than working on a copy of the data. When &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;CALL . . . BY REFERENCE identifier. In this case, the caller and the called share the same memory. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;174. What does passing BY CONTENT mean? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans:The calling program passes only the contents of the literal, or identifier. With a CALL . . . BY CONTENT, the called program cannot change the value of the literal or identifier in the calling program, even if it modifies the variable in which it received the literal or identifier. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;175. What does passing BY VALUE mean? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans:The calling program or method is passing the value of the literal, or identifier, not a reference to the sending data item. The called program or invoked method can change the parameter in the called program or invoked method. However, because the subprogram or method has access only to a temporary copy of the sending data item, those changes do not affect the argument in the calling program. Use By value, If you want to pass data to C program. Parameters must be of certain data type. &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;176. What is the default, passing BY REFERENCE or passing BY CONTENT or passing BY VALUE? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Passing by reference (the caller and the called share the same memory). &lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="question"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;177. Where do you define your data in a program if the data is passed to the program from a Caller program? &lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="answer"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Ans: Linkage Section&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-1330535359728712065?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/1330535359728712065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=1330535359728712065' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1330535359728712065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1330535359728712065'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/10/cobol-interview-questions-part-11.html' title='Cobol Interview Questions Part-11'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8006335218339255761</id><published>2008-10-02T01:47:00.000-07:00</published><updated>2008-10-02T01:48:19.430-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='core java interview questions with answers'/><category scheme='http://www.blogger.com/atom/ns#' term='interview questions on core java'/><category scheme='http://www.blogger.com/atom/ns#' term='core java interview questions and answers'/><category scheme='http://www.blogger.com/atom/ns#' term='core java question'/><category scheme='http://www.blogger.com/atom/ns#' term='core java interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='corejava interview questions'/><title type='text'>Core Java Interview Questions Part-7</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;91 Q What is &lt;span class="klink"&gt;java&lt;/span&gt; byte code?&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Byte code is an sort of intermediate code. The byte code is processed by virtual machine. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;92 Q What is method overloading? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Method overloading is the process of creating a new method with the same name and different signature. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;93 Q What is method overriding?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Method overriding is the process of giving a new definition for an existing method in its child class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;94 Q What is finalize() ?   &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Finalize is a protected method in java. When the garbage collector is executes , it will first call finalize( ), and on the next garbage-collection it reclaim the objects memory. So finalize( ), gives you the chance to perform some cleanup operation at the time of garbage collection.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;95 Q What is multi-threading? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Multi-threading is the scenario where more than one threads are running. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;96 Q What is deadlock?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Deadlock is a situation when two threads are waiting on each other to release a resource. Each thread waiting for a resource which is held by the other waiting thread.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;97 Q What is the difference between Iterator and Enumeration? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Iterator differ from enumeration in two ways Iterator allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics. And , method names have been improved. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;98 Q What is the Locale class? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;A Locale object represents a specific geographical, political, or cultural region &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;99 Q What is internationalization? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Internationalization is the process of designing an &lt;span class="klink"&gt;application&lt;/span&gt; so that it can be adapted to various languages and regions without changes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;100 Q What is anonymous class ? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;A An anonymous class is a type of inner class that don't have any name. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;101 Q What is the difference between URL and URLConnection? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;A URL represents the location of a resource, and a URLConnection represents a link for accessing or communicating with the resource at the location. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;102 Q What are the two important &lt;span class="klink"&gt;TCP&lt;/span&gt; Socket classes? &lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;ServerSocket and Socket. ServerSocket is useful for two-way socket communication. Socket class help us to read and write through the sockets. getInputStream() and getOutputStream() are the two methods available in Socket class. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;103 Q Strings are immutable. But String s="Hello"; String s1=s+"World" returns HelloWorld how ? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Here actually a new object is created with the value of HelloWorld &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;104 Q What is classpath? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Classpath is the path where Java looks for loading class at run time and compile time. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;105 Q What is path? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;It is an the location where the OS will look for finding out the executable files and commands.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;106 Q What is &lt;span class="klink"&gt;java&lt;/span&gt; collections?     &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Java collections is a set of classes, that allows operations on  a collection of classes. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;107 Q Can we compile a java program without main?     &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Yes, we can. In order to compile a java program, we don't require any main method. But to execute a java program we must have a main in it (unless it is an applet or servlet). Because main is the starting point of a java program.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;108 Q What is a java compilation unit.     &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;A compilation unit is a java source file.   &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;109 What are the restrictions when overriding a method ?    &lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Overridden methods must have the same name, argument list, and return type (i.e., they must have the exact signature of the method we are going to override, including return type.) The overriding method cannot be less visible than the method it overrides( i.e., a public method cannot be override to private). The overriding method may not throw any exceptions that may not be thrown by the overridden method&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;110 Q What is static initializer block? What is its use?    &lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-size: 11pt; font-family: Verdana;"&gt;A static initializer block is a block of code that declares with the static &lt;span class="klink"&gt;keyword&lt;/span&gt;. It normally contains the block of code that must execute at the time of class loading. The static initializer block will execute only once at the time of loading the class only.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8006335218339255761?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8006335218339255761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8006335218339255761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8006335218339255761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8006335218339255761'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/10/core-java-interview-questions-part-7.html' title='Core Java Interview Questions Part-7'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-1086515033535350677</id><published>2008-10-02T01:43:00.000-07:00</published><updated>2008-10-02T01:47:02.392-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='core java interview questions with answers'/><category scheme='http://www.blogger.com/atom/ns#' term='interview questions on core java'/><category scheme='http://www.blogger.com/atom/ns#' term='core java interview questions and answers'/><category scheme='http://www.blogger.com/atom/ns#' term='core java question'/><category scheme='http://www.blogger.com/atom/ns#' term='core java interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='corejava interview questions'/><title type='text'>Core Java Interview Questions Part-8</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;111 Q How does a try statement determine which catch clause should be used to handle an exception?&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;When an exception is thrown , the catch block of the try statement are examined in the order in which they appear. The first catch block that is capable of handling the exception is executed. The remaining catch blocks are ignored&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;112 Q How parameters are passed to methods in java program ?    &lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;All java method parameters in java are passed by value only. Obviously primitives are passed by value. In case of objects a copy of the reference is passed and so all the changes made in the method will persist.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;113 Q If a class doesn't have any constructors, what will happen?     &lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;If a class doesn't have a constructor, the JVM will provide a default constructor for the class. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;114 Q What will happen  if a thread cannot acquire a lock on an object?    &lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;It enters to the waiting state until lock becomes available. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;115 Q How does multithreading occurring on a &lt;span class="klink"&gt;&lt;span class="kLink" style="text-decoration: underline ! important; position: static;"&gt;&lt;span style="color: blue ! important; font-family: Verdana; font-size: 14.6667px; position: static;color:blue;" &gt;&lt;span class="kLink" style="border-bottom: 1px solid blue; color: blue ! important; font-family: Verdana; font-size: 14.6667px; position: static; padding-bottom: 1px; background-color: transparent;"&gt;computer&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; with a single CPU?&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;The task scheduler of OS allocates an execution time for multiple tasks. By switching between different executing tasks, it creates the impression that tasks execute sequentially. But actually there is only one task is executed at a time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;116 Q What will happen if you are invoking a thread's interrupt method while the thread is  waiting or sleeping? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;When the task enters to the running state, it will throw an InterruptedException. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;117 Q What are the different ways in which a thread can enter into waiting state? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;There are three ways for a thread to enter into waiting state. By invoking its sleep() method, by blocking on I/O, by unsuccessfully attempting to acquire an object's lock, or by invoking an object's wait() method. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;118 Q &lt;span style=""&gt; &lt;/span&gt;What are the the different ways for creating a thread?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;A thread can be created by subclassing Thread, or by implementing the Runnable interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;119 Q What is the difference between creating a thread by extending Thread class and by implementing Runnable interface? Which one should prefer?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;When creating a thread by extending the Thread class, it is not mandatory to override the run method (If we are not overriding the run method , it is useless), because Thread class have already given a default implementation for run method. But if we are implementing Runnable , it is mandatory to override the run method. The preferred way to create a thread is by implementing Runnable interface, because it give loose coupling.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;120 Q What is coupling? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Coupling is the dependency between different components of a &lt;span class="klink"&gt;system&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;121 Q How is an interface?     &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;An interface is a collection of method declarations and constants. In &lt;span class="klink"&gt;&lt;span style="color: windowtext; text-decoration: none;"&gt;java&lt;/span&gt;&lt;/span&gt; interfaces are used to achieve multiple inheritance. It sets a behavioral protocol to all implementing classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;122 Q What is an abstract class?     &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;An abstract class is an incomplete class. An abstract class is defined with the &lt;span class="klink"&gt;&lt;span style="color: windowtext; text-decoration: none;"&gt;keyword&lt;/span&gt;&lt;/span&gt; abstract . We cannot create an object of the abstract class because it is not complete. It sets a behavioral protocol for all its child classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;123 Q How will you define an interface?     &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;An interface is defined with the keyword interface. Eg:&lt;br /&gt;public interface MyInterface { }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;124 Q How will you define an abstract class?    &lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;An abstract class is defined with the keyword abstract Eg:&lt;br /&gt;public abstract class MyClass { }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;125 Q What is any an anonymous class?     &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;A An anonymous class is a local class with no name.   &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;126 Q What is a JVM heap?     &lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;The heap is the runtime data area from which memory for all class instances and arrays is allocated. The heap may be of a fixed size or may be expanded. The heap is created on virtual machine start-up. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;127 Q What is difference between string and StringTokenizer?    &lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;StringTokenizer as its name suggests tokenizes a String supplied to it as an argument to its constructor and the character based on which tokens of that string are to be made. The default tokenizing character is space " ". &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;128 Q What is the difference between array and ArrayList ?     &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Array is collection of same &lt;span class="kLink" style="text-decoration: underline ! important; position: static;"&gt;&lt;span style="color: blue ! important; font-family: Verdana; font-weight: 400; font-size: 14.6667px; position: static;color:blue;" &gt;&lt;span class="kLink" style="border-bottom: 1px solid blue; color: blue ! important; font-family: Verdana; font-weight: 400; font-size: 14.6667px; position: static; padding-bottom: 1px; background-color: transparent;"&gt;data &lt;/span&gt;&lt;span class="kLink" style="border-bottom: 1px solid blue; color: blue ! important; font-family: Verdana; font-weight: 400; font-size: 14.6667px; position: static; padding-bottom: 1px; background-color: transparent;"&gt;type&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Array size is fixed, It cannot be expanded. But ArrayList is a growable collection of objects. ArrayList is a part of Collections Framework and can work with only objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;129 Q What is difference between java.lang .Class and java.lang.ClassLoader? What is the hierarchy of ClassLoader ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Class 'java.lang.Class' represent classes and interfaces in a running Java &lt;span class="klink"&gt;&lt;span class="kLink" style="text-decoration: underline ! important; position: static;"&gt;&lt;span style="color: blue ! important; font-family: Verdana; font-weight: 400; font-size: 14.6667px; position: static;color:blue;" &gt;&lt;span class="kLink" style="color: blue ! important; font-family: Verdana; font-weight: 400; font-size: 14.6667px; position: static;"&gt;application&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. JVM construct 'Class' object when class in loaded. Where as a ClassLoader is also a class which loads the class files into memory in order for the Java programs to execute properly. The hierarchy of ClassLoaders is:&lt;br /&gt;&lt;br /&gt;Bootstrap ClassLoaders&lt;br /&gt;Extensive ClassLoaders&lt;br /&gt;&lt;span class="klink"&gt;System&lt;/span&gt; Classpath ClassLoaders&lt;br /&gt;Application ClassLoaders &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;130 Q What is daemon thread? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Theards which are running on the background are called deamon threads. daemon thread is a thread which doesn't give any chance to run other threads once it enters into the run state it doesn't give any chance to run other threads. Normally it will run forever, but when all other non-daemon threads are dead, daemon thread will be killed by JVM &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 11pt; font-family: Verdana;"&gt;131 Q What is a green thread? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;span style="font-size: 11pt; font-family: Verdana;"&gt;Native threads can switch between threads preemptively. Green threads switch only when control is explicitly given up by a thread ( Thread.yield(), Object.wait(), etc.) or a thread performs a blocking operation (read(), etc.). On multi-CPU machines, native threads can run more than one thread simultaneously by assigning different threads to different &lt;span class="kLink" style="text-decoration: underline ! important; position: static;"&gt;&lt;span style="color: blue ! important; font-family: Verdana; font-weight: 400; font-size: 14.6667px; position: static;color:blue;" &gt;&lt;span class="kLink" style="border-bottom: 1px solid blue; color: blue ! important; font-family: Verdana; font-weight: 400; font-size: 14.6667px; position: static; padding-bottom: 1px; background-color: transparent;"&gt;CPUs&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;. Green threads run on only one CPU. Native threads create the appearance that many Java processes are running: each thread takes up its own entry in the process table. One clue that these are all threads of the same process is that the memory size is identical for all the threads - they are all using the same memory. The process table is not infinitely large, and processes can only create a limited number of threads before running out of system resources or hitting configured limits.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-1086515033535350677?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/1086515033535350677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=1086515033535350677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1086515033535350677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1086515033535350677'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/10/core-java-interview-questions-part-8.html' title='Core Java Interview Questions Part-8'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-1026719916578908998</id><published>2008-08-15T07:06:00.000-07:00</published><updated>2008-08-15T07:14:42.969-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TANCET'/><title type='text'>TANCET entrance exam 2008 Syllabus online Interview question</title><content type='html'>&lt;p&gt;Analytical Written Whole Testpaper for Intergraph India.&lt;br /&gt;Total 20 Questions - time limit 20 minutes&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-family: Georgia;"&gt;1. complete the diagram :&lt;br /&gt;four fig will be given , you have to draw the final one&lt;br /&gt;&lt;br /&gt;triangle fig :&lt;br /&gt;&lt;br /&gt;2. draw venn diagram relating rhombus, quadrilateral &amp;amp; polygon&lt;br /&gt;&lt;br /&gt;3.in a group of 5 persons a,b,c,d,e one of the person is advogate, one is doctor, one businesss man, one shop keeper and one is professor. three of them a,c,and professor prefer playing cricket to foot ball and two of them b and businessman prefer playing foot ball to cricket. the shop keeper and b and a are friends but two of these prefer playing foot ball to cricket. the advogate is c's brother and both play same game . the doctor and e play cricket.&lt;br /&gt;&lt;br /&gt;(a) who is advogate ?&lt;br /&gt;a, b, c, d&lt;br /&gt;(b) who is shop keeper ?&lt;br /&gt;a, b, c, d&lt;br /&gt;(c) which of the following group include persons who like playing cricket&lt;br /&gt;but doesn't include professor ?&lt;br /&gt;ab,bc,cd, none&lt;br /&gt;(d) who is doctor ?&lt;br /&gt;a,b,c,d.&lt;br /&gt;&lt;br /&gt;{ same model problem is asked in question paper but professions can be different such as horticulturist, physicst, journalist, advocate and other one. Instead of football and cricket they can give tea and coffee }&lt;br /&gt;&lt;br /&gt;4. they will give some condition's and asked to find out farthest city in the west (easy one )?&lt;br /&gt;&lt;br /&gt;5. travelling sales man problem. some condition will be given we have to find out the order of station the sales man moves&lt;br /&gt;( three Questions )&lt;br /&gt;&lt;br /&gt;6. +,-,*, /, will be given different meaning&lt;br /&gt;example : take + as * and so on .&lt;br /&gt;they will give expression and we have to find the value of that.&lt;br /&gt;&lt;br /&gt;7. 3+5-2 =4&lt;br /&gt;which has to be interchange to get the result ?&lt;br /&gt;&lt;br /&gt;8. we don't no exact problem .&lt;br /&gt;ex : 8a3b5c7d.....&lt;br /&gt;a wiil be given + sign.&lt;br /&gt;b will be given - sign.&lt;br /&gt;find the value of expression ?&lt;br /&gt;&lt;br /&gt;9. find the total number of squares in 1/4 of chess board ?&lt;br /&gt;Too easy. &lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: Georgia;"&gt;&lt;p class="MsoNormal" style="margin: 0in 0in 0pt;"&gt;&lt;br /&gt;10. 6 face of a cube are painted in a manner ,no 2 adjacent face have same colour. three colurs used are red blue green. cube is cut in to 36 smaller cube in such a manner that 32 cubes are of one size and rest of them bigger size and each bigger side have no red side. following this&lt;br /&gt;three ques will be asked . { in ques paper colors will be different }&lt;br /&gt;&lt;br /&gt;11. two ladies ,two men sit in north east west south position of rectancular table. using clues identify their position ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-1026719916578908998?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/1026719916578908998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=1026719916578908998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1026719916578908998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1026719916578908998'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/tancet-entrance-exam-2008-syllabus_15.html' title='TANCET entrance exam 2008 Syllabus online Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-7416608289241318517</id><published>2008-08-12T23:06:00.000-07:00</published><updated>2008-08-12T23:07:54.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TANCET 2008 exam information resources'/><category scheme='http://www.blogger.com/atom/ns#' term='TANCET engineering Entrance admission test form prospectus online and samples'/><title type='text'>TANCET entrance exam 2008 Syllabus online ..... Interview question</title><content type='html'>&lt;a href=""&gt;SYLLABUS FOR ENTRANCE TEST &amp; EVALUATION SCHEME FOR MBA DEGREE PROGRAMME (Regular &amp; Self-supporting)&lt;br /&gt;&lt;br /&gt;The Question paper will have 5 parts with the following topics:&lt;br /&gt;&lt;br /&gt;TANCET 2008 PART 1. To evaluate the candidate's ability to pick out critically the data and apply the data to business decisions from given typical business situations.&lt;br /&gt;&lt;br /&gt;TANCET 2008 PART 2. To evaluate the skill of the candidate in answering questions based on the passages in the comprehension.&lt;br /&gt;&lt;br /&gt;TANCET 2008 PART 3. To evaluate the skill on solving mathematical problems of graduate level including those learnt in plus two or equivalent level.&lt;br /&gt;&lt;br /&gt;TANCET 2008 PART 4. To test on determining data sufficiency for answering certain questions using data given plus the knowledge of Mathematics and use of day - to - day facts.&lt;br /&gt;&lt;br /&gt;TANCET 2008 PART 5. To test the knowledge on written English with questions on errors in usage, grammar, punctuation and the like.&lt;br /&gt;&lt;br /&gt;Candidates are required to answer 100 objective type questions in 2 hours. Each question will be followed by five alternate answers. The candidate has to choose the correct answer and shade the appropriate circle against the question in the answer sheet with pencil/ball point pen (black or blue).&lt;br /&gt;&lt;br /&gt;TANCET 2008 SYLLABUS FOR ENTRANCE TEST FOR MCA DEGREE PROGRAMME (Regular &amp; Self-supporting)&lt;br /&gt;&lt;br /&gt;The Question Paper will be designed to test the capability of the candidates in the following areas:&lt;br /&gt;&lt;br /&gt;i) Quantitative Ability (ii) Analytical reasoning iii) Logical reasoning (iv) Computer awareness&lt;br /&gt;&lt;br /&gt;There may also be few questions on verbal activity, basic science etc.&lt;br /&gt;&lt;br /&gt;The Question Paper will have 100 objective type questions. Each question will be followed by four alternate answers. The Candidate has to choose the correct answer and shade the appropriate circle against the question in the answer sheet with pencil/ ball point pen (black or blue).&lt;br /&gt;&lt;br /&gt;ENTRANCE TEST SYLLABUS FOR M.E./M.Tech./M.Arch./M.Plan.- Non-Gate Degree Programmes (Regular &amp; Self- Supporting):&lt;br /&gt;&lt;br /&gt;The following are the topics of the syllabus for the various parts. The questions will be set at the corresponding degree level.&lt;br /&gt;&lt;br /&gt;Part 1 - Mathematics (Common to all Candidates)&lt;br /&gt;&lt;br /&gt;(i) Vector calculus (ii) Determinants and Matrics (iii) Analytic function theory (iv) Calculus and ordinary Differential Equations (v) Numerical Methods (vi) Probability and Statistics.&lt;br /&gt;&lt;br /&gt;Part 2 - Basic Engg. and Sciences (Common to all Candidates)&lt;br /&gt;&lt;br /&gt;(i) Fundamental of Applied Mech. (ii) Fundamentals of Material Science (iii) Basic Civil Engg. (iv) Basic Electrical Engg. (v) Basic Mechanical Engg. (vi) Fundamentals of Computers (vii) Fundamentals of Mathematics (viii) Fundamentals of Physics (ix) Fundamentals of Chemistry.&lt;br /&gt;&lt;br /&gt;Part 3 - Civil Engg. &amp; Geo. Informatics&lt;br /&gt;&lt;br /&gt;(i) Mechanics of Solids and Structural Analysis (ii) Concrete and Steel Structure (iii) Soil Mechanics and Geo Technical Engineering (iv) Fluid Mechanics and Water Resources Engineering (v) Environmental Engineering (vi) Surveying (vii) Transportation Engineering (viii) Remote Sensing (ix) Geographic Information Systems (GIS).&lt;br /&gt;&lt;br /&gt;Part 4 - Mechanical, Automobile and Aeronautical Engineering&lt;br /&gt;&lt;br /&gt;(i) Mechanics and Machine Design (ii) Material Science and Metallurgy (iii) Thermo dynamics (iv) Refrigeration and Air Conditioning (v) Production Technology (vi) Automotive Engines (vii) Automotive Transmission (viii) Aerodynamics (ix) Aerospace Propulsion. (x) Strength of Materials&lt;br /&gt;&lt;br /&gt;Part 5 - Electrical, Electronics &amp; Communication, Instrumentation and Avionics&lt;br /&gt;&lt;br /&gt;(i) Circuit Theory (ii) DC &amp; AC Machines (iii) Control Systems (iv) Communication Systems (v) Power Electronics (vi) Network Analysis (vii) Microprocessors, Computer Applications (viii) Transducers and Instrumentation (ix) Avionics&lt;br /&gt;&lt;br /&gt;Part 6 - Earth Sciences&lt;br /&gt;&lt;br /&gt;(i) Physical Geology and Geo Morphology (ii) Petrology (iii) Structural Geology (iv) Economic Geology (v) Geo Physics and Engineering Geology (vi) Remote Sensing (vii) Hydro Geology.&lt;br /&gt;&lt;br /&gt;Part 7 - Production and Industrial Engineering&lt;br /&gt;&lt;br /&gt;(i) Casting, metal forming and metal joining processes (ii) Tool Engineering, Machine tool operation, Metrology and inspection (iii) Engineering Materials, Processing of Plastics and Computer Aided Manufacturing (iv) Product Design, Process Planning, Cost Estimate, Design of Jigs and Fixtures and Press Tools (v) Operations Research (vi) Operations Management (vii) Quality Control Reliability and Maintenance.&lt;br /&gt;&lt;br /&gt;Part 8 - Computer Science and Engineering&lt;br /&gt;&lt;br /&gt;(i) Discrete Mathematical Structures, Formal Language and Automatia (ii) Micro Processor and Hardware Systems (iii) Computer Organization and Architecture (iv) System Programming including Assemblers, Compilers and Operating Systems (v) Programming Methodology, Data Structures and Algorithms including A1 Algorithm (vi) Database Systems (vii) Computer Networks.&lt;br /&gt;&lt;br /&gt;Part 9 - Chemistry, Chemical Engg. &amp; Ceramic Tech.&lt;br /&gt;&lt;br /&gt;(i) Thermo dynamics and Kinetics (ii) Heat and Mass Transfer (iii) Fluid Flow (iv) Chemical Process Industries (v) IR, NMR and Mass Spectrometry (vi) Polymer Chemistry and Polymerisation Processes (vii) Fine Ceramics (viii) Glass &amp; Cement (ix) Refractory Materials.(x) Organic reactions (xi) Electro Chemistry.&lt;br /&gt;&lt;br /&gt;Part 10 - Textile Technology&lt;br /&gt;&lt;br /&gt;Textile Fibers - Production and Properties (ii) Spinning (iii) Fabric Production (iv) Textile Physics (v) Chemical Processing of Textile Materials (vi) Process and Quality Control in Textile Materials.&lt;br /&gt;&lt;br /&gt;Part 11 - Leather Technology&lt;br /&gt;&lt;br /&gt;(i) Chemistry of Proteins - Collagen and keratin (ii) Principles of various pre-tanning, tanning and post-tanning finishing operations (iii) Technologies aspects of various leather manufacture (iv) Environmental &amp; Management in Leather Industries - Animal and Tannery by-products Utilisation (v) Leather Machinery (vi) Analysis and Testing of Materials used in Leather Processing as well as Leather (vii) Designing and Construction of Footwear and Leather Goods.&lt;br /&gt;&lt;br /&gt;Part 12 - Architecture&lt;br /&gt;&lt;br /&gt;Building Materials, Building Construction and Technology, History of Architecture, Principles of Architecture, Building Services, Housing, Urban Design and Renewal, Town Planning, Landscape Architecture, Climatology.&lt;br /&gt;&lt;br /&gt;Part 13 - Physics and Material Science&lt;br /&gt;&lt;br /&gt;(i) Crystal Physics (ii) Electricity and Magnetism (iii) Optics and Quantum Mechanics (iv) Modern Physics (v) Mechanical and Electronic Properties of Materials (vi) Chemical and Thermal properties of materials (vii) Traditional and advanced ceramics.&lt;br /&gt;&lt;br /&gt;Part 14 - Applied Probabilities and Statistics&lt;br /&gt;&lt;br /&gt;(i) Probability - Introductory ideas (ii) Measures of central tendency and Dispersion (iii) Random variable (one and dimensional) (iv) Standard Probability distributions (v) Sampling and sampling distribution, Estimation (vi) Regression and Correlation analysis (vii) Time series.&lt;br /&gt;&lt;br /&gt;Part 15 - Social Sciences&lt;br /&gt;&lt;br /&gt;Settlement Geography, Economic Geography, Industrial locations, Regional Planning, Information Systems, Urban Sociology, Community Development, Social Development and Change, Public Participation, Rural Development, Agglomeration Economics, Economic base of settlements, Development Economics and Planning, Land Economics and Industrialization Policy.&lt;br /&gt;&lt;br /&gt;Also see whole TANCET 2008 admission, form, entrance exam dates prospectus online information&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-7416608289241318517?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/7416608289241318517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=7416608289241318517' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7416608289241318517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7416608289241318517'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/tancet-entrance-exam-2008-syllabus.html' title='TANCET entrance exam 2008 Syllabus online ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-96054524703439935</id><published>2008-08-12T23:02:00.000-07:00</published><updated>2008-08-12T23:06:20.830-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HP Placement Papers'/><title type='text'>HP Placement Paper Questions ..... Interview question</title><content type='html'>&lt;a href=""&gt;HP PLACEMENT PAPER&lt;br /&gt;Paper PART- 1 –&gt; 40 questions (Fundamental computer Concepts, includes OS,N/w , protocols)&lt;br /&gt;Paper PART-2 –&gt; 20 questions (Purely C )&lt;br /&gt;Paper PART-3 –&gt; 20 questions (Analytical)&lt;br /&gt;Question : What is not a part of OS ?&lt;br /&gt;O : swapper,compiler,device driver,file system.&lt;br /&gt;A : compiler.&lt;br /&gt;Q : what is the condition called when the CPU is busy swapping in and out pages of memory without doing any useful work ?&lt;br /&gt;O : Dining philosopher’s problem,thrashing,racearound,option d&lt;br /&gt;A: thrashing.&lt;br /&gt;Q : How are the pages got into main memory from secondary memory?&lt;br /&gt;DMA, Interrupts,option3, option 4&lt;br /&gt;A : as far as i know its Interrupts –by raising a page fault exception.&lt;br /&gt;Q : What is the use of Indexing ?&lt;br /&gt;O : fast linear access, fast random access, sorting of records , option 4&lt;br /&gt;A : find out….&lt;br /&gt;Q : in terms of both space and time which sorting is effecient.(The question isrephrased .)&lt;br /&gt;O : merge sort, bubble sort, quick sort, option 4&lt;br /&gt;A : find out&lt;br /&gt;which case statement will be executed in the following code ?&lt;br /&gt;main()&lt;br /&gt;{ int i =1; switch(i)&lt;br /&gt;{ i++; case 1 : printf (”"); break;&lt;br /&gt;ase 2 : printf(”"); break;efault : printf(”"); break;&lt;br /&gt;Answer : Case1 will only be executed.&lt;br /&gt;Q : In the given structure how do you initialize the day feild?&lt;br /&gt;struct time {&lt;br /&gt;char * day ;&lt;br /&gt;int * mon ;&lt;br /&gt;int * year ;&lt;br /&gt;} * times;&lt;br /&gt;Options : *(times).day, *(times-&gt;day), *times-&gt;*day.&lt;br /&gt;Answer : *(times-&gt;day) — after the execution of this statement compiler generates&lt;br /&gt;error.i didn’t understand why.can anybody explain.&lt;br /&gt;Q: The char has 1 byte boundary , short has 2 byte boundary, int has 4 byte boundary.&lt;br /&gt;what is the total no: of bytes consumed by the following structure:&lt;br /&gt;struct st {char a ; char b; short c ; int z[2] ; char d ; short f; int q ;a&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-96054524703439935?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/96054524703439935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=96054524703439935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/96054524703439935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/96054524703439935'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/hp-placement-paper-questions-interview.html' title='HP Placement Paper Questions ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-9022925883462325540</id><published>2008-08-12T03:00:00.000-07:00</published><updated>2008-08-12T03:01:16.931-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='State Bank Of India Papers'/><category scheme='http://www.blogger.com/atom/ns#' term='SBI Placement Papers'/><category scheme='http://www.blogger.com/atom/ns#' term='SBI Test Question Paper'/><category scheme='http://www.blogger.com/atom/ns#' term='SBI Clerical Exam'/><title type='text'>SBI Clerical Exam Current Affairs test Question Paper ..... Interview question</title><content type='html'>&lt;a href=""&gt;. WHO IS THE PRESENT CHAIRMAN OF CII ?&lt;br /&gt;&lt;br /&gt;ANS- K.V.KAMATHI&lt;br /&gt;&lt;br /&gt;2. WHAT IS THE FULLFORM OF “BRIC” ?&lt;br /&gt;&lt;br /&gt;ANS- BRAZIL,RUSSIA ,INDIA,CHINA&lt;br /&gt;&lt;br /&gt;Completely detailed SBI Clerical Exam Question Paper / Job Placement Paper of State Bank Of India new job posts 2008. Fully detailed Current Affairs Test Paper Booklet latest with answer keys.&lt;br /&gt;&lt;br /&gt;3. WHICH FILM HAS BAGGED THE BEST MOVIE AWARDS IN IIFA AWARDS WHICH WAS HELD IN BANGKOK ?&lt;br /&gt;&lt;br /&gt;ANS- CHAK DE INDIA (YASH CHOPRA)&lt;br /&gt;&lt;br /&gt;4. WHO IS THE WINNER OF FRENCH OPEN 2008 MEN’S TITLE ?&lt;br /&gt;&lt;br /&gt;ANS- RAFAEL NADAL&lt;br /&gt;&lt;br /&gt;5. WHO IS THE WINNER OF DLF IPL CRICKET TOUNAMENT 2008 ?&lt;br /&gt;&lt;br /&gt;ANS- RAJASTHAN ROYALS&lt;br /&gt;&lt;br /&gt;6. NATIONAL HUMAN RIGHTS COMMISSION CHAIRMAN?&lt;br /&gt;&lt;br /&gt;ANS- JUSTICE RAJENDRA BABU&lt;br /&gt;&lt;br /&gt;7. WHO IS THE INDIAN HOCKEY COACH ?&lt;br /&gt;&lt;br /&gt;ANS- JOKIM KARVALO&lt;br /&gt;&lt;br /&gt;8. WHICH FILM HAS BAGGED THE BEST FILM OF GOLDEN PALM AWARD IN CANNES FILM FESTIVAL 2008 ?&lt;br /&gt;&lt;br /&gt;ANS- ENTRE LES MURS (THE CLASS)&lt;br /&gt;&lt;br /&gt;9. WHO IS THE winner of IIFA Best Actor award 2008 ?&lt;br /&gt;&lt;br /&gt;ANS- SHAHRUKH KHAN (CHAK DE INDIA)&lt;br /&gt;&lt;br /&gt;10.WHO IS THE CHIEF OF INDIAN AIR FORCE ?&lt;br /&gt;&lt;br /&gt;ANS- FALI HOMI MAJOR&lt;br /&gt;&lt;br /&gt;11.WHO IS THE MISS UNIVERSE INDIA 2008 ?&lt;br /&gt;&lt;br /&gt;ANS- SIMARAN KAUR MUNDI&lt;br /&gt;&lt;br /&gt;12.WHO IS THE Miss INDIA WORLD 2008&lt;br /&gt;&lt;br /&gt;ANS- PARVATHY OMNAKUTTAN&lt;br /&gt;&lt;br /&gt;13.VENUE OF 15TH SAARC SUMMIT 2008?&lt;br /&gt;&lt;br /&gt;ANS- COLOMBO (SRI LANKA)&lt;br /&gt;&lt;br /&gt;14.WHO GOT DADA SAHEB PHALKE RATNA AWARD 2008?&lt;br /&gt;&lt;br /&gt;ANS- B.R.CHOPRA&lt;br /&gt;&lt;br /&gt;15.WHO IS THE WINNER OF WORLD CUP CRICKET 2007 ?&lt;br /&gt;&lt;br /&gt;ANS- AUSTRALIA&lt;br /&gt;&lt;br /&gt;16.WHO IS THE WORLD CUP CRICKET 2007 RUNNER UP ?&lt;br /&gt;&lt;br /&gt;ANS- SRI LANKA&lt;br /&gt;&lt;br /&gt;17.WHO IS THE WINNER OF FRENCH OPEN 2008 WOMENS TITLE ?&lt;br /&gt;&lt;br /&gt;ANS- Ana Ivanovic&lt;br /&gt;&lt;br /&gt;18.WHO COMPLETED 16000 RUNS IN ODI RECENTLY ?&lt;br /&gt;&lt;br /&gt;ANS- SACHIN TENDULKAR&lt;br /&gt;&lt;br /&gt;19.WHO IS THE PRESIDENT OF RUSSIA ?&lt;br /&gt;&lt;br /&gt;ANS-DMITRI MEDWEDEV&lt;br /&gt;&lt;br /&gt;20.WHO IS THE PRIME MINISTER OF RUSSIA ?&lt;br /&gt;&lt;br /&gt;ANS- VLADIMIR PUTIN&lt;br /&gt;&lt;br /&gt;21.WHO IS THE WORLD BANK PRESIDENT ?&lt;br /&gt;&lt;br /&gt;ANS- ROBERT ZOELLICK&lt;br /&gt;&lt;br /&gt;22.INDIA HAS SUCCESSFULLY TEST FIRED AGNI III IN THE MONTH OF MAY 2008. WHICH TYPE OF MISSILE BELONGS TO AGNI III -&lt;br /&gt;&lt;br /&gt;ANS - SURFACE TO SURFACE INTERMEDIATE RANGE BALLISTIC MISSILE&lt;br /&gt;&lt;br /&gt;Download free online SBI Clerical Exam Job Test Question Paper with answers and solutions. Also see SBI Officers exam question paper. See various HR and technical job interview questions free for top IT companies and Banks here.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-9022925883462325540?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/9022925883462325540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=9022925883462325540' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/9022925883462325540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/9022925883462325540'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/sbi-clerical-exam-current-affairs-test.html' title='SBI Clerical Exam Current Affairs test Question Paper ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-5932783979022153880</id><published>2008-08-12T02:59:00.001-07:00</published><updated>2008-08-12T02:59:54.870-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SBI Placement Papers'/><category scheme='http://www.blogger.com/atom/ns#' term='SBI Test Question Paper'/><category scheme='http://www.blogger.com/atom/ns#' term='SBI Clerical Exam'/><title type='text'>SBI Clerical Exam Paper Pattern Latest ..... Interview question</title><content type='html'>&lt;a href=""&gt;State Bank Of India Clerical Appointment test / Employment exam question paper Latest Pattern:&lt;br /&gt;State bank of india is recruiting clerks about 20000 in number. The placement paper / job test paper pattern is given below for every subject. The number of questions for every subject / topic are given. The pattern is according to State bank of india sbi latest specifications.&lt;br /&gt;&lt;br /&gt;General Awareness - 40 questions - 40 marks&lt;br /&gt;English Language - 40 questions - 40 marks&lt;br /&gt;Quantitative Aptitude - 40 questions - 40 marks&lt;br /&gt;Reasoning Ability - 40 questions - 40 marks&lt;br /&gt;Marketing Aptitude / Computer Knowledge - 40 questions - 40 marks&lt;br /&gt;Total are 200 questions and 200 marks&lt;br /&gt;&lt;br /&gt;Note: In this time psychometry is not included in examination. See free online SBI Clerical Jobs exam / Test Question Paper with answers and free solutions. Also Downlaod free SBI Officers exam question paper. See various HR and technical job interview questions free for top IT companies and Banks here.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-5932783979022153880?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/5932783979022153880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=5932783979022153880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5932783979022153880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5932783979022153880'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/sbi-clerical-exam-paper-pattern-latest.html' title='SBI Clerical Exam Paper Pattern Latest ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-4869989032511502809</id><published>2008-08-12T02:58:00.000-07:00</published><updated>2008-08-12T02:59:03.850-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sbi general knowledge paper'/><category scheme='http://www.blogger.com/atom/ns#' term='SBI Placement Papers'/><category scheme='http://www.blogger.com/atom/ns#' term='SBI Test Question Paper'/><category scheme='http://www.blogger.com/atom/ns#' term='SBI Clerical Exam'/><title type='text'>State bank of india placement test paper questions: ..... Interview question</title><content type='html'>&lt;a href=""&gt;SBI General Knowledge Placement Test Paper questions / recruitment test exam questions booklet with answer keys for State Bank of India free&lt;br /&gt;&lt;br /&gt;1. The Kishenganga Power Project is in-&lt;br /&gt;A. Orissa&lt;br /&gt;B. Maharashtra&lt;br /&gt;C. Gujarat&lt;br /&gt;D. Jammu &amp; Kashmir&lt;br /&gt;Ans (D)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. The late Nirmala Desh Pande was a famous&lt;br /&gt;A. diplomat&lt;br /&gt;B. astrologer&lt;br /&gt;C. Social activist&lt;br /&gt;D. film-star&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Who has been awarded the Prem Bhatia Award for the year 2008 ?&lt;br /&gt;A. Nilanjana Bose&lt;br /&gt;B. Rupashree Nanda&lt;br /&gt;C. Nirupama Subramanian&lt;br /&gt;D. None of these&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Microwave ovens cook dishes by means of&lt;br /&gt;A. Ultraviolet rays&lt;br /&gt;B. Infra-red rays&lt;br /&gt;C. Convection&lt;br /&gt;D. Conduction&lt;br /&gt;Ans (D)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. Most of the phenomena related to weather take place in&lt;br /&gt;A. stratosphere&lt;br /&gt;B. ionosphere&lt;br /&gt;C. mesosphere&lt;br /&gt;D. troposphere&lt;br /&gt;Ans (D)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. The current President of the World Bank is&lt;br /&gt;A. Dominique Strauss-Kahn&lt;br /&gt;B. James D. Wolfansen&lt;br /&gt;C. Barbara Cartland&lt;br /&gt;D. Robert Zoellick&lt;br /&gt;Ans (D)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. Amartya Sen, the NRI Nobel laureate got the honour for his work on&lt;br /&gt;A. Game theory&lt;br /&gt;B. Securities analysis&lt;br /&gt;C. Poverty and famines&lt;br /&gt;D.Impact of Industrialization&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8. The Quit India resolution was passed at the&lt;br /&gt;A. Bombay session of I.N.C. in 1940&lt;br /&gt;B. Bombay session of I.N.C. in 1941&lt;br /&gt;C. Bombay session of I.N.C. in 1942&lt;br /&gt;D. Bombay session of I.N.C. in 1945.&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9. Who among the following is not a ghazal singer?&lt;br /&gt;A. Talat Aziz&lt;br /&gt;B. Chandan Dass&lt;br /&gt;C. Peenaz Masani&lt;br /&gt;D. Jagdev Singh&lt;br /&gt;Ans (D)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10. Nobel Prize for literature in 2007 was received by-&lt;br /&gt;A. Doris Lessing&lt;br /&gt;B. Albert Al Gore&lt;br /&gt;C. Mohammad Yunus&lt;br /&gt;D. None of these&lt;br /&gt;Ans (A)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11. Meteorites are the heavenly bodies&lt;br /&gt;A. between the Mars and the Jupiter&lt;br /&gt;B. between the Saturn and the Neptune&lt;br /&gt;C. between the Mars and the Venus&lt;br /&gt;D. that burn brightly on entering the Earth’s atmosphere&lt;br /&gt;Ans (D)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12. P-5 is a group of&lt;br /&gt;A. highly developed countries&lt;br /&gt;B. Highly populous countries&lt;br /&gt;C. Permanent members of the Security Council&lt;br /&gt;D. Established nuclear powers&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;13. Arrange the following in chronological order:&lt;br /&gt;a. Dandi March&lt;br /&gt;b. McDonald Award&lt;br /&gt;c. Hanging of Bhagat Singh&lt;br /&gt;d. Meerut conspiracy case&lt;br /&gt;A. a, b, c, d&lt;br /&gt;B. b, a, c, d&lt;br /&gt;C. d, c, a, b,&lt;br /&gt;D. d, a, c, b&lt;br /&gt;Ans (A)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;14. Which of the following is a land-locked state?&lt;br /&gt;A. Gujarat&lt;br /&gt;B. Andhra Pradesh&lt;br /&gt;C. Madhya Pradesh&lt;br /&gt;D. Tamil Nadu&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15. Which of the following is not an official language as per the 8th schedule?&lt;br /&gt;A. Konkani&lt;br /&gt;B. Sindhi&lt;br /&gt;C. Manipuri&lt;br /&gt;D. English&lt;br /&gt;Ans (D)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;16. Which of the following used in making computer chips ?&lt;br /&gt;A. Carbon&lt;br /&gt;B. Uranium&lt;br /&gt;C. Silicon&lt;br /&gt;D. Rubidium&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;17. In order to see an undersea object while in a ship, you would make use of a&lt;br /&gt;A. telescope&lt;br /&gt;B. periscope&lt;br /&gt;C. marinoscope&lt;br /&gt;D None of these&lt;br /&gt;Ans (B)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;18. Baan Ki-moon , the UNO Secretary-General belong to&lt;br /&gt;A. Saudi Arab&lt;br /&gt;B. Egypt&lt;br /&gt;C. South Korea&lt;br /&gt;D. Brazil&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;19. The deepest ocean in the world is&lt;br /&gt;A. The Indian ocean&lt;br /&gt;B. The Atlantic ocean&lt;br /&gt;C. The Pacific ocean&lt;br /&gt;D. None of these&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;20. The oldest mutual fund in India is the&lt;br /&gt;A. SBI Mutual Fund&lt;br /&gt;B. BOB Mutual Fund&lt;br /&gt;C. PNB Mutual Fund&lt;br /&gt;D. Unit Trust of India&lt;br /&gt;Ans (D)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;21. A candidate for elections to the Lok Sabha stands to lose his Deposit Money if he fails to get&lt;br /&gt;A. 1/5 of the total valid votes&lt;br /&gt;B. 1/8 of the valid votes&lt;br /&gt;C. 1/6 of the valid votes polled&lt;br /&gt;D. none of these&lt;br /&gt;Ans (A)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;22. The Varanasi–Kanyakumari National Highway is called&lt;br /&gt;A. N.H. – 8&lt;br /&gt;B. N. H. – 7&lt;br /&gt;C. N.H. – 12&lt;br /&gt;D. N.H. – 9&lt;br /&gt;Ans (B)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;23. Which of the following areas of output is witnessing a new revolution?&lt;br /&gt;A. oilseeds&lt;br /&gt;B. fisheries&lt;br /&gt;C. fruits&lt;br /&gt;D. cereals&lt;br /&gt;Ans (A)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;24. The W.T.O. came into being on&lt;br /&gt;A. 1st April, 1995&lt;br /&gt;B. 1st April, 1994&lt;br /&gt;C. 1st Jan., 1995&lt;br /&gt;D. 1st Jan., 1996&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;25. Bangal was partitioned during the viceroyalty of&lt;br /&gt;A. Lord Rippon&lt;br /&gt;B. Lord Curzon&lt;br /&gt;C. Lord Hardinge&lt;br /&gt;D. Lord Minto&lt;br /&gt;Ans (B)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;26. Tata purchased Jaguar and Rover from-&lt;br /&gt;A. Hyundai&lt;br /&gt;B. Maruti-Suzuki&lt;br /&gt;C. Ford Motor&lt;br /&gt;D. General Motor&lt;br /&gt;Ans (C)&lt;br /&gt;&lt;br /&gt;See more State Bank of India Questions and answers from job placement test question paper / SBI exam paper free. Download free SBI Clerical Exam papers and Latest SBI Officers recruitment exam test paper questions as these are given free online here. &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-4869989032511502809?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/4869989032511502809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=4869989032511502809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4869989032511502809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4869989032511502809'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/state-bank-of-india-placement-test.html' title='State bank of india placement test paper questions: ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-1224304479649297287</id><published>2008-08-12T02:56:00.000-07:00</published><updated>2008-08-12T02:57:56.754-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Capgemini Placement Papers'/><title type='text'>Capgemini India Placement Test Whole Question Paper ..... Interview question</title><content type='html'>&lt;a href=""&gt;Capgemini Paper on 14th may held at kolkata, West Bengal&lt;br /&gt;Time: 60 minutes&lt;br /&gt;Set 2&lt;br /&gt;Section A&lt;br /&gt;&lt;br /&gt;Questions: (aptitude, technical and other questions)&lt;br /&gt;1. Find min value of fn:&lt;br /&gt;-5-x + 2-x+6-x+10-x; where x is an integer&lt;br /&gt;0/17/23/19&lt;br /&gt;2. units digit in expansion os 2 raised to 51 is:&lt;br /&gt;2/4/6/8&lt;br /&gt;3. 2 men at same tym start walking towards each other from A n B 72 kms apart. sp of A is 4kmph.Sp of B is 2 kmph in 1st hr,2.5 in 2nd, 3 in rd. n so on…when will they meet&lt;br /&gt;i in 7 hrs&lt;br /&gt;ii at 35 kms from A&lt;br /&gt;iii in 10 hrs&lt;br /&gt;iv midway&lt;br /&gt;&lt;br /&gt;4. (8*76+19*?-60) / (?*7*12+3-52)=1&lt;br /&gt;5/2/1/3&lt;br /&gt;&lt;br /&gt;5. 45 grinders brought @ 2215/-.transpot expense 2190/-.2760/- on octroi . Find SP/piece to make profit of 20%&lt;br /&gt;2585/2225/2670/3325&lt;br /&gt;&lt;br /&gt;6. in a 2 digit no unit’s place is halved and tens place is doubled.diff bet the nos is 37.digit in unit’s place is 2 more than tens place.&lt;br /&gt;24/46/42/none&lt;br /&gt;&lt;br /&gt;7. if x-y + z = 19 , y + z =20 , x-z=3 , find d value of x+4y-5z&lt;br /&gt;22/38/17/none&lt;br /&gt;&lt;br /&gt;8. Find approx value of 39.987/0.8102+1.987*18.02&lt;br /&gt;72/56/86/44&lt;br /&gt;&lt;br /&gt;9. If the ratio of prod of 3 diff comp’s A B &amp; C is 4:7:5 and of overall prod last yr was 4lac tones and if each comp had an increase of 20% in prod level this yr what is the prod of Comp B this yr?&lt;br /&gt;2.1L/22.1L/4.1L/none&lt;br /&gt;&lt;br /&gt;10. If 70% of a no. is subtracted from itself it reduces to 81.what is two fifth of that no.?&lt;br /&gt;108/54/210/none&lt;br /&gt;&lt;br /&gt;11. If a certain sum of money at SI doubles itself in 5 yrs then what is d rate?&lt;br /&gt;5%/20%/25%/14.8%&lt;br /&gt;&lt;br /&gt;12. If radius of cylinder and sphere r same and vol of sphere and cylinder r same what is d ratio betn the radius and height of the cylinder&lt;br /&gt;i. R= H&lt;br /&gt;ii. R= (3/4)H&lt;br /&gt;iii. R = (4/3)H&lt;br /&gt;iv. R=2/3H&lt;br /&gt;&lt;br /&gt;13. Which one of the foll fractions is arranged in ascending order&lt;br /&gt;i. 9/11,7/9,11/13,13/14&lt;br /&gt;ii 7/8,9/11,11/13,13/14&lt;br /&gt;iii 9/11,11/13,7/8,13/14&lt;br /&gt;iv none&lt;br /&gt;14. A is 4 yrs old and B is thrice A&gt;when A is 12 yrs, how old will B be?&lt;br /&gt;16/20/24/28&lt;br /&gt;15. Boat goes downstream from P to Q in 2hrs, upstream in 6hrs and if speed of stream was ½ of boat in still water. Find dist PQ&lt;br /&gt;6/4/10/none&lt;br /&gt;16. Fresh Grapes contain 90% water by wt. Dried grapes contain 20% water by %age. What will b wt of dried grapes when we begin with 20 kg fresh grapes?&lt;br /&gt;2kg / 2.4kg / 2.5kg /none&lt;br /&gt;17. How many 5 digit no. can b formed wit digits 1, 2, 3,4,5,6 which r divisible by 4 and digits not repeated&lt;br /&gt;144 / 168 / 192 / none&lt;br /&gt;18. Asish was given Rs. 158 in denominations of Rs 1 each. He distributes these in diff bags, such that ne sum of money of denomination betn 1 and 158 can be given in bags. The min no. of such bags reqd&lt;br /&gt;10 / 17 / 15 / none&lt;br /&gt;19.There is a rectangular Garden whose length and width are 60m X 20m.There is a walkway of uniform width around garden. Area of walkway is 516m^2. Find width of walkway&lt;br /&gt;1/2/3/4&lt;br /&gt;20. In a race from pt. X to pt Y and back, Jack averages 0 miles/hr to pt Y and 10 miles/hr back to pr X.Sandy averages 20 miles/hr in both directions. If Jack and Sandy start race at same tym, who’ll finish 1st&lt;br /&gt;Jack/Sandy/they tie/Impossible to tell&lt;br /&gt;21. A man engaged a servant on a condn that he’ll pay Rs 90 and also give him a bag at the end of the yr. He served for 9 months and was given a turban and Rs 65. So the price of turban is&lt;br /&gt;i. Rs 10 / 19 / 0 / 55&lt;br /&gt;22. Three wheels make 36, 24, 60 rev/min. Each has a black mark on it. It is aligned at the start of the qn. When does it align again for the first tym?&lt;br /&gt;14/20/22/5 sec&lt;br /&gt;&lt;br /&gt;23. If 1= (3/4)(1+ (y/x) ) then&lt;br /&gt;i. x=3y&lt;br /&gt;ii. x=y/3&lt;br /&gt;iii. x=(2/3)y&lt;br /&gt;iv. none&lt;br /&gt;24. The sum of six consecutive odd nos. is 888. What is the average of the nos.?&lt;br /&gt;i. 147&lt;br /&gt;ii. 148&lt;br /&gt;iii. 149&lt;br /&gt;iv. 146&lt;br /&gt;25. 1010/104*102=10?&lt;br /&gt;i. 8&lt;br /&gt;ii. 6&lt;br /&gt;iii. 4&lt;br /&gt;iv. none&lt;br /&gt;&lt;br /&gt;Capgemini Placement Paper Section B&lt;br /&gt;Direction for Qn 1-8&lt;br /&gt;&lt;br /&gt;Ans A using I only&lt;br /&gt;Ans B using II only&lt;br /&gt;Ans C using both I and II&lt;br /&gt;Ans D not solvable&lt;br /&gt;&lt;br /&gt;Raman and Gaurav Brought eggs from a vendor. How many eggs were bought by each of them&lt;br /&gt;i. Raman bought half as many as Gaurav&lt;br /&gt;ii. The dealer had a stock of 500 eggs at the beginning of day&lt;br /&gt;What is the age of Ramprakash?&lt;br /&gt;i. Ramprakash was born when his father was 26 yrs old&lt;br /&gt;ii. Ramprakash’s mothers age is 3yrs less than his father’s&lt;br /&gt;How much time is reqd for downloading the software?&lt;br /&gt;i. The Data transfer rate is 6 kbps&lt;br /&gt;ii. The size of the software is 4.5 megabytes&lt;br /&gt;Sanjay and Vijay started their journey from Mumbai to Pune. Who reached Pune first?&lt;br /&gt;i. Sanjay overtakes two times Vijay and Vijay overtakes Sanjay two times&lt;br /&gt;ii. Sanjay started first&lt;br /&gt;Is the GDP of country X higher than Country Y?&lt;br /&gt;i. GDP’s of X and Y has been increasing at a compounded annual growth rate of 5% and 6% over he past 5 yrs&lt;br /&gt;ii. 5 yrs ago GDP of X was 1.2 times Y&lt;br /&gt;A boat can ferry 1500 passengers across a river in 12 hrs. How many round trips does it make during the journey?&lt;br /&gt;i. The boat can carry 400 passengers at a time&lt;br /&gt;ii. During its journey, the boat takes 40 mins time each way and 20 mins waiting time at each end.&lt;br /&gt;What are the values of m and n?&lt;br /&gt;i. n is an even integer, m is odd integer and m is greater than n.&lt;br /&gt;ii. The product of m and n is 30&lt;br /&gt;How much is the weight of 20 mangoes and 30 oranges?&lt;br /&gt;i. 1 orange weighs twice that of 1 mango&lt;br /&gt;ii. 2 mangoes and 3 oranges weigh 2 kg&lt;br /&gt;&lt;br /&gt;Direction for Qn 9-12&lt;br /&gt;Five teams participated in Pepsi Cup. Each team played against each other. The top teams played finals. A win fetched 2 pts and a tie 1 point&lt;br /&gt;&lt;br /&gt;1) South Africa were in the finals&lt;br /&gt;2) India defeated SA but failed to reach the finals&lt;br /&gt;3) Australia lost only one match in the tournament&lt;br /&gt;4) The match between India and Sri Lanka was a tie&lt;br /&gt;5) The undefeated team in the league matches lost in the finals&lt;br /&gt;6) England was one of the best teams that did not qualify&lt;br /&gt;&lt;br /&gt;Who were the finalists?&lt;br /&gt;i. SA &amp; India&lt;br /&gt;ii. Aus &amp; SL&lt;br /&gt;iii. SA &amp; SL&lt;br /&gt;iv. none&lt;br /&gt;Who won the finals?&lt;br /&gt;i. Aus&lt;br /&gt;ii. SL&lt;br /&gt;iii. SA&lt;br /&gt;iv. Can’t be determined&lt;br /&gt;How many matches did India Win?&lt;br /&gt;i. 0&lt;br /&gt;ii. 1&lt;br /&gt;iii. 2&lt;br /&gt;iv. can’t be determined&lt;br /&gt;What was the outcome of the India England Match&lt;br /&gt;i. India won&lt;br /&gt;ii. England won&lt;br /&gt;iii. It was a tie&lt;br /&gt;iv. Can’t be determined&lt;br /&gt;&lt;br /&gt;Direction for Qn 13-14&lt;br /&gt;These qns are based on situations given below:&lt;br /&gt;7 Uni crick players are to be honored at a special luncheon. The players will be seated on a dais along one side of a single rectangular table.&lt;br /&gt;A and G have to leave the luncheon early and must be seated at the extreme right end of table, which is closest to exit.&lt;br /&gt;B will receive Man of the Match and must be in the centre chair&lt;br /&gt;C and D who are bitter rivals for the position of Wicket keeper dislike one another and should be seated as far apart as possible&lt;br /&gt;E and F are best friends and want to seat together.&lt;br /&gt;&lt;br /&gt;Which of the foll may not be seated at either end of the table?&lt;br /&gt;i. C&lt;br /&gt;ii. D&lt;br /&gt;iii. G&lt;br /&gt;iv. F&lt;br /&gt;Which of the foll pairs may not be seated together?&lt;br /&gt;i. E &amp; A&lt;br /&gt;ii. B &amp; D&lt;br /&gt;iii. C &amp; F&lt;br /&gt;iv. G &amp; D&lt;br /&gt;&lt;br /&gt;Direction for Qn 15-18&lt;br /&gt;An employee has to allocate offices to 6 staff members. The offices are no. 1-6. the offices are arranged in a row and they are separated from each other by dividers&gt;hence voices, sounds and cigarette smoke flow easily from one office to another&lt;br /&gt;Miss R needs to use the telephone quite often throughout the day. Mr. M and Mr. B need adjacent offices as they need to consult each other often while working. Miss H is a senior employee and his to be allotted the office no. 5, having the biggest window.&lt;br /&gt;Mr D requires silence in office next to his. Mr. T, Mr M and Mr. D are all smokers. Miss H finds tobacco smoke allergic and consecutively the offices next to hers are occupied by non-smokers. Unless specifically stated all the employees maintain an atmosphere of silence during office hrs.&lt;br /&gt;&lt;br /&gt;The ideal candidate to occupy office farthest from Mr. B will be&lt;br /&gt;i. Miss H&lt;br /&gt;ii. Mr. M&lt;br /&gt;iii. Mr. T&lt;br /&gt;iv. Mr. D&lt;br /&gt;The three employees who are smokers should be seated in the offices&lt;br /&gt;i. 1 2 4&lt;br /&gt;ii. 2 3 6&lt;br /&gt;iii. 1 2 3&lt;br /&gt;iv. 1 2 3&lt;br /&gt;The ideal office for Mr. M would be&lt;br /&gt;i. 2&lt;br /&gt;ii. 6&lt;br /&gt;iii. 1&lt;br /&gt;iv. 3&lt;br /&gt;In the event of what occurrence within a period of one month since the assignment of the offices would a request for a change in office be put forth by one or more employees?&lt;br /&gt;i. Mr D quitting smoking&lt;br /&gt;ii. Mr. T taking over duties formally taken care of by Miss R&lt;br /&gt;iii. The installation of a water cooler in Miss H’s office&lt;br /&gt;iv. Mr. B suffering from anemia&lt;br /&gt;&lt;br /&gt;Direction for Qn 19-20&lt;br /&gt;A robot moves on a graph sheet with x-y axes. The robot is moved by feeding it with a sequence of instructions. The different instructions that can be used in moving it, and their meanings are:&lt;br /&gt;Instruction Meaning&lt;br /&gt;GOTO(x,y) move to pt with co-ord (x,y) no matter where u are currently&lt;br /&gt;WALKX(P) move parallel to x-axis through a distance of p, in the +ve direction if p is +ve and in –ve if p is –ve&lt;br /&gt;WALKY(P) move parallel to y-axis through a distance of p, in the +ve direction if p is +ve and in –ve if p is –ve&lt;br /&gt;&lt;br /&gt;The robot reaches point (5,6) when a sequence of 3 instr. Is executed, the first of which is GOTO(x,y) , WALKY(2), WALKY(4). What are the values of x and y??&lt;br /&gt;i. 2,4&lt;br /&gt;ii. 0,0&lt;br /&gt;iii. 3,2&lt;br /&gt;iv. 2,3&lt;br /&gt;The robot is initially at (x.y), x&gt;0 and y&lt;0. The min no. of Instructions needed to be executed to bring it to origin (0,0) if you are prohibited from using GOTO instr. Is:&lt;br /&gt;i. 2&lt;br /&gt;ii. 1&lt;br /&gt;iii. x + y&lt;br /&gt;iv. 0&lt;br /&gt;&lt;br /&gt;Direction for Qn 21-23&lt;br /&gt;Ten coins are distr. Among 4 people P, Q, R, S such that one of them gets a coin, another gets 2 coins,3rd gets 3 coins, and 4th gets 4 coins. It is known that Q gets more coins than P, and S gets fewer coins than R&lt;br /&gt;&lt;br /&gt;If the no. of coins distr. To Q is twice the no. distr. to P then which one of the foll. is necessarily true?&lt;br /&gt;i. R gets even no. of coins&lt;br /&gt;ii. R gets odd no. of coins&lt;br /&gt;iii. S gets even no. of coins&lt;br /&gt;iv. S gets odd no. of coins&lt;br /&gt;If R gets at least two more coins than S which one of the foll is necessarily true?&lt;br /&gt;i. Q gets at least 2 more coins than S&lt;br /&gt;ii. Q gets more coins than P&lt;br /&gt;iii. P gets more coins than S&lt;br /&gt;iv. P and Q together get at least five coins&lt;br /&gt;If Q gets fewer coins than R, then which one of the foll. is not necessarily true?&lt;br /&gt;i. P and Q together get at least 4 coins&lt;br /&gt;ii. Q and S together get at least 4 coins&lt;br /&gt;iii. R and S together get at least 5 coins&lt;br /&gt;iv. P and R together get at least 5 coins&lt;br /&gt;&lt;br /&gt;Direction for Qn 24-25&lt;br /&gt;Elle is 3 times older than Zaheer. Zaheer is ½ as old as Waheeda. Yogesh is elder than Zaheer.&lt;br /&gt;&lt;br /&gt;What is sufficient to estimate Elle’s age?&lt;br /&gt;i. Zaheer is 10 yrs old&lt;br /&gt;ii. Yogesh and Waheeda are both older than Zaheer by the same no of yrs.&lt;br /&gt;iii. Both of the above&lt;br /&gt;iv. None of the above&lt;br /&gt;Which one of the foll. statements can be inferred from the info above&lt;br /&gt;i. Yogesh is elder than Waheeda&lt;br /&gt;ii. Elle is older than Waheeda&lt;br /&gt;iii. Elle’s age may be less than that of Waheeda&lt;br /&gt;iv. None of the above&lt;br /&gt;&lt;br /&gt;In the placement Papers sets, the questions were the same. Just the question numbers were changed. See other Capgemini India Latest Placement Papers here with technical hr interview questions here.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-1224304479649297287?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/1224304479649297287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=1224304479649297287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1224304479649297287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1224304479649297287'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/capgemini-india-placement-test-whole.html' title='Capgemini India Placement Test Whole Question Paper ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-915098258612619637</id><published>2008-08-12T02:55:00.000-07:00</published><updated>2008-08-12T02:56:32.396-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Capgemini Placement Papers'/><title type='text'>Capgemini India Latest 2008 July Placement Paper ..... Interview question</title><content type='html'>&lt;a href=""&gt;CAPGEMINI PAPER ON 22ND JULY, 2008&lt;br /&gt;&lt;br /&gt;Here are the written test aptitude and other multiple choice questions from the Capgemini IT company placement exam test paper 2008:&lt;br /&gt;&lt;br /&gt;1.Fresh Grapes contain 90% water by wt. Dried grapes contain 20% water by %age. What will b wt of dried grapes when we begin with 20 kg fresh grapes?&lt;br /&gt;2kg / 2.4kg / 2.5kg /none&lt;br /&gt;2.How many 5 digit no. can b formed wit digits 1, 2, 3,4,5,6 which r divisible by 4 and digits not repeated&lt;br /&gt;144 / 168 / 192 / none&lt;br /&gt;3.There is a rectangular garden whose length and width are 60m X 20m.There is a walkway of uniform width around garden. Area of walkway is 516m^2. Find width of walkway&lt;br /&gt;1/2/3/4&lt;br /&gt;4. In a race from pt. X to pt Y and back, Jack averages 0 miles/hr to pt Y and 10 miles/hr back to pr X. Sandy averages 20 miles/hr in both directions. If Jack and Sandy start race at same tIme, who’ll finish 1st&lt;br /&gt;Jack/Sandy/they tie/Impossible to tell&lt;br /&gt;5. A man engaged a servant on a condition that he’ll pay Rs 90 and also give him a bag at the end of the yr. He served for 9 months and was given a turban and Rs 65. So the price of turban is&lt;br /&gt;i. Rs 10 / 19 / 0 / 55&lt;br /&gt;6. Three wheels make 36, 24, 60 rev/min. Each has a black mark on it. It is aligned at the start of the qn.When does it align again for the first time?&lt;br /&gt;14/20/22/5 sec&lt;br /&gt;7. If 1= (3/4)(1+ (y/x) ) then&lt;br /&gt;i. x=3y&lt;br /&gt;ii. x=y/3&lt;br /&gt;iii. x=(2/3)y&lt;br /&gt;iv. none&lt;br /&gt;8. The sum of six consecutive odd nos. is 888. What is the average of the nos.?&lt;br /&gt;i. 147&lt;br /&gt;ii. 148&lt;br /&gt;iii. 149&lt;br /&gt;iv. 146&lt;br /&gt;9.An employee has to allocate offices to 6 staff members. The offices are no. 1-6. the offices are arranged in a row and they are separated from each other by dividers&gt;hence voices, sounds and cigarette smoke flow easily from one office to another&lt;br /&gt;Miss R needs to use the telephone quite often throughout the day. Mr. M and Mr. B need adjacent offices as they need to consult each other often while working. Miss H is a senior employee and his to be allotted the office no. 5, having the biggest window.&lt;br /&gt;Mr. D requires silence in office next to his. Mr. T, Mr. M and Mr. D are all smokers. Miss H finds tobacco smoke allergic and consecutively the offices next to hers are occupied by non-smokers. Unless specifically stated all the employees maintain an atmosphere of silence during office hrs.&lt;br /&gt;a. The ideal candidate to occupy office farthest from Mr. B will be&lt;br /&gt;i. Miss H&lt;br /&gt;ii. Mr. M&lt;br /&gt;iii. Mr. T&lt;br /&gt;iv. Mr. D&lt;br /&gt;b. The three employees who are smokers should be seated in the offices&lt;br /&gt;i. 1 2 4&lt;br /&gt;ii. 2 3 6&lt;br /&gt;iii. 1 2 3&lt;br /&gt;iv. 1 2 3&lt;br /&gt;c. The ideal office for Mr. M would be&lt;br /&gt;i. 2&lt;br /&gt;ii. 6&lt;br /&gt;iii. 1&lt;br /&gt;iv. 3&lt;br /&gt;d. In the event of what occurrence within a period of one month since the assignment of the offices would a request for a change in office be put forth by one or more employees?&lt;br /&gt;i. Mr D quitting smoking&lt;br /&gt;ii. Mr. T taking over duties formally taken care of by Miss R&lt;br /&gt;iii. The installation of a water cooler in Miss H’s office&lt;br /&gt;iv. Mr. B suffering from anemia&lt;br /&gt;10.Ten coins are distr. Among 4 people P, Q, R, S such that one of them gets a coin, another gets 2 coins,3rd gets 3 coins, and 4th gets 4 coins. It is known that Q gets more coins than P, and S gets fewer coins than R&lt;br /&gt;a. If the no. of coins distr. To Q is twice the no. distr. to P then which one of the following. is necessarily true?&lt;br /&gt;i. R gets even no. of coins&lt;br /&gt;ii. R gets odd no. of coins&lt;br /&gt;iii. S gets even no. of coins&lt;br /&gt;iv. S gets odd no. of coins&lt;br /&gt;b. If R gets at least two more coins than S which one of the following is necessarily true?&lt;br /&gt;i. Q gets at least 2 more coins than S&lt;br /&gt;ii. Q gets more coins than P&lt;br /&gt;iii. P gets more coins than S&lt;br /&gt;iv. P and Q together get at least five coins&lt;br /&gt;c. If Q gets fewer coins than R, then which one of the following is not necessarily true?&lt;br /&gt;i. P and Q together get at least 4 coins&lt;br /&gt;ii. Q and S together get at least 4 coins&lt;br /&gt;iii.R and S together get at least 5 coins&lt;br /&gt;iv.P and R together get at least 5 coins&lt;br /&gt;11.Elle is 3 times older than Zaheer. Zaheer is ½ as old as Waheeda. Yogesh is elder than Zaheer.&lt;br /&gt;a. What is sufficient to estimate Elle’s age?&lt;br /&gt;i.Zaheer is 10 yrs old&lt;br /&gt;ii.Yogesh and Waheeda are both older than Zaheer by the same no of yrs.&lt;br /&gt;iii.Both of the above&lt;br /&gt;iv.None of the above&lt;br /&gt;b. Which one of the following statements can be inferred from the info above&lt;br /&gt;i.Yogesh is elder than Waheeda&lt;br /&gt;ii.Elle is older than Waheeda&lt;br /&gt;iii.Elle’s age may be less than that of Waheeda&lt;br /&gt;iv.None of the above&lt;br /&gt;&lt;br /&gt;See other Capgemini Placement Test papers, latest 2008 exam papers, call centres, bpo, kpo, executives, voice caller, developers, software engineers, b.tech electronics and communications ece, computer science engineering cse, it information technology freshers placement papers and technical hr interview questions. Download and save free test papers here.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-915098258612619637?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/915098258612619637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=915098258612619637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/915098258612619637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/915098258612619637'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/capgemini-india-latest-2008-july.html' title='Capgemini India Latest 2008 July Placement Paper ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8714230525561581922</id><published>2008-08-12T02:54:00.000-07:00</published><updated>2008-08-12T02:55:25.321-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechMahindra Placement Test Papers'/><title type='text'>Tech Mahindra Latest Placement Test Paper ..... Interview question</title><content type='html'>&lt;a href=""&gt;Here is the Tech Mahindra India placement test held on 18th April at Deen Bandhu Chhotu Ram University of Science and Technology Murthal Haryana.&lt;br /&gt;Statistics:&lt;br /&gt;&lt;br /&gt;Total Appeared - 135&lt;br /&gt;Written test cleared by - 68&lt;br /&gt;Technical Cleared by - 37&lt;br /&gt;HR Interview - 32&lt;br /&gt;&lt;br /&gt;In the multiple choice Written Exam there will be 5 Sections:&lt;br /&gt;&lt;br /&gt;2 sections of verbal and non verbal :&lt;br /&gt;Questions like find the missing term, series completion, some logical reasoning questions&lt;br /&gt;&lt;br /&gt;3 sections of English Language Test:&lt;br /&gt;General fill in the blanks like prepositions and verbs&lt;br /&gt;Easy synonyms&lt;br /&gt;Reading comprehension part&lt;br /&gt;Its easy one but requires preparation. The questions are expected one.&lt;br /&gt;&lt;br /&gt;There are 75 questions in 5 sections to be done in 60 minutes. So the time is short.&lt;br /&gt;There is no negative marking. And there is sectional cutoff.&lt;br /&gt;&lt;br /&gt;Tech Mahindra Technical Interview:&lt;br /&gt;&lt;br /&gt;Me: Enter the room and good afternoon sir&lt;br /&gt;Int: Good afternoon have your seat.&lt;br /&gt;&lt;br /&gt;Then the questions asked were:&lt;br /&gt;Tell me about yourself your background&lt;br /&gt;Keep moving from one company to another?&lt;br /&gt;About low class 10th and 12th scores.&lt;br /&gt;Why the 1 year gap?&lt;br /&gt;About pointers and link list&lt;br /&gt;Can u print fibbonacci series recursively?&lt;br /&gt;Ok do u want to ask anything?&lt;br /&gt;&lt;br /&gt;Then the Tech Mahindra Basic HR Interview:&lt;br /&gt;&lt;br /&gt;Have your seat.&lt;br /&gt;&lt;br /&gt;Describe Yourself.&lt;br /&gt;&lt;br /&gt;What is your biggest achievement till now?&lt;br /&gt;&lt;br /&gt;1 year gap?&lt;br /&gt;&lt;br /&gt;How will your friends describe you?&lt;br /&gt;&lt;br /&gt;Can u relocate?&lt;br /&gt;&lt;br /&gt;Are you ready to sign a bond and salary?&lt;br /&gt;Then i was asked to go and when the result was declared, i was selected.&lt;br /&gt;&lt;br /&gt;Watch other detailed Tech mahindra India and other it companies latest placement exam test papers here free online. You can download or save them here. See actual candidate experiences for tech mahindra technical tech hr interviews.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8714230525561581922?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8714230525561581922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8714230525561581922' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8714230525561581922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8714230525561581922'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/tech-mahindra-latest-placement-test.html' title='Tech Mahindra Latest Placement Test Paper ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-2161691726933879065</id><published>2008-08-12T02:53:00.000-07:00</published><updated>2008-08-12T02:54:23.053-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechMahindra Placement Test Papers'/><title type='text'>Tech Mahindra Placement Paper on 21st July at PES Mandya ..... Interview question</title><content type='html'>&lt;a href=""&gt;Here is the Tech Mahindra Placement test paper held at mandya on 21st july 2008. Its the latest test paper.&lt;br /&gt;&lt;br /&gt;Tech Mahindra visited our campus on 21st July 2008. Out of the 185 students, who were eligible for the test, 37 got short listed for the interviews and 19 got placed. The cutoff was 60% with one backlog allowed and it was only for CS, IS, EC and EE engineering b.tech departments.&lt;br /&gt;&lt;br /&gt;The Selection Procedure:&lt;br /&gt;&lt;br /&gt;Online Test: Written Multiple Choice Type Questions:&lt;br /&gt;&lt;br /&gt;100 questions and the time was 60 minutes.&lt;br /&gt;&lt;br /&gt;The questions were divided into 6 parts. Three of them were English sections. One was for non-verbal reasoning, one was for verbal reasoning and the other was of quantitative aptitude. There was a sectional cut off for all the sections.&lt;br /&gt;&lt;br /&gt;First attempt the english section as it takes less time, then go for logical reasoning / aptitude sections questions.&lt;br /&gt;&lt;br /&gt;2. Interviews:&lt;br /&gt;&lt;br /&gt;There were 3 interviews for us:&lt;br /&gt;&lt;br /&gt;HR cum technical interview, Technical interview and HR interview again.&lt;br /&gt;&lt;br /&gt;In the first interview they asked simple questions like the stack concept, use of "%d", use of getch() and the command to drop a table in DBMS - database management systems. One popular question like "Why Tech mahindra?" Here quote some facts about TM company itself.&lt;br /&gt;&lt;br /&gt;Technical interview: Asked questions from DBMS (favorite subject as written in resume), normalization, RDBMS, trigger and the use of null pointer.&lt;br /&gt;&lt;br /&gt;Final Part - HR Interview:&lt;br /&gt;&lt;br /&gt;The first question was "Tell me about your family in brief?"&lt;br /&gt;&lt;br /&gt;Other questions were:&lt;br /&gt;&lt;br /&gt;Tell me about your hobbies and interests?&lt;br /&gt;&lt;br /&gt;Are you ready to go to any place?&lt;br /&gt;&lt;br /&gt;Why tech mahindra?&lt;br /&gt;&lt;br /&gt;Why did you choose computer science?&lt;br /&gt;&lt;br /&gt;What are your short term and long term goals?&lt;br /&gt;&lt;br /&gt;So this was the final tech mahindra hr interview. See other latest 2008 placement papers and tech mahindra technical hr interview questions with solutions, tips, tricks and hr interview / group discussion guide free online here for freshers, engineers, developers, etc. Good Luck for your own placement test.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-2161691726933879065?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/2161691726933879065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=2161691726933879065' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2161691726933879065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2161691726933879065'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/tech-mahindra-placement-paper-on-21st_12.html' title='Tech Mahindra Placement Paper on 21st July at PES Mandya ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8730143154462699917</id><published>2008-08-12T02:52:00.000-07:00</published><updated>2008-08-12T02:53:01.883-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Birlasoft Placement Test Papers'/><title type='text'>Birlasoft Placement Paper on 28th February ..... Interview question</title><content type='html'>&lt;a href=""&gt;Here is the latest birlasoft india placement paper held on 28th of February. Here is the account of the paper.&lt;br /&gt;&lt;br /&gt;It was a two day campus placement drive. First there was an aptitude test and GD.&lt;br /&gt;In the Aptitude test, there were 50 questions. First 20-25 were technical. First three questions were on conversion from hexadecimal to octal, binary, etc. There were ques on dbms like what is denormalization, questions on java, c language, c++ These were simple questions. The quantitative questions were on alligation, speed and distance, profit and loss, probability, time and work.&lt;br /&gt;Next were questions on English Language. Choose the wrong sentence, synonyms and associate the meanings with the phrases given. Cutoff for the paper was arnd 40.&lt;br /&gt;&lt;br /&gt;Group Discussion Round: GD&lt;br /&gt;&lt;br /&gt;Topics for gd were future of it industry in india, should ganguly be the captain of indian cricket team, shilpa shetty vs jade goody at big brother, love marriages vs arranged marriages, etc.&lt;br /&gt;&lt;br /&gt;Next day there was first a ppt and then the hr cum technical interview:&lt;br /&gt;&lt;br /&gt;Questions: Me being an ece student they asked me about the communication system, how does commnication happen, etc.&lt;br /&gt;what are analog and digital signals, advantages of digital over analog - explain in layman's language, examples of where are we using these signals, some questions on optical fibres, their advantages. Then he asked some questions on C language then what are data structures, what is block, what is page statement, explain float&lt;br /&gt;&lt;br /&gt;HR Questions:&lt;br /&gt;&lt;br /&gt;How do you define success?&lt;br /&gt;&lt;br /&gt;How many friends do you have?&lt;br /&gt;&lt;br /&gt;What are your positives&lt;br /&gt;&lt;br /&gt;Do you read newspaper?&lt;br /&gt;&lt;br /&gt;Few more questions:&lt;br /&gt;&lt;br /&gt;Finally out of the 1600 students who appeared for the aptitude test 24 were finally selected.&lt;br /&gt;&lt;br /&gt;See other latest Birlasoft and other IT MNC placement question papers - download free other entrance exam test papers here with hr interview questions, solutions, tips, answers and tricks here. Good luck! see engineering, electronics and communication, computer science, information technology IT, electrical engineering EE, CSE, ECE, IT related technical / tech interview questions with real candidate experiences for your exam help. Good luck! &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8730143154462699917?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8730143154462699917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8730143154462699917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8730143154462699917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8730143154462699917'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/birlasoft-placement-paper-on-28th_12.html' title='Birlasoft Placement Paper on 28th February ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-2661951130373112406</id><published>2008-08-12T02:51:00.000-07:00</published><updated>2008-08-12T02:52:05.451-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechMahindra Placement Test Papers'/><title type='text'>Tech Mahindra Placement Paper at SGGS Nanded ..... Interview question</title><content type='html'>&lt;a href=""&gt;Tech Mahindra India Placement Test Paper on 18th April 2007 at SGGS Nanded engineering college.&lt;br /&gt;&lt;br /&gt;Tech Mahindra came to our college on April 18,2007. About 210 candidates appeared for the aptitude test and finally 30 cleared the aptitude test out of which 12 were selected.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Tech mahindra PPT:- First there was the paper presentation. They can ask questions abou ti in HR and Technical interview.&lt;br /&gt;&lt;br /&gt;2. Online Aptitude Test:&lt;br /&gt;&lt;br /&gt;There are 100 questions and time allowed is 1 hour. Listen the instructions from the HR carefully before solving the test. Solve all the questions as there is no negative marking.&lt;br /&gt;&lt;br /&gt;There were total 6 sections:-&lt;br /&gt;&lt;br /&gt;1.Verbal Ability(35 questions)&lt;br /&gt;&lt;br /&gt;2.Analytical(20 q)&lt;br /&gt;&lt;br /&gt;3.Quanti.(15 q)&lt;br /&gt;&lt;br /&gt;4.English I(10 q)&lt;br /&gt;&lt;br /&gt;5.English II(10 q)&lt;br /&gt;&lt;br /&gt;6.English III(10 q)&lt;br /&gt;&lt;br /&gt;Solve the english section first and then solve the other sections.&lt;br /&gt;&lt;br /&gt;3. Technical Interview:&lt;br /&gt;&lt;br /&gt;Tell me about yourself?&lt;br /&gt;&lt;br /&gt;Tell me about mouse programming in C (As I used mouse programming in my project)&lt;br /&gt;&lt;br /&gt;Difference between C and C++&lt;br /&gt;&lt;br /&gt;Few basic questions regarding DBMS - database management systems&lt;br /&gt;&lt;br /&gt;Asked about my strengths and weakness.&lt;br /&gt;&lt;br /&gt;Where do you want to see yourself after 5 years?&lt;br /&gt;&lt;br /&gt;They ask tricky questions related to your projects - the project interview questions can be difficult sometimes.&lt;br /&gt;&lt;br /&gt;Next was the HR Interview:&lt;br /&gt;&lt;br /&gt;Questions:&lt;br /&gt;&lt;br /&gt;Tell me about yourself.&lt;br /&gt;&lt;br /&gt;How will you sell the drinking bottle?&lt;br /&gt;&lt;br /&gt;Why should I select you?&lt;br /&gt;&lt;br /&gt;They asked some candidates to talk on a subject for 2 minutes.&lt;br /&gt;&lt;br /&gt;In MBT, if you clear Technical interview - the hr is normally easy and just a formality.&lt;br /&gt;There was no Group discussion / GD in the whole test. SO finally 12 persons were selected.&lt;br /&gt;&lt;br /&gt;See related Tech Mahindra Sample Placement Test papers 2008 and related technical hr interview questions for computer science, electronics, IT (Cse, ece, it branch) and other IT or engineering graduates. Good luck..&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-2661951130373112406?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/2661951130373112406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=2661951130373112406' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2661951130373112406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2661951130373112406'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/tech-mahindra-placement-paper-at-sggs_12.html' title='Tech Mahindra Placement Paper at SGGS Nanded ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-900647989834314545</id><published>2008-08-12T02:49:00.000-07:00</published><updated>2008-08-12T02:51:13.196-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechMahindra Placement Test Papers'/><title type='text'>Tech Mahindra Recent Placement Paper at Bangalore ..... Interview question</title><content type='html'>&lt;a href=""&gt;Tech Mahindra Placement Test Paper on 9th May at&lt;br /&gt;&lt;br /&gt;535 students appeared for the TM Placement test. It was a campus placement test held at BMSIT Bangalore. 168 candidates cleared the aptitude round and finally 63 were selected.&lt;br /&gt;&lt;br /&gt;Placement Paper Pattern:&lt;br /&gt;General Paper( 5- Sections) 75 Questions in 60 minutes&lt;br /&gt;&lt;br /&gt;1. QUANTITATIVE : Percentage, Ratio and Proportion, Series, Numbers, Train Problems, Time and Work, Boat and stream speed / time, etc.&lt;br /&gt;&lt;br /&gt;2. Verbal and Non Verbal:&lt;br /&gt;&lt;br /&gt;Blood Relations, Puzzles, etc.&lt;br /&gt;&lt;br /&gt;3. English Passage&lt;br /&gt;&lt;br /&gt;4. English Section: Fill in the blanks, Synonyms, phrases replacement questions.&lt;br /&gt;&lt;br /&gt;The english part is easy. First you should do the quantitative part. You have to manage time very well. The results will be declared few hours after the written test / exam.&lt;br /&gt;&lt;br /&gt;After 2 days, we had the Technical and HR Interview Round:&lt;br /&gt;&lt;br /&gt;TM Tech HR Questions were like: Introduce yourself&lt;br /&gt;&lt;br /&gt;What is the difference between Windows XP and Windows 98? (they ask questions according to your resume)&lt;br /&gt;&lt;br /&gt;A binary search algorithm&lt;br /&gt;&lt;br /&gt;Logical gates - or gates, nand, and, nor, not, etc. structures and conversion of gates&lt;br /&gt;&lt;br /&gt;Conversion to Binary&lt;br /&gt;&lt;br /&gt;Structures and Pointers&lt;br /&gt;&lt;br /&gt;Data Structures &amp; Arrays related technical interview questions&lt;br /&gt;&lt;br /&gt;(See the technical interview questions here)&lt;br /&gt;&lt;br /&gt;Next was the HR Interview round. As usual it was simple.. thank god. We had 2.9 lacs salary / package. Good luck.. see you at tech mahindra..&lt;br /&gt;&lt;br /&gt;See other related Tech mahindra Placement Test Papers, sample papers, latest technical / tech hr interview questions and gd - group discussion topics here for freshers / b.tech engineers ece ee it me cse ones, developers or IT graduates for reputed IT companies - MNC exams: Tech Mahindra Placement Paper on 21st July at PES ..., Tech Mahindra Latest Placement Test Paper, Tech Mahindra Placement Paper at SGGS Nanded and other latest IT Companies placement papers here. Keep watching PreviousPapers.blogspot.com for more free exam preparation resources.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-900647989834314545?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/900647989834314545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=900647989834314545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/900647989834314545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/900647989834314545'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/tech-mahindra-recent-placement-paper-at_12.html' title='Tech Mahindra Recent Placement Paper at Bangalore ..... Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-3655600880471868215</id><published>2008-08-08T06:37:00.000-07:00</published><updated>2008-08-08T06:38:47.975-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Capgemini Placement Papers'/><title type='text'>Interview question Capgemini India Latest 2008 July Placement Paper</title><content type='html'>&lt;a href=""&gt;CAPGEMINI PAPER ON 22ND JULY, 2008&lt;br /&gt;&lt;br /&gt;Here are the written test aptitude and other multiple choice questions from the Capgemini IT company placement exam test paper 2008:&lt;br /&gt;&lt;br /&gt;1.Fresh Grapes contain 90% water by wt. Dried grapes contain 20% water by %age. What will b wt of dried grapes when we begin with 20 kg fresh grapes?&lt;br /&gt;2kg / 2.4kg / 2.5kg /none&lt;br /&gt;2.How many 5 digit no. can b formed wit digits 1, 2, 3,4,5,6 which r divisible by 4 and digits not repeated&lt;br /&gt;144 / 168 / 192 / none&lt;br /&gt;3.There is a rectangular garden whose length and width are 60m X 20m.There is a walkway of uniform width around garden. Area of walkway is 516m^2. Find width of walkway&lt;br /&gt;1/2/3/4&lt;br /&gt;4. In a race from pt. X to pt Y and back, Jack averages 0 miles/hr to pt Y and 10 miles/hr back to pr X. Sandy averages 20 miles/hr in both directions. If Jack and Sandy start race at same tIme, who’ll finish 1st&lt;br /&gt;Jack/Sandy/they tie/Impossible to tell&lt;br /&gt;5. A man engaged a servant on a condition that he’ll pay Rs 90 and also give him a bag at the end of the yr. He served for 9 months and was given a turban and Rs 65. So the price of turban is&lt;br /&gt;i. Rs 10 / 19 / 0 / 55&lt;br /&gt;6. Three wheels make 36, 24, 60 rev/min. Each has a black mark on it. It is aligned at the start of the qn.When does it align again for the first time?&lt;br /&gt;14/20/22/5 sec&lt;br /&gt;7. If 1= (3/4)(1+ (y/x) ) then&lt;br /&gt;i. x=3y&lt;br /&gt;ii. x=y/3&lt;br /&gt;iii. x=(2/3)y&lt;br /&gt;iv. none&lt;br /&gt;8. The sum of six consecutive odd nos. is 888. What is the average of the nos.?&lt;br /&gt;i. 147&lt;br /&gt;ii. 148&lt;br /&gt;iii. 149&lt;br /&gt;iv. 146&lt;br /&gt;9.An employee has to allocate offices to 6 staff members. The offices are no. 1-6. the offices are arranged in a row and they are separated from each other by dividers&gt;hence voices, sounds and cigarette smoke flow easily from one office to another&lt;br /&gt;Miss R needs to use the telephone quite often throughout the day. Mr. M and Mr. B need adjacent offices as they need to consult each other often while working. Miss H is a senior employee and his to be allotted the office no. 5, having the biggest window.&lt;br /&gt;Mr. D requires silence in office next to his. Mr. T, Mr. M and Mr. D are all smokers. Miss H finds tobacco smoke allergic and consecutively the offices next to hers are occupied by non-smokers. Unless specifically stated all the employees maintain an atmosphere of silence during office hrs.&lt;br /&gt;a. The ideal candidate to occupy office farthest from Mr. B will be&lt;br /&gt;i. Miss H&lt;br /&gt;ii. Mr. M&lt;br /&gt;iii. Mr. T&lt;br /&gt;iv. Mr. D&lt;br /&gt;b. The three employees who are smokers should be seated in the offices&lt;br /&gt;i. 1 2 4&lt;br /&gt;ii. 2 3 6&lt;br /&gt;iii. 1 2 3&lt;br /&gt;iv. 1 2 3&lt;br /&gt;c. The ideal office for Mr. M would be&lt;br /&gt;i. 2&lt;br /&gt;ii. 6&lt;br /&gt;iii. 1&lt;br /&gt;iv. 3&lt;br /&gt;d. In the event of what occurrence within a period of one month since the assignment of the offices would a request for a change in office be put forth by one or more employees?&lt;br /&gt;i. Mr D quitting smoking&lt;br /&gt;ii. Mr. T taking over duties formally taken care of by Miss R&lt;br /&gt;iii. The installation of a water cooler in Miss H’s office&lt;br /&gt;iv. Mr. B suffering from anemia&lt;br /&gt;10.Ten coins are distr. Among 4 people P, Q, R, S such that one of them gets a coin, another gets 2 coins,3rd gets 3 coins, and 4th gets 4 coins. It is known that Q gets more coins than P, and S gets fewer coins than R&lt;br /&gt;a. If the no. of coins distr. To Q is twice the no. distr. to P then which one of the following. is necessarily true?&lt;br /&gt;i. R gets even no. of coins&lt;br /&gt;ii. R gets odd no. of coins&lt;br /&gt;iii. S gets even no. of coins&lt;br /&gt;iv. S gets odd no. of coins&lt;br /&gt;b. If R gets at least two more coins than S which one of the following is necessarily true?&lt;br /&gt;i. Q gets at least 2 more coins than S&lt;br /&gt;ii. Q gets more coins than P&lt;br /&gt;iii. P gets more coins than S&lt;br /&gt;iv. P and Q together get at least five coins&lt;br /&gt;c. If Q gets fewer coins than R, then which one of the following is not necessarily true?&lt;br /&gt;i. P and Q together get at least 4 coins&lt;br /&gt;ii. Q and S together get at least 4 coins&lt;br /&gt;iii.R and S together get at least 5 coins&lt;br /&gt;iv.P and R together get at least 5 coins&lt;br /&gt;11.Elle is 3 times older than Zaheer. Zaheer is ½ as old as Waheeda. Yogesh is elder than Zaheer.&lt;br /&gt;a. What is sufficient to estimate Elle’s age?&lt;br /&gt;i.Zaheer is 10 yrs old&lt;br /&gt;ii.Yogesh and Waheeda are both older than Zaheer by the same no of yrs.&lt;br /&gt;iii.Both of the above&lt;br /&gt;iv.None of the above&lt;br /&gt;b. Which one of the following statements can be inferred from the info above&lt;br /&gt;i.Yogesh is elder than Waheeda&lt;br /&gt;ii.Elle is older than Waheeda&lt;br /&gt;iii.Elle’s age may be less than that of Waheeda&lt;br /&gt;iv.None of the above&lt;br /&gt;&lt;br /&gt;See other Capgemini Placement Test papers, latest 2008 exam papers, call centres, bpo, kpo, executives, voice caller, developers, software engineers, b.tech electronics and communications ece, computer science engineering cse, it information technology freshers placement papers and technical hr interview questions. Download and save free test papers here.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-3655600880471868215?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/3655600880471868215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=3655600880471868215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3655600880471868215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3655600880471868215'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/interview-question-capgemini-india.html' title='Interview question Capgemini India Latest 2008 July Placement Paper'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-3288711044553478741</id><published>2008-08-08T06:36:00.000-07:00</published><updated>2008-08-08T06:37:52.343-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechMahindra Placement Test Papers'/><title type='text'>Interview question  Tech Mahindra Latest Placement Test Paper</title><content type='html'>&lt;a href=""&gt;Here is the Tech Mahindra India placement test held on 18th April at Deen Bandhu Chhotu Ram University of Science and Technology Murthal Haryana.&lt;br /&gt;Statistics:&lt;br /&gt;&lt;br /&gt;Total Appeared - 135&lt;br /&gt;Written test cleared by - 68&lt;br /&gt;Technical Cleared by - 37&lt;br /&gt;HR Interview - 32&lt;br /&gt;&lt;br /&gt;In the multiple choice Written Exam there will be 5 Sections:&lt;br /&gt;&lt;br /&gt;2 sections of verbal and non verbal :&lt;br /&gt;Questions like find the missing term, series completion, some logical reasoning questions&lt;br /&gt;&lt;br /&gt;3 sections of English Language Test:&lt;br /&gt;General fill in the blanks like prepositions and verbs&lt;br /&gt;Easy synonyms&lt;br /&gt;Reading comprehension part&lt;br /&gt;Its easy one but requires preparation. The questions are expected one.&lt;br /&gt;&lt;br /&gt;There are 75 questions in 5 sections to be done in 60 minutes. So the time is short.&lt;br /&gt;There is no negative marking. And there is sectional cutoff.&lt;br /&gt;&lt;br /&gt;Tech Mahindra Technical Interview:&lt;br /&gt;&lt;br /&gt;Me: Enter the room and good afternoon sir&lt;br /&gt;Int: Good afternoon have your seat.&lt;br /&gt;&lt;br /&gt;Then the questions asked were:&lt;br /&gt;Tell me about yourself your background&lt;br /&gt;Keep moving from one company to another?&lt;br /&gt;About low class 10th and 12th scores.&lt;br /&gt;Why the 1 year gap?&lt;br /&gt;About pointers and link list&lt;br /&gt;Can u print fibbonacci series recursively?&lt;br /&gt;Ok do u want to ask anything?&lt;br /&gt;&lt;br /&gt;Then the Tech Mahindra Basic HR Interview:&lt;br /&gt;&lt;br /&gt;Have your seat.&lt;br /&gt;&lt;br /&gt;Describe Yourself.&lt;br /&gt;&lt;br /&gt;What is your biggest achievement till now?&lt;br /&gt;&lt;br /&gt;1 year gap?&lt;br /&gt;&lt;br /&gt;How will your friends describe you?&lt;br /&gt;&lt;br /&gt;Can u relocate?&lt;br /&gt;&lt;br /&gt;Are you ready to sign a bond and salary?&lt;br /&gt;Then i was asked to go and when the result was declared, i was selected.&lt;br /&gt;&lt;br /&gt;Watch other detailed Tech mahindra India and other it companies latest placement exam test papers here free online. You can download or save them here. See actual candidate experiences for tech mahindra technical tech hr interviews.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-3288711044553478741?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/3288711044553478741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=3288711044553478741' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3288711044553478741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3288711044553478741'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/interview-question-tech-mahindra-latest.html' title='Interview question  Tech Mahindra Latest Placement Test Paper'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-4671286652885003104</id><published>2008-08-08T06:35:00.000-07:00</published><updated>2008-08-08T06:36:51.603-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechMahindra Placement Test Papers'/><title type='text'>Tech Mahindra Placement Paper on 21st July at PES Mandya</title><content type='html'>&lt;a href=""&gt;Here is the Tech Mahindra Placement test paper held at mandya on 21st july 2008. Its the latest test paper.&lt;br /&gt;&lt;br /&gt;Tech Mahindra visited our campus on 21st July 2008. Out of the 185 students, who were eligible for the test, 37 got short listed for the interviews and 19 got placed. The cutoff was 60% with one backlog allowed and it was only for CS, IS, EC and EE engineering b.tech departments.&lt;br /&gt;&lt;br /&gt;The Selection Procedure:&lt;br /&gt;&lt;br /&gt;Online Test: Written Multiple Choice Type Questions:&lt;br /&gt;&lt;br /&gt;100 questions and the time was 60 minutes.&lt;br /&gt;&lt;br /&gt;The questions were divided into 6 parts. Three of them were English sections. One was for non-verbal reasoning, one was for verbal reasoning and the other was of quantitative aptitude. There was a sectional cut off for all the sections.&lt;br /&gt;&lt;br /&gt;First attempt the english section as it takes less time, then go for logical reasoning / aptitude sections questions.&lt;br /&gt;&lt;br /&gt;2. Interviews:&lt;br /&gt;&lt;br /&gt;There were 3 interviews for us:&lt;br /&gt;&lt;br /&gt;HR cum technical interview, Technical interview and HR interview again.&lt;br /&gt;&lt;br /&gt;In the first interview they asked simple questions like the stack concept, use of "%d", use of getch() and the command to drop a table in DBMS - database management systems. One popular question like "Why Tech mahindra?" Here quote some facts about TM company itself.&lt;br /&gt;&lt;br /&gt;Technical interview: Asked questions from DBMS (favorite subject as written in resume), normalization, RDBMS, trigger and the use of null pointer.&lt;br /&gt;&lt;br /&gt;Final Part - HR Interview:&lt;br /&gt;&lt;br /&gt;The first question was "Tell me about your family in brief?"&lt;br /&gt;&lt;br /&gt;Other questions were:&lt;br /&gt;&lt;br /&gt;Tell me about your hobbies and interests?&lt;br /&gt;&lt;br /&gt;Are you ready to go to any place?&lt;br /&gt;&lt;br /&gt;Why tech mahindra?&lt;br /&gt;&lt;br /&gt;Why did you choose computer science?&lt;br /&gt;&lt;br /&gt;What are your short term and long term goals?&lt;br /&gt;&lt;br /&gt;So this was the final tech mahindra hr interview. See other latest 2008 placement papers and tech mahindra technical hr interview questions with solutions, tips, tricks and hr interview / group discussion guide free online here for freshers, engineers, developers, etc. Good Luck for your own placement test.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-4671286652885003104?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/4671286652885003104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=4671286652885003104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4671286652885003104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4671286652885003104'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/tech-mahindra-placement-paper-on-21st.html' title='Tech Mahindra Placement Paper on 21st July at PES Mandya'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-6394501633285388087</id><published>2008-08-08T06:33:00.000-07:00</published><updated>2008-08-08T06:35:15.041-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Birlasoft Placement Test Papers'/><title type='text'>Birlasoft Placement Paper on 28th February  Interview question</title><content type='html'>Here is the latest birlasoft india placement paper held on 28th of February. Here is the account of the paper.&lt;br /&gt;&lt;br /&gt;It was a two day campus placement drive. First there was an aptitude test and GD.&lt;br /&gt;In the Aptitude test, there were 50 questions. First 20-25 were technical. First three questions were on conversion from hexadecimal to octal, binary, etc. There were ques on dbms like what is denormalization, questions on java, c language, c++ These were simple questions. The quantitative questions were on alligation, speed and distance, profit and loss, probability, time and work.&lt;br /&gt;Next were questions on English Language. Choose the wrong sentence, synonyms and associate the meanings with the phrases given. Cutoff for the paper was arnd 40.&lt;br /&gt;&lt;br /&gt;Group Discussion Round: GD&lt;br /&gt;&lt;br /&gt;Topics for gd were future of it industry in india, should ganguly be the captain of indian cricket team, shilpa shetty vs jade goody at big brother, love marriages vs arranged marriages, etc.&lt;br /&gt;&lt;br /&gt;Next day there was first a ppt and then the hr cum technical interview:&lt;br /&gt;&lt;br /&gt;Questions: Me being an ece student they asked me about the communication system, how does commnication happen, etc.&lt;br /&gt;what are analog and digital signals, advantages of digital over analog - explain in layman's language, examples of where are we using these signals, some questions on optical fibres, their advantages. Then he asked some questions on C language then what are data structures, what is block, what is page statement, explain float&lt;br /&gt;&lt;br /&gt;HR Questions:&lt;br /&gt;&lt;br /&gt;How do you define success?&lt;br /&gt;&lt;br /&gt;How many friends do you have?&lt;br /&gt;&lt;br /&gt;What are your positives&lt;br /&gt;&lt;br /&gt;Do you read newspaper?&lt;br /&gt;&lt;br /&gt;Few more questions:&lt;br /&gt;&lt;br /&gt;Finally out of the 1600 students who appeared for the aptitude test 24 were finally selected.&lt;br /&gt;&lt;br /&gt;See other latest Birlasoft and other IT MNC placement question papers - download free other entrance exam test papers here with hr interview questions, solutions, tips, answers and tricks here. Good luck! see engineering, electronics and communication, computer science, information technology IT, electrical engineering EE, CSE, ECE, IT related technical / tech interview questions with real candidate experiences for your exam help. Good luck!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-6394501633285388087?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/6394501633285388087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=6394501633285388087' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6394501633285388087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6394501633285388087'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/birlasoft-placement-paper-on-28th.html' title='Birlasoft Placement Paper on 28th February  Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-2905175511447296088</id><published>2008-08-08T06:32:00.000-07:00</published><updated>2008-08-08T06:33:32.701-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechMahindra Placement Test Papers'/><title type='text'>Tech Mahindra Placement Paper at SGGS Nanded  Interview question</title><content type='html'>&lt;a href=""&gt;Tech Mahindra India Placement Test Paper on 18th April 2007 at SGGS Nanded engineering college.&lt;br /&gt;&lt;br /&gt;Tech Mahindra came to our college on April 18,2007. About 210 candidates appeared for the aptitude test and finally 30 cleared the aptitude test out of which 12 were selected.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Tech mahindra PPT:- First there was the paper presentation. They can ask questions abou ti in HR and Technical interview.&lt;br /&gt;&lt;br /&gt;2. Online Aptitude Test:&lt;br /&gt;&lt;br /&gt;There are 100 questions and time allowed is 1 hour. Listen the instructions from the HR carefully before solving the test. Solve all the questions as there is no negative marking.&lt;br /&gt;&lt;br /&gt;There were total 6 sections:-&lt;br /&gt;&lt;br /&gt;1.Verbal Ability(35 questions)&lt;br /&gt;&lt;br /&gt;2.Analytical(20 q)&lt;br /&gt;&lt;br /&gt;3.Quanti.(15 q)&lt;br /&gt;&lt;br /&gt;4.English I(10 q)&lt;br /&gt;&lt;br /&gt;5.English II(10 q)&lt;br /&gt;&lt;br /&gt;6.English III(10 q)&lt;br /&gt;&lt;br /&gt;Solve the english section first and then solve the other sections.&lt;br /&gt;&lt;br /&gt;3. Technical Interview:&lt;br /&gt;&lt;br /&gt;Tell me about yourself?&lt;br /&gt;&lt;br /&gt;Tell me about mouse programming in C (As I used mouse programming in my project)&lt;br /&gt;&lt;br /&gt;Difference between C and C++&lt;br /&gt;&lt;br /&gt;Few basic questions regarding DBMS - database management systems&lt;br /&gt;&lt;br /&gt;Asked about my strengths and weakness.&lt;br /&gt;&lt;br /&gt;Where do you want to see yourself after 5 years?&lt;br /&gt;&lt;br /&gt;They ask tricky questions related to your projects - the project interview questions can be difficult sometimes.&lt;br /&gt;&lt;br /&gt;Next was the HR Interview:&lt;br /&gt;&lt;br /&gt;Questions:&lt;br /&gt;&lt;br /&gt;Tell me about yourself.&lt;br /&gt;&lt;br /&gt;How will you sell the drinking bottle?&lt;br /&gt;&lt;br /&gt;Why should I select you?&lt;br /&gt;&lt;br /&gt;They asked some candidates to talk on a subject for 2 minutes.&lt;br /&gt;&lt;br /&gt;In MBT, if you clear Technical interview - the hr is normally easy and just a formality.&lt;br /&gt;There was no Group discussion / GD in the whole test. SO finally 12 persons were selected.&lt;br /&gt;&lt;br /&gt;See related Tech Mahindra Sample Placement Test papers 2008 and related technical hr interview questions for computer science, electronics, IT (Cse, ece, it branch) and other IT or engineering graduates. Good luck..&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-2905175511447296088?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/2905175511447296088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=2905175511447296088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2905175511447296088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2905175511447296088'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/tech-mahindra-placement-paper-at-sggs.html' title='Tech Mahindra Placement Paper at SGGS Nanded  Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-367873777024485354</id><published>2008-08-08T06:30:00.000-07:00</published><updated>2008-08-08T06:32:24.768-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='TechMahindra Placement Test Papers'/><title type='text'>Tech Mahindra Recent Placement Paper at Bangalore Interview question</title><content type='html'>&lt;a href=""&gt;Tech Mahindra Placement Test Paper on 9th May at&lt;br /&gt;&lt;br /&gt;535 students appeared for the TM Placement test. It was a campus placement test held at BMSIT Bangalore. 168 candidates cleared the aptitude round and finally 63 were selected.&lt;br /&gt;&lt;br /&gt;Placement Paper Pattern:&lt;br /&gt;General Paper( 5- Sections) 75 Questions in 60 minutes&lt;br /&gt;&lt;br /&gt;1. QUANTITATIVE : Percentage, Ratio and Proportion, Series, Numbers, Train Problems, Time and Work, Boat and stream speed / time, etc.&lt;br /&gt;&lt;br /&gt;2. Verbal and Non Verbal:&lt;br /&gt;&lt;br /&gt;Blood Relations, Puzzles, etc.&lt;br /&gt;&lt;br /&gt;3. English Passage&lt;br /&gt;&lt;br /&gt;4. English Section: Fill in the blanks, Synonyms, phrases replacement questions.&lt;br /&gt;&lt;br /&gt;The english part is easy. First you should do the quantitative part. You have to manage time very well. The results will be declared few hours after the written test / exam.&lt;br /&gt;&lt;br /&gt;After 2 days, we had the Technical and HR Interview Round:&lt;br /&gt;&lt;br /&gt;TM Tech HR Questions were like: Introduce yourself&lt;br /&gt;&lt;br /&gt;What is the difference between Windows XP and Windows 98? (they ask questions according to your resume)&lt;br /&gt;&lt;br /&gt;A binary search algorithm&lt;br /&gt;&lt;br /&gt;Logical gates - or gates, nand, and, nor, not, etc. structures and conversion of gates&lt;br /&gt;&lt;br /&gt;Conversion to Binary&lt;br /&gt;&lt;br /&gt;Structures and Pointers&lt;br /&gt;&lt;br /&gt;Data Structures &amp; Arrays related technical interview questions&lt;br /&gt;&lt;br /&gt;(See the technical interview questions here)&lt;br /&gt;&lt;br /&gt;Next was the HR Interview round. As usual it was simple.. thank god. We had 2.9 lacs salary / package. Good luck.. see you at tech mahindra..&lt;br /&gt;&lt;br /&gt;See other related Tech mahindra Placement Test Papers, sample papers, latest technical / tech hr interview questions and gd - group discussion topics here for freshers / b.tech engineers ece ee it me cse ones, developers or IT graduates for reputed IT companies - MNC exams: Tech Mahindra Placement Paper on 21st July at PES ..., Tech Mahindra Latest Placement Test Paper, Tech Mahindra Placement Paper at SGGS Nanded and other latest IT Companies placement papers here. Keep watching PreviousPapers.blogspot.com for more free exam preparation resources.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-367873777024485354?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/367873777024485354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=367873777024485354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/367873777024485354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/367873777024485354'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/08/tech-mahindra-recent-placement-paper-at.html' title='Tech Mahindra Recent Placement Paper at Bangalore Interview question'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-7685295926319494965</id><published>2008-07-24T09:28:00.000-07:00</published><updated>2008-07-24T09:29:30.290-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='yahoo'/><title type='text'>Yahoo Interview</title><content type='html'>&lt;a href=""&gt;1) There is a n x n grid of 1's and 0's. Find the i , where i is the row&lt;br /&gt;containing all 1's and all 0's(except the intersection point). Should do&lt;br /&gt;it in less than 25 comparisons&lt;br /&gt;..&lt;br /&gt;2) Use 2 stacks to implement a queue. Followed up with making the&lt;br /&gt;access to the Data structure concurrently.&lt;br /&gt;&lt;br /&gt;3) C++ question was good, implement a c++ class such that it allows us&lt;br /&gt;to add data members at runtime.&lt;br /&gt;&lt;br /&gt;4)Implement a transaction manager in a database server. The discussion&lt;br /&gt;involved a lot of stuff about transaction logs.&lt;br /&gt;&lt;br /&gt;5) How do you tune an application. Creating indexes.&lt;br /&gt;&lt;br /&gt;6) Some SQL performance tuning questions on creating indexes.&lt;br /&gt;&lt;br /&gt;7) can you write a foo() in c? If so how can u do it?&lt;br /&gt;&lt;br /&gt;8) vector implementation questions.&lt;br /&gt;&lt;br /&gt;9) Almost everyone asked about my language.(except ppl who attended my talk).&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-7685295926319494965?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/7685295926319494965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=7685295926319494965' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7685295926319494965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7685295926319494965'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/yahoo-interview.html' title='Yahoo Interview'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-6367420069958078769</id><published>2008-07-24T09:27:00.000-07:00</published><updated>2008-07-24T09:28:13.297-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='yahoo'/><title type='text'>Yahoo Interview Questions</title><content type='html'>&lt;a href=""&gt;Yahoo Telephonic Round:&lt;br /&gt;&lt;br /&gt;Design classes for the following problem. (C++)&lt;br /&gt;&lt;br /&gt;A Customer Can have multiple bank accounts A Bank account can be owned by multiple customers When customer logs in he sees list of account, on clicking on an account he sees list of transactions.&lt;br /&gt;&lt;br /&gt;Solution :&lt;br /&gt;&lt;br /&gt;Customer class, Account class, Transaction class&lt;br /&gt;Customer class contains an array of pointers to the account classes&lt;br /&gt;Account class contains an array of pointers to its owner customer classes&lt;br /&gt;Account class also contains an array of transactions associated to it.&lt;br /&gt;Transaction class contains id or pointer the customer who did that transaction&lt;br /&gt;In customer class write a function with prototype&lt;br /&gt;&lt;br /&gt;for (i in Accounts )&lt;br /&gt;{&lt;br /&gt; cout &lt;&lt; i.AccountName &lt;&lt; endl; &lt;br /&gt;} &lt;br /&gt;cin &gt;&gt; id; &lt;br /&gt;for(i in Accounts[id].transactions ) &lt;br /&gt;{ &lt;br /&gt; cout &lt;&lt; i.TransDetails &lt;&lt; endl;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Yahoo Interview Round 1:&lt;br /&gt;&lt;br /&gt;   1. How to call a C++ function which is compiled with C++ compiler in C code?&lt;br /&gt;&lt;br /&gt;      Solution: The C++ compiler must know that f(int,char,float) is to be called by a C compiler using the extern "C"construct:&lt;br /&gt;&lt;br /&gt;      The extern "C" line tells the compiler that the external information sent to the linker should use C calling conventions and name mangling (e.g., preceded by a single underscore). Since name overloading isn't supported by C, you can't make several overloaded functions simultaneously callable by a C program.&lt;br /&gt;&lt;br /&gt;      // This is C++ code &lt;br /&gt;      // Declare f(int,char,float) using extern "C": &lt;br /&gt;      extern "C" void f(int i, char c, float x); &lt;br /&gt;      ... &lt;br /&gt;      // Define f(int,char,float) in some C++ module: &lt;br /&gt;      void f(int i, char c, float x)&lt;br /&gt;      { &lt;br /&gt;         ..... &lt;br /&gt;      } &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   2. When you deliver your C++ headers and C++ library of a class (what all can you change in the class so that application using your class does not need to recompile the code)&lt;br /&gt;   3. How do you initialize a static member of a class with return value of some function?&lt;br /&gt;&lt;br /&gt;          Solution :&lt;br /&gt;&lt;br /&gt;          Static data members are shared by all object instances of that class. Each class instance sees and has access to the same static data. The static data is not part of the class object but is made available by the compiler whenever an object of that class comes into scope. Static data members, therefore, behave as global variables for a class. One of the trickiest ramifications of using a static data member in a class is that it must be initialized, just once, outside the class definition, in the source file. This is due to the fact a header file is typically seen multiple times by the compiler. If the compiler encountered the initialization of a variable multiple times it would be very difficult to ensure that variables were properly initialized. Hence, exactly one initialization of a static is allowed in the entire program.&lt;br /&gt;&lt;br /&gt;          Consider the following class, A, with a static data member, _id:&lt;br /&gt;&lt;br /&gt;             &lt;br /&gt;            //File: a.h&lt;br /&gt;             class A&lt;br /&gt;             {&lt;br /&gt;                public:&lt;br /&gt;                A();&lt;br /&gt;                int _id;&lt;br /&gt;             };&lt;br /&gt;&lt;br /&gt;          The initialization of a static member is done similarly to the way global variables are initialized at file scope, except that the class scope operator must be used. Typically, the definition is placed at the top of the class source file:&lt;br /&gt;&lt;br /&gt;             // File: a.cc&lt;br /&gt;             int A::_id;&lt;br /&gt;&lt;br /&gt;          Because no explicit initial value was specified, the compiler will implicitly initialize _id to zero. An explicit initialization can also be specified:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;          // File: a.cc&lt;br /&gt;           int A::_id = 999;&lt;br /&gt;           &lt;br /&gt;&lt;br /&gt;          In fact, C++ even allows arbitrary expressions to be used in initializers:&lt;br /&gt;&lt;br /&gt;                // File: a.cc&lt;br /&gt;             int A::_id = GetId();    &lt;br /&gt;&lt;br /&gt;   4. How can one application use same API provided by different vendors at the same time?&lt;br /&gt;   5. If you are given the name of the function at run time how will you invoke the function?&lt;br /&gt;&lt;br /&gt;          Solution :&lt;br /&gt;              * Compile your program with --export-dynamic on the gcc command line&lt;br /&gt;              * Link with -ldl (dynamic library handling, needed for dlopen and dlsym&lt;br /&gt;              * Call dlopen() with a null parameter, meaning you aren't loading symbols from a file but from the current executable&lt;br /&gt;              * Call dlsym() with the name of the function you'll be calling. Note that C++ modifies function names, so If you're trying this with C++, you'd have to either declare this function as extern "C", or figure out what name the function has after compiling. (On unix, you could run nm -s on the object file for this).&lt;br /&gt;              * If dlsym() returns non-null, use the returned value as a function pointer to invoke your function.&lt;br /&gt;&lt;br /&gt;Yahoo Interview Round 2:&lt;br /&gt;&lt;br /&gt;   1. When will you use shell script/Perl ahead of C/C++?&lt;br /&gt;   2. How does yahoo handles billions of requests, does it create a thread per request or a process?&lt;br /&gt;   3. How does HTTP works?&lt;br /&gt;&lt;br /&gt;          Solution :HTTP Is a request-response protocol.&lt;br /&gt;&lt;br /&gt;          For example, a Web browser initiates a request to a server, typically by opening a TCP/IP connection. The request itself comprises o a request line, o a set of request headers, and o an entity. The server sends a response that comprises o a status line, o a set of response headers, and o an entity. The entity in the request or response can be thought of simply as the payload, which may be binary data. The other items are readable ASCII characters. When the response has been completed, either the browser or the server may terminate the TCP/IP connection, or the browser can send another request.&lt;br /&gt;&lt;br /&gt;   4. How to count number of unique music titles downloaded from a log file which contains an entry of all music title downloaded?&lt;br /&gt;   5. What is the difference between COM and CORBA?&lt;br /&gt;&lt;br /&gt;          Solution :COM is linked to Microsoft and CORBA to UNIX,Moreover, COM objects require installation on the machine from where it is being used .CORBA is ORB (Object request broker) , and also its a specification owned by OMG, which is open. Not owned by a company. So we cannot say that it only belongs to Unix. Corba servers can run on windows NT, and CORBA clients can run on Unix.&lt;br /&gt;&lt;br /&gt;   6. What is web service?&lt;br /&gt;&lt;br /&gt;          Solution :Web Service is defined as "a software system designed to support interoperable Machine to Machine interaction over a network." Web services are frequently just Web APIs that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services.&lt;br /&gt;&lt;br /&gt;I got only these two Rounds as of now, if I get any more I will post them here. If you have attended yahoo interview please share your experience and questions with us. You can mail them at kchaitanyya@gmail.com or you can comment here.Solutions for rest of questions will be provided later.if you know any of the questions which are unsolved please comment the solution. we will include.&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-6367420069958078769?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/6367420069958078769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=6367420069958078769' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6367420069958078769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6367420069958078769'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/yahoo-interview-questions.html' title='Yahoo Interview Questions'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8020057159513256685</id><published>2008-07-24T09:25:00.000-07:00</published><updated>2008-07-24T09:27:02.828-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='yahoo'/><title type='text'>Yahoo Interview Questions-1</title><content type='html'>&lt;a href=""&gt;# A modified insertion sort uses binary search to find the position of insertion. What would be the improvement in order realized?&lt;br /&gt;&lt;br /&gt;# class a{};&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;count &lt;&lt;&gt;&lt;br /&gt;}&lt;br /&gt;What is the output?&lt;br /&gt;&lt;br /&gt;# The linked list size is unknown and it is very large. Find out the N th element from the back end.&lt;br /&gt;&lt;br /&gt;# What happens in the following code?&lt;br /&gt;char x[10],y[10];&lt;br /&gt;x=y;&lt;br /&gt;&lt;br /&gt;# Design a stack which supports push, pop, min and max operations in O(1).&lt;br /&gt;&lt;br /&gt;# Design an NFA to accept a string of 0s and 1s.&lt;br /&gt;&lt;br /&gt;# Given a balanced BST tree, write a function to replace the root with a node that belongs to the original tree.&lt;br /&gt;&lt;br /&gt;# Explain what this function does&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;char *mystrcpy(char *s)&lt;br /&gt;{&lt;br /&gt;char des=char [MAXLEN];&lt;br /&gt;char * t=des;&lt;br /&gt;while(*s)&lt;br /&gt;{&lt;br /&gt;*++t=*++s;&lt;br /&gt;}&lt;br /&gt;return t;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Given that you have a server hit by around 400 million users, and you have log files that contain the user ids of all of them. How do you find the frequency of login of each user. (The log files are very huge!!)&lt;br /&gt;&lt;br /&gt;# Explain Polymorphism, Encapsulation, Inheritance, operator overloading?&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8020057159513256685?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8020057159513256685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8020057159513256685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8020057159513256685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8020057159513256685'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/yahoo-interview-questions-1_24.html' title='Yahoo Interview Questions-1'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-5037393401190751335</id><published>2008-07-24T09:24:00.000-07:00</published><updated>2008-07-24T09:25:43.706-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='yahoo'/><title type='text'>Yahoo Interview Questions-2</title><content type='html'>&lt;a href=""&gt;&lt;br /&gt;# Design a data structure such that given a stream of numbers, you can find the maximum of the numbers at any point and also all the numbers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions.&lt;br /&gt;&lt;br /&gt;# Find the common ancestor of two given nodes in a binary tree, how do you exploit the properties of a given BST for the same problem.&lt;br /&gt;&lt;br /&gt;# Given a function getsort(data),that sorts the data given. The function sorts in place and does not use any extra memory. How do you validate the function with respect to 1)it sorts 2) it does not use extra memory&lt;br /&gt;&lt;br /&gt;# Explain the Traveling Salesman problem? What is an NP-complete problem? What is the Hamiltonian cycle problem?&lt;br /&gt;&lt;br /&gt;# Find out the least common ancestor in a binary tree.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-5037393401190751335?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/5037393401190751335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=5037393401190751335' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5037393401190751335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5037393401190751335'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/yahoo-interview-questions-2_24.html' title='Yahoo Interview Questions-2'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-915145699314111913</id><published>2008-07-24T09:23:00.000-07:00</published><updated>2008-07-24T09:24:09.534-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Interview Questions'/><title type='text'>Visual Basic Interview Questions -7</title><content type='html'>&lt;a href=""&gt;  91. What is Dataware Control?&lt;br /&gt;&lt;br /&gt;Any control bound to Data Control.&lt;br /&gt;Ex:- Textbox, Check Box, Picture Box, Image Control, Label, List box, Combo Box, DB Combo,&lt;br /&gt;&lt;br /&gt;92. What is the default model of the form? And what is it number?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;93. Why we need OLE-Automation? Advantages?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;94. What methods are used for DBGrid in unbound mode?&lt;br /&gt;&lt;br /&gt;AddData, EditData, Readdata, WriteData.&lt;br /&gt;&lt;br /&gt;95. What is ADO? What are its objects ?&lt;br /&gt;&lt;br /&gt;ActiveX Data Object. ADO can access data from both flat files as well as the databases. I.e., It is encapsulation of DAO, RDO, and OLE that is why we call it as OLE-DB Technology. Objects are Connection, Record Set, Command, Parameter, field, Error, Property.&lt;br /&gt;&lt;br /&gt;96. What is the max size allowed for Max Text box length.&lt;br /&gt;&lt;br /&gt;32,000&lt;br /&gt;&lt;br /&gt;97. Record set types and Number available in VB?&lt;br /&gt;&lt;br /&gt;3.&lt;br /&gt;1- Dynaset, 0 Table, 2 Snap Shot.&lt;br /&gt;&lt;br /&gt;98. What is the max size allowed for Max Control Names length?&lt;br /&gt;&lt;br /&gt;255.&lt;br /&gt;&lt;br /&gt;99. How many procedures are in VB?&lt;br /&gt;&lt;br /&gt;2.&lt;br /&gt;function and sub procedures&lt;br /&gt;&lt;br /&gt;100. What is the max size allowed for Max label caption length.?&lt;br /&gt;&lt;br /&gt;2,048&lt;br /&gt;&lt;br /&gt;101. what will be the result for 15/4 and 154 ?&lt;br /&gt;&lt;br /&gt;15/4 = 3.75 and 154 = 3&lt;br /&gt;&lt;br /&gt;102. What is the max size allowed for Msgbox Prompt and Input Box?&lt;br /&gt;&lt;br /&gt;1024&lt;br /&gt;&lt;br /&gt;103. Calling Stored Procedures in VB?&lt;br /&gt;&lt;br /&gt;1. Calling Simply the Procedure with out Arguments "Call ProcedureName}"&lt;br /&gt;2. If it is with Arguments Means then&lt;br /&gt;Declare the Query Def qy&lt;br /&gt;Set Qy as New Query def&lt;br /&gt;Qy.SQL = "{Call ProcedureName(?&lt;br /&gt;&lt;br /&gt;104. DSN Less Connection?&lt;br /&gt;&lt;br /&gt;"Server=Oracle; Driver={Microsoft ODBC for Oracle};"&lt;br /&gt;&lt;br /&gt;105. Visual Basic Interview Questions only&lt;br /&gt;&lt;br /&gt;1. 3 main differences between flexgrid control and dbgrid control&lt;br /&gt;2. ActiveX and Types of ActiveX Components in VB&lt;br /&gt;3. Advantage of ActiveX Dll over Active Exe&lt;br /&gt;4. Advantages of disconnected recordsets&lt;br /&gt;5. Benefit of wrapping database calls into MTS transactions&lt;br /&gt;6. Benefits of using MTS&lt;br /&gt;7. Can database schema be changed with DAO, RDO or ADO?&lt;br /&gt;8. Can you create a tabletype of recordset in Jet - connected ODBC database engine?&lt;br /&gt;9. Constructors and distructors&lt;br /&gt;10. Controls which do not have events&lt;br /&gt;11. Default property of datacontrol&lt;br /&gt;12. Define the scope of Public, Private, Friend procedures?&lt;br /&gt;13. Describe Database Connection pooling relative to MTS&lt;br /&gt;14. Describe: In of Process vs. Out of Process component. Which is faster?&lt;br /&gt;15. Difference between a function and a subroutine, Dynaset and Snapshot,early and late binding, image and picture controls,Linked Object and Embedded Object,listbox and combo box,Listindex and Tab index,modal and moduless window, Object and Class,Query unload and unload in form, Declaration and Instantiation an object?&lt;br /&gt;16. Draw and explain Sequence Modal of DAO&lt;br /&gt;17. How can objects on different threads communicate with one another?&lt;br /&gt;18. How can you force new objects to be created on new threads?&lt;br /&gt;19. How does a DCOM component know where to instantiate itself?&lt;br /&gt;20. How to register a component?&lt;br /&gt;21. How to set a shortcut key for label?&lt;br /&gt;22. Kind of components can be used as DCOM servers&lt;br /&gt;23. Name of the control used to call a windows application&lt;br /&gt;24. Name the four different cursor and locking types in ADO and describe them briefly&lt;br /&gt;25. Need of zorder method, no of controls in form, Property used to add a menus at runtime, Property used to count number of items in a combobox,resize a label control according to your caption.&lt;br /&gt;26. Return value of callback function, The need of tabindex property&lt;br /&gt;27. Thread pool and management of threads within a thread pool&lt;br /&gt;28. To set the command button for ESC, Which property needs to be changed?&lt;br /&gt;29. Type Library and what is it's purpose?&lt;br /&gt;30. Types of system controls, container objects, combo box&lt;br /&gt;31. Under the ADO Command Object, what collection is responsible for input to stored procedures?&lt;br /&gt;32. VB and Object Oriented Programming&lt;br /&gt;33. What are the ADO objects? Explain them.&lt;br /&gt;34. What are the different compatibility types when we create a COM component?&lt;br /&gt;35. What do ByVal and ByRef mean and which is the default?&lt;br /&gt;36. What does Option Explicit refer to?&lt;br /&gt;37. What does the Implements statement do?&lt;br /&gt;38. What is OLE and DDE? Explain.&lt;br /&gt;39. What is the difference between Msgbox Statement and MsgboxQ function?&lt;br /&gt;40. What keyword is associated with raising system level events in VB?&lt;br /&gt;41. What methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful?&lt;br /&gt;42. What types of data access have you used.&lt;br /&gt;43. What was introduced to Visual Basic to allow the use of Callback Functions?&lt;br /&gt;44. Which controls can not be placed in MDI?&lt;br /&gt;45. Which controls have refresh method, clear method&lt;br /&gt;46. Which Property is used to compress a image in image control?&lt;br /&gt;47. Which property of menu cannot be set at run time?&lt;br /&gt;48. Which property of textbox cannot be changed at runtime and What's the maximum size of a textbox?&lt;br /&gt;49. Which tool is used to configure the port range and protocols for DCOM communications?&lt;br /&gt;50. What is Dll?&lt;br /&gt;51. Question How many images can be placed in the image list?&lt;br /&gt;52. What is the result of Null * Any value = 0 (Zero)?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-915145699314111913?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/915145699314111913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=915145699314111913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/915145699314111913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/915145699314111913'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/visual-basic-interview-questions-7.html' title='Visual Basic Interview Questions -7'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-1648906593193782578</id><published>2008-07-24T09:21:00.000-07:00</published><updated>2008-07-24T09:23:06.492-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Interview Questions'/><title type='text'>Visual Basic Interview Questions -6</title><content type='html'>&lt;a href=""&gt;  76. What are the type of validation available in VB?&lt;br /&gt;&lt;br /&gt;Field, Form&lt;br /&gt;&lt;br /&gt;77. How to trap Data Base Error?&lt;br /&gt;&lt;br /&gt;Dim x as RDOError&lt;br /&gt;X(0).Des&lt;br /&gt;X(1).Number&lt;br /&gt;&lt;br /&gt;Setting the Cursors.&lt;br /&gt;Default Cursor 0&lt;br /&gt;ODBC Cursor (Client side) 1&lt;br /&gt;ServerSide Cursors (More Network traffic) - 2&lt;br /&gt;&lt;br /&gt;78. How to declare Dll Procedure?&lt;br /&gt;&lt;br /&gt;Declare function "" lib ""&lt;br /&gt;Alias "" (Arg, ..) as Return type.&lt;br /&gt;&lt;br /&gt;79. Referential Integrity (Take care By jet database Engine). Cascade Delete, Cascade Update is done setting property of Attributes.?&lt;br /&gt;&lt;br /&gt;DbRelationDeleteCascade, DbRelationUpdateCascade.&lt;br /&gt;&lt;br /&gt;80. How to increase the Date corresponding with month,date,year?&lt;br /&gt;&lt;br /&gt;DateSerial(year(Now),Month(Now)+1,1)&lt;br /&gt;Hour, min, sec, month, year, DateSerial, dateadd, datediff, weekday, datevalue, timeserial,timevalue.&lt;br /&gt;&lt;br /&gt;81. Name some date function?&lt;br /&gt;&lt;br /&gt;Dateadd(), Datediff(), Datepart(), Cdate()&lt;br /&gt;&lt;br /&gt;82. What is difference between datagrid and flexgrid?&lt;br /&gt;&lt;br /&gt;Datagrid Editable. Flexigrid Non-Editable. (Generally used for Read only purpose.)&lt;br /&gt;&lt;br /&gt;83. What are two validate with Data Control?&lt;br /&gt;&lt;br /&gt;Data_Validate, Data_Error.&lt;br /&gt;&lt;br /&gt;84. To connect the Data Control with Back end What are all the properties to be set?&lt;br /&gt;&lt;br /&gt;Data source Name, Record Source Name&lt;br /&gt;&lt;br /&gt;85. What are the Technologies for Accessing Database from Visual Basic?set?&lt;br /&gt;&lt;br /&gt;DAO, Data Control, RDO, ODBCDIRECT, ADO, ODBC API , 0040.&lt;br /&gt;&lt;br /&gt;86. What is the diff between the Create Object and Get object?&lt;br /&gt;&lt;br /&gt;Create Object - To create an instance of an object.&lt;br /&gt;Get Object To get the reference to an existing object.&lt;br /&gt;&lt;br /&gt;87. What is Mask Edit and why it is used?&lt;br /&gt;&lt;br /&gt;Control. Restricted data input as well as formatted data output.&lt;br /&gt;&lt;br /&gt;88. What is RdExecDirect?&lt;br /&gt;&lt;br /&gt;Bypasses the Creation of a stored procedure to execute the query. Does not apply to Oracle.&lt;br /&gt;&lt;br /&gt;89. Different type of Passing Value?&lt;br /&gt;&lt;br /&gt;By value, By ref, Optional, Param Array. Note:- Optional keyword cannot be used while declaring arguments for a function using param array.&lt;br /&gt;&lt;br /&gt;90. What are types of binding?&lt;br /&gt;&lt;br /&gt;Assigning variable with defined memory space.&lt;br /&gt;Late Binding - Memory size is allotted in later stage.&lt;br /&gt;Ex:- Dim x as object&lt;br /&gt;Early Binding - Memory size is allotted while declaring itself. New Key word is important.&lt;br /&gt;Ex:- Dim x as New Object&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-1648906593193782578?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/1648906593193782578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=1648906593193782578' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1648906593193782578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1648906593193782578'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/visual-basic-interview-questions-6.html' title='Visual Basic Interview Questions -6'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-5133930766886320177</id><published>2008-07-24T09:20:00.000-07:00</published><updated>2008-07-24T09:21:55.069-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Interview Questions'/><title type='text'>Visual Basic Interview Questions -5</title><content type='html'>&lt;a href=""&gt;  61. What is keyword used to compare to objects?&lt;br /&gt;&lt;br /&gt;ISOperator Returns Boolean.&lt;br /&gt;&lt;br /&gt;62. Suppose from form1 to form2 object property settings will arise to ?&lt;br /&gt;&lt;br /&gt;Invalid procedure call or argument (Run time error 5)&lt;br /&gt;&lt;br /&gt;63. What is the return type of Instr and Strcmp?&lt;br /&gt;&lt;br /&gt;Instr integer (Numeric position)&lt;br /&gt;Strcmp - integer ( if both the string are equal they result = 0)&lt;br /&gt;Strcmp (Str1, Str2, Comparetype)&lt;br /&gt;Comparing mode = 0 Binary Comparing&lt;br /&gt;1 Textual Comparing&lt;br /&gt;&lt;br /&gt;64. What is Implicit?&lt;br /&gt;&lt;br /&gt;Instance of specific copy of a class with its own settings for the properties defined in that class.&lt;br /&gt;Note: The implicitly defined variable is never equal to nothing.&lt;br /&gt;&lt;br /&gt;65. What is Inprocess and Out of Process?&lt;br /&gt;&lt;br /&gt;Inprocess It will run with in the memory. ( Local Machine). Out of Process It will run out of the memory Normally in the server side.&lt;br /&gt;&lt;br /&gt;66. Where will we give the option explicit keyword and for what?&lt;br /&gt;&lt;br /&gt;In the general declarations section. To trap undeclared variables.&lt;br /&gt;&lt;br /&gt;67. How can we call Stored procedure of Back End in RDO and ADO ?&lt;br /&gt;&lt;br /&gt;In RDO We can call using RDO Query Objects.&lt;br /&gt;In ADO We can call using Command Objects.&lt;br /&gt;&lt;br /&gt;68. What is Static Cursor?&lt;br /&gt;&lt;br /&gt;In ADO Snap Shot is called so.&lt;br /&gt;&lt;br /&gt;69. How to check the condition in Msgbox?&lt;br /&gt;&lt;br /&gt;If(Msgbox("Do you want to delete this Record",VbYesNo)=VbYes)Then End if&lt;br /&gt;&lt;br /&gt;70. What is control array and how many we can have it with in the form?&lt;br /&gt;&lt;br /&gt;Group of control share the same name. Max 32, 767.&lt;br /&gt;&lt;br /&gt;71. What is diff between the Generic Variable and Specific Variable?&lt;br /&gt;&lt;br /&gt;Generic Variable:&lt;br /&gt;Create Object Ex:-Ole-Automation . No need refer the object library.&lt;br /&gt;Specific Variable:&lt;br /&gt;Binding Procedure Early and Late Binding ( Can be Remove from the Memory).&lt;br /&gt;&lt;br /&gt;72. What is the diff. Between function and sub procedures?&lt;br /&gt;&lt;br /&gt;Function will return value but a sub procedure wont return values&lt;br /&gt;&lt;br /&gt;73. What is the max size allowed for Extension in Visual Basic?&lt;br /&gt;&lt;br /&gt;Frm, bas, cls, res, vbx, ocx, frx, vbp, exe&lt;br /&gt;&lt;br /&gt;74. What is FireHouse Cursors?&lt;br /&gt;&lt;br /&gt;Forward Only Some time Updateable&lt;br /&gt;&lt;br /&gt;75. With in the form we want to check all the text box control are typed or not? How?&lt;br /&gt;&lt;br /&gt;For each currentcontrol in controls&lt;br /&gt;if typeof currentcontrol is TextBox then&lt;br /&gt;end if&lt;br /&gt;next&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;courtesy:DEVFYI - Developer Resource - FYI&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-5133930766886320177?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/5133930766886320177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=5133930766886320177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5133930766886320177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5133930766886320177'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/visual-basic-interview-questions-5.html' title='Visual Basic Interview Questions -5'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-3498632357435774630</id><published>2008-07-24T09:18:00.000-07:00</published><updated>2008-07-24T09:20:15.851-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Interview Questions'/><title type='text'>Visual Basic Interview Questions -4</title><content type='html'>46. What is Seek Method which type of record set is available this?&lt;br /&gt;&lt;br /&gt;Only in DbOpenTables.&lt;br /&gt;Syntax: rs.index = "empno"&lt;br /&gt;rs.seek "=" , 10&lt;br /&gt;If with our setting the rs.index then run time error will occur.&lt;br /&gt;&lt;br /&gt;47. What is Zorder Method?&lt;br /&gt;&lt;br /&gt;Object.Zorder = 1 or 0 Place a Specified mdiform form or control at the front or back of the z-order with n its Graphical Level.&lt;br /&gt;&lt;br /&gt;48. Can us able to set Instancing properties like Singleuse, GlobalSingleuse to ActiveXDll?&lt;br /&gt;&lt;br /&gt;No.&lt;br /&gt;&lt;br /&gt;49. What are properties available in Clip Board?&lt;br /&gt;No Properties Available. Only the methods they are SetText, GetText, Setdata(), Getformat(), Clear&lt;br /&gt;&lt;br /&gt;50. What is the different between Microsoft ODBC Driver and Oracle OBDC Driver?&lt;br /&gt;&lt;br /&gt;Microsoft ODBC driver will support all the methods and properties of Visual Basic. Where as the Oracle not.&lt;br /&gt;&lt;br /&gt;51. What the RDO Methods and Events?&lt;br /&gt;&lt;br /&gt;Methods Events&lt;br /&gt;Begin Trans Validate&lt;br /&gt;Commit Trans Reposition&lt;br /&gt;Rollback Trans Error&lt;br /&gt;Cancel Query Complied&lt;br /&gt;Refresh&lt;br /&gt;Update Controls&lt;br /&gt;Update row&lt;br /&gt;&lt;br /&gt;52. What is MAPI ?&lt;br /&gt;&lt;br /&gt;Messaging Application programming Interface.&lt;br /&gt;&lt;br /&gt;53. What is MDI form?&lt;br /&gt;&lt;br /&gt;MDI Styles?&lt;br /&gt;&lt;br /&gt;54. What are the locks available in Visual Basic?&lt;br /&gt;&lt;br /&gt;Locking is the process by which a DBMS restricts access to a row in a multi-user environment 4 types of locks. They are&lt;br /&gt;1. Batch Optimistic&lt;br /&gt;2. Optimistic&lt;br /&gt;3. Pessimistic&lt;br /&gt;4. ReadOnly&lt;br /&gt;Operations in a relational database act on a complete set of rows. The set of rows returned by a SELECT statement consists of all the rows that satisfy the conditions in the WHERE clause of the statement. This complete set of rows returned by the statement is known as the result set.&lt;br /&gt;Applications, especially those that are interactive and online, cannot always work effectively with the entire result set as a unit.&lt;br /&gt;These applications need a mechanism to work with one row or a small block of rows at a time. Cursors are an extension to result sets that provide that mechanism.&lt;br /&gt;Cursor or lock type Advantages Disadvantages AdOpenForwardOnly (Default) Low resource requirements Cannot scroll backward No data concurrency AdOpenStatic Scrollable (Wont detect changes made at the same time by another application) No data concurrency AdOpenKeyset Some data concurrency Scrollable Higher resource requirements Not available in disconnected scenario AdOpenDynamic High data concurrency Scrollable Highest resource requirements Not available in disconnected scenario AdLockReadOnly Low resource requirements Highly scalable Data not updatable through cursor AdLockBatchOptimistic Batch updates Allows disconnected scenarios Other users able to access data Data can be changed by multiple users at once AdLockPessimistic Data cannot be changed by other users while locked Prevents other users from accessing data while locked AdLockOptimistic Other users able to access data Data can be changed by multiple users at once.&lt;br /&gt;&lt;br /&gt;55. Diff type of Datatypes?&lt;br /&gt;&lt;br /&gt;LOB (Large Object Data type).&lt;br /&gt;CLOB (Stores Character Objects).&lt;br /&gt;BLOB ( Store Binary Objects such as Graphic, Video Chips and Sound files).&lt;br /&gt;BFILE(Store file pointers to LOB It may Contain filename for photo’s store on CD_ROM).&lt;br /&gt;&lt;br /&gt;56. What is Tabstrip control?&lt;br /&gt;&lt;br /&gt;Libraries of procedure external to the application but can be called from the application.&lt;br /&gt;&lt;br /&gt;57. What is Static Variable?&lt;br /&gt;&lt;br /&gt;Its Scope will be available through out the life time.&lt;br /&gt;&lt;br /&gt;58. What is DBSqlPassThrough?&lt;br /&gt;&lt;br /&gt;It will By Passing the Jet Query Processor.&lt;br /&gt;&lt;br /&gt;59. What is the starting Index value? How to locate it?&lt;br /&gt;&lt;br /&gt;It is tab control to place our controls with in the form in multiple sheets.&lt;br /&gt;Index starts with 1.&lt;br /&gt;And to identify If Tabstrip1.SelectedItem.&lt;br /&gt;Index = 1 Then ..&lt;br /&gt;End if&lt;br /&gt;&lt;br /&gt;60. What is Parser Bug?&lt;br /&gt;&lt;br /&gt;It is difficult to use database objects declared in a module from within a form.&lt;br /&gt;courtesy:DEVFYI - Developer Resource - FYI&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-3498632357435774630?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/3498632357435774630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=3498632357435774630' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3498632357435774630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3498632357435774630'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/visual-basic-interview-questions-4.html' title='Visual Basic Interview Questions -4'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-6125849887379681349</id><published>2008-07-24T09:17:00.000-07:00</published><updated>2008-07-24T09:18:38.043-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Interview Questions'/><title type='text'>Visual Basic Interview Questions -3</title><content type='html'>&lt;a href=""&gt;&lt;br /&gt;31. What are the Style Properties of Combo Box?&lt;br /&gt;&lt;br /&gt;Simple, Dropdown list We can type and select. Dropdown Combo Only Drop Down.&lt;br /&gt;&lt;br /&gt;32. What are the Style properties of List Box?&lt;br /&gt;&lt;br /&gt;Simple Single Select , Extended. Multiple Select.&lt;br /&gt;&lt;br /&gt;33. What is Collection Objects?&lt;br /&gt;&lt;br /&gt;Similarly to arrays but is preferred over an array because of the following reasons.&lt;br /&gt;1. A collection objects uses less Memory than an array.&lt;br /&gt;2. It provides methods to add and delete members.&lt;br /&gt;3. It does not required reason statement when objects are added or deleted.&lt;br /&gt;4. It does not have boundary limitations.&lt;br /&gt;&lt;br /&gt;34. What is the difference between Property Get, Set and Let?&lt;br /&gt;&lt;br /&gt;Set Value is assigned to ActiveX Object from the form.&lt;br /&gt;Let Value is retried to ActiveX Object from the form.&lt;br /&gt;Get- Assigns the value of an expression to a variable or property.&lt;br /&gt;&lt;br /&gt;35. How to change the Mouse Pointer?&lt;br /&gt;&lt;br /&gt;Screen.MousePointer = VBHourGlass/VBNormal.&lt;br /&gt;&lt;br /&gt;36. What is Friend Variable?&lt;br /&gt;&lt;br /&gt;Scope sharable between projects.&lt;br /&gt;&lt;br /&gt;37. What is DBFailError?&lt;br /&gt;Rolls Back updates if any errors Occurs&lt;br /&gt;&lt;br /&gt;38. What are the record set types?&lt;br /&gt;&lt;br /&gt;RdOpenFowardOnly 0 (Default used only for the read only purpose)&lt;br /&gt;RdOpenStatic 1&lt;br /&gt;RdOpenDynamic 2&lt;br /&gt;RdOpenKeySet 3 (Normally used for the live project)&lt;br /&gt;&lt;br /&gt;39. What is the diff between RDO and ADO?&lt;br /&gt;&lt;br /&gt;RDO is Hierarchy model where as ADO is Object model. ADO can access data from both flat files as well as the data bases. I.e., It is encapsulation of DAO, RDO , OLE that is why we call it as OLE-DB Technology.&lt;br /&gt;&lt;br /&gt;40. Diff types of Lock Types?&lt;br /&gt;&lt;br /&gt;RdConcurReadOnly 0 (Default)&lt;br /&gt;RdConcurLock 1 (Pessimistic Locking)&lt;br /&gt;RdConcurRowver 2 (Optimistic Lociking)&lt;br /&gt;RdConcurValues 3&lt;br /&gt;RdConcurBatch 4&lt;br /&gt;&lt;br /&gt;41. What are the scopes of the class?&lt;br /&gt;&lt;br /&gt;Public, private, Friend&lt;br /&gt;&lt;br /&gt;42. Have you create Properties and Methods for your own Controls?&lt;br /&gt;&lt;br /&gt;Properties Public variable of a Class&lt;br /&gt;Method Public procedure of a class&lt;br /&gt;&lt;br /&gt;43. Private Dim x as integer. Valid ?&lt;br /&gt;&lt;br /&gt;Private cannot be used in front of DIM.&lt;br /&gt;&lt;br /&gt;44. Different type of Instantiation?&lt;br /&gt;&lt;br /&gt;Private Only for the Specific Module.&lt;br /&gt;Public not creatable Private &amp; Public&lt;br /&gt;Multi Use - Variable we have to declare.&lt;br /&gt;Single Use Not possible through dll.&lt;br /&gt;Global Multiuse Have variable not Required to Declare.&lt;br /&gt;Global Single Use - Only for exe.&lt;br /&gt;&lt;br /&gt;45. What are the different types of Dialog Box?&lt;br /&gt;&lt;br /&gt;Predefined, Custom, User Defined.&lt;br /&gt;&lt;br /&gt;courtesy:DEVFYI - Developer Resource - FYI&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-6125849887379681349?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/6125849887379681349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=6125849887379681349' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6125849887379681349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6125849887379681349'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/visual-basic-interview-questions-3.html' title='Visual Basic Interview Questions -3'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-3779541681226827643</id><published>2008-07-24T09:16:00.000-07:00</published><updated>2008-07-24T09:17:19.691-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Interview Questions'/><title type='text'>Visual Basic Interview Questions -2</title><content type='html'>&lt;a href=""&gt;6. What are the main components of the ADO object model? How are they used?&lt;br /&gt;&lt;br /&gt;Connection: Used to make a connection between your app and an external data source, ie, sql server.Command: Used to build queries, including user-specific parameters, to access records from a data source (which are returned in a Recordset)Recordset:Used to access records returned from an SQL query. With a recordset, you can navigate returned records. You can also add, modify or delete records.&lt;br /&gt;&lt;br /&gt;17. Can We create CGI scripts in VB??&lt;br /&gt;&lt;br /&gt;Yes.&lt;br /&gt;&lt;br /&gt;18. Dim x, y as integer. What is x and y data type?&lt;br /&gt;&lt;br /&gt;X as variant and y as integer.&lt;br /&gt;&lt;br /&gt;19. What is Centralization Error Handling?&lt;br /&gt;&lt;br /&gt;Writing function and calling it when error occurs.&lt;br /&gt;&lt;br /&gt;20. What is frx?&lt;br /&gt;&lt;br /&gt;When some controls like grid and third party control placed in our application then it will create frx in run time.&lt;br /&gt;&lt;br /&gt;21. What is the Dll required for running the VB?&lt;br /&gt;&lt;br /&gt;Vbrun300.dll&lt;br /&gt;&lt;br /&gt;22. Why we use Treeview Control?&lt;br /&gt;&lt;br /&gt;To list the hierarchical list of the node objects. Such of files and Directories.&lt;br /&gt;&lt;br /&gt;23. Handling Error in Calling chain.&lt;br /&gt;&lt;br /&gt;This will call the top most error where the error is handled.&lt;br /&gt;&lt;br /&gt;24. In project properties if we set Unattended what is it mean?&lt;br /&gt;&lt;br /&gt;This cannot have user interface. This can be used for the COM creation.&lt;br /&gt;&lt;br /&gt;25. What is the size of the variant data type?&lt;br /&gt;&lt;br /&gt;The Variant data type has a numeric storage size of 16 bytes and can contain data up to the range of a Decimal, or a character storage size of 22 bytes (plus string length),and can store any character text.&lt;br /&gt;&lt;br /&gt;26. What is view Port?&lt;br /&gt;&lt;br /&gt;The area under which the container provides the view of the ActiveX Document is known as a view port.&lt;br /&gt;&lt;br /&gt;27. What are the different types of error?&lt;br /&gt;&lt;br /&gt;Syntax Errors, Runtime , Logic.&lt;br /&gt;&lt;br /&gt;28. What is the diff between the Std and Class Module?&lt;br /&gt;&lt;br /&gt;Std Global with in the project. Cls Global through out the all project only thing is we want to set the type lib. Class Modules can be Instantiated.&lt;br /&gt;&lt;br /&gt;29. What is Mixed Cursors?&lt;br /&gt;&lt;br /&gt;Static + Keyset&lt;br /&gt;&lt;br /&gt;30. Drag and Drop state numbers and functions?&lt;br /&gt;&lt;br /&gt;State 0 Source control is being dragged with the range of a target.&lt;br /&gt;1 Out of the range of a target.&lt;br /&gt;2 One position in the target to another. &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-3779541681226827643?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/3779541681226827643/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=3779541681226827643' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3779541681226827643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3779541681226827643'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/visual-basic-interview-questions-2.html' title='Visual Basic Interview Questions -2'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-2139185763871880773</id><published>2008-07-24T09:09:00.000-07:00</published><updated>2008-07-24T09:16:08.657-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Interview Questions'/><title type='text'>Visual Basic Interview Questions -1</title><content type='html'>&lt;a href=""&gt; 1. How do you register a component?&lt;br /&gt;&lt;br /&gt;Compiling the component, running REGSVR32 MyDLL.dll&lt;br /&gt;&lt;br /&gt;2. Name and explain the different compatibility types when creating a COM component&lt;br /&gt;&lt;br /&gt;No Compatibility ? New GUID created, references from other components will not workProject Compatibility ? Default for a new component Binary Compatibility ? GUID does not change, references from other components will work&lt;br /&gt;&lt;br /&gt;3. Why iss it important to use source control software for source code?&lt;br /&gt;Modification history.Code ownership: Multiple people can not modify the same code at the same time.&lt;br /&gt;&lt;br /&gt;4. What two methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful?&lt;br /&gt;&lt;br /&gt;SetComplete and SetAbort.&lt;br /&gt;&lt;br /&gt;5. What is the tool used to configure the port range and protocols for DCOM communications?&lt;br /&gt;&lt;br /&gt;DCOMCONFIG.EXE&lt;br /&gt;&lt;br /&gt;6. What does Option Explicit refer to?&lt;br /&gt;&lt;br /&gt;All variables must be declared before use. Their type is not required.&lt;br /&gt;&lt;br /&gt;7. What are the different ways to Declare and Instantiate an object in Visual Basic 6?&lt;br /&gt;&lt;br /&gt;Dim obj as OBJ.CLASS with eitherSet obj = New OBJ.CLASS orSet obj = CreateObject(OBJ.CLASS?) orSet obj = GetObject( , OBJ.CLASS?)orDim obj as New OBJ.CLASS&lt;br /&gt;&lt;br /&gt;8. Name the four different cursor types in ADO and describe them briefly.&lt;br /&gt;&lt;br /&gt;The cursor types are listed from least to most resource intensive.Forward Only Fastest, can only move forward in recordset Static Can move to any record in the recordset. Data is static and never changes.KeySet Changes are detectable, records that are deleted by other users are unavailable, and records created by other users are not detectedDynamic ? All changes are visible.&lt;br /&gt;&lt;br /&gt;9. Name the four different locking type in ADO and describe them briefly.&lt;br /&gt;&lt;br /&gt;LockPessimistic Locks the row once after any edits occur.LockOptimistic Locks the row only when Update is called.LockBatchOptimistic Allows Batch Updates.LockReadOnly Read only. Can not alter the data.&lt;br /&gt;&lt;br /&gt;10. Describe Database Connection pooling (relative to MTS )?&lt;br /&gt;&lt;br /&gt;This allows MTS to reuse database connections. Database connections are put to sleep as opposed to being created and destroyed and are activated upon request.&lt;br /&gt;&lt;br /&gt;11. What are the ADO objects?&lt;br /&gt;Provide a scenario using three of them to return data from a database. Expected answer: Connection Connects to a data source; contains the Errors collectionCommand Executes commands to the data source. Is the only object that can accept parameters for a stored procedure.Recordset The set of data returned from the database.Scenario: There are many possibilities. The most likely is as follows:Dim conn As ADODB.ConnectionDim rs As ADODB.RecordsetDim Cmd As ADODB.Commandconn.ConnectionString = ?CONNECTION STRING?conn.OpenSet Cmd.ActiveConnection = connCmd.CommandText = ?SQL STATEMENT?Set rs = Cmd.ExecuteSet rs.ActiveConnection = Nothingconn.Close&lt;br /&gt;&lt;br /&gt;12. Under the ADO Command Object, what collection is responsible for input to stored procedures?&lt;br /&gt;&lt;br /&gt;The Parameters collection.&lt;br /&gt;&lt;br /&gt;13. What are some benefits of using MTS?&lt;br /&gt;&lt;br /&gt;Database Pooling, Transactional operations, Deployment, Security, Remote Execution.&lt;br /&gt;&lt;br /&gt;14. What is the benefit of wrapping database calls into MTS transactions?&lt;br /&gt;&lt;br /&gt;If database calls are made within the context of a transaction, aborting the transaction will undo and changes that occur within that transaction. This removes the possibility of stranded, or partial data.&lt;br /&gt;&lt;br /&gt;15. Describe and In Process vs. Out of Process component. Which is faster?&lt;br /&gt;&lt;br /&gt;An in-process component is implemented as a DLL, and runs in the same process space as its client app, enabling the most efficient communication between client and component.Each client app that uses the component starts a new instance of it.An out of process component is implemented as an EXE, and unlike a dll, runs in its own process space. As a result, exe’s are slower then dll’s because communications between client and component must be marshalled across process boundaries. A single instance of an out of process component can service many clients. &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-2139185763871880773?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/2139185763871880773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=2139185763871880773' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2139185763871880773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2139185763871880773'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/visual-basic-interview-questions-1.html' title='Visual Basic Interview Questions -1'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-50337082217978169</id><published>2008-07-24T09:08:00.000-07:00</published><updated>2008-07-24T09:09:34.056-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql interview questions'/><title type='text'>SQL Interview Questions -8</title><content type='html'>&lt;a href=""&gt; 121. What is the difference between file server and a database server ?&lt;br /&gt;&lt;br /&gt;A file server just transfers all the data requested by all its client and the client processes the data while a database server runs the query and sends only the query output.&lt;br /&gt;&lt;br /&gt;122. What is inheritance ?&lt;br /&gt;&lt;br /&gt;Inheritance is a method by which properties and methods of an existing object are automatically passed to any object derived from it.&lt;br /&gt;&lt;br /&gt;123. What are the two components of ODBC ?&lt;br /&gt;&lt;br /&gt;1. An ODBC manager/administrator and&lt;br /&gt;2. ODBC driver.&lt;br /&gt;&lt;br /&gt;124. What is the function of a ODBC manager ?&lt;br /&gt;&lt;br /&gt;The ODBC Manager manages all the data sources that exists in the system.&lt;br /&gt;&lt;br /&gt;125. What is the function of a ODBC Driver ?&lt;br /&gt;&lt;br /&gt;The ODBC Driver allows the developer to talk to the back end database.&lt;br /&gt;&lt;br /&gt;126. What description of a data source is required for ODBC ?&lt;br /&gt;&lt;br /&gt;The name of the DBMS, the location of the source and the database dependent information.&lt;br /&gt;&lt;br /&gt;127. How is a connection establised by ODBC ?&lt;br /&gt;&lt;br /&gt;ODBC uses the description of the datasource available in the ODBC.INI file to load the required drivers to access that particular back end database.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-50337082217978169?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/50337082217978169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=50337082217978169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/50337082217978169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/50337082217978169'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/sql-interview-questions-8.html' title='SQL Interview Questions -8'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8207764024290046992</id><published>2008-07-24T09:06:00.000-07:00</published><updated>2008-07-24T09:08:08.027-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql interview questions'/><title type='text'>SQL Interview Questions -7</title><content type='html'>&lt;a href=""&gt; 101. What does the term downsizing refer to ?&lt;br /&gt;&lt;br /&gt;A host based application is re-engineered to run in smaller or LAN based environment.&lt;br /&gt;&lt;br /&gt;102. What is event trigger ?&lt;br /&gt;&lt;br /&gt;An event trigger, a segment of code which is associated with each event and is fired when the event occurs.&lt;br /&gt;&lt;br /&gt;103. Why do stored procedures reduce network traffic ?&lt;br /&gt;&lt;br /&gt;When a stored procedure is called, only the procedure call is sent to the server and not the statements that the procedure contains.&lt;br /&gt;&lt;br /&gt;104. What are the types of processes that a server runs ?&lt;br /&gt;&lt;br /&gt;Foreground process and Background process.&lt;br /&gt;&lt;br /&gt;105. What is a event handler ?&lt;br /&gt;&lt;br /&gt;An event handler is a routine that is written to respond to a particular event.&lt;br /&gt;&lt;br /&gt;106. What is an integrity constraint ?&lt;br /&gt;&lt;br /&gt;An integrity constraint allows the definition of certain restrictions, at the table level, on the data that is entered into a table.&lt;br /&gt;&lt;br /&gt;107. What are the various uses of database triggers ?&lt;br /&gt;&lt;br /&gt;Database triggers can be used to enforce business rules, to maintain derived values and perform value-based auditing.&lt;br /&gt;&lt;br /&gt;108. What is a transaction ?&lt;br /&gt;&lt;br /&gt;A transaction is a set of operations that begin when the first DML is issued and end when a commit or rollback is issued. BEGIN COMMIT/ROLLBACK are the boundries of a transaction.&lt;br /&gt;&lt;br /&gt;109. Why are the integrity constraints preferred to database triggers ?&lt;br /&gt;&lt;br /&gt;Because it is easier to define an integrity constraint than a database trigger.&lt;br /&gt;&lt;br /&gt;110. Why is it better to use an integrity constraint to validate data in a table than to use a stored procedure ?&lt;br /&gt;&lt;br /&gt;Because an integrity constraint is automatically checked while data is inserted into a table. A stored has to be specifically invoked.&lt;br /&gt;&lt;br /&gt;111. What are the three components of a client server model ?&lt;br /&gt;&lt;br /&gt;A Client,&lt;br /&gt;A Server and&lt;br /&gt;A Network/Communication software.&lt;br /&gt;&lt;br /&gt;112. What are the advantages of client/server model ?&lt;br /&gt;&lt;br /&gt;Flexibility of the system, scalability, cost saving, centralised control and implementation of business rules, increase of developers productivity, portability, improved network and resource utilization.&lt;br /&gt;&lt;br /&gt;113. What are the disadvantages of the client/server model ?&lt;br /&gt;&lt;br /&gt;Heterogeneity of the system results in reduced reliablity. May not be suitable for all applications. Managing and tuning networks becomes difficult.&lt;br /&gt;&lt;br /&gt;114. What are the different topologies available for network ?&lt;br /&gt;&lt;br /&gt;Star,&lt;br /&gt;Bus,&lt;br /&gt;Ring.&lt;br /&gt;&lt;br /&gt;115. What is the first work of Client process ?&lt;br /&gt;&lt;br /&gt;A client process at first establishes connection with the Server.&lt;br /&gt;&lt;br /&gt;115. What are the responsibilities of a Server ?&lt;br /&gt;&lt;br /&gt;1. Manage resources optimally across multiple clients.&lt;br /&gt;2. Controlling database access and security.&lt;br /&gt;3. Protecting the databse and recovering it from crashes.&lt;br /&gt;4. Enforcing integrity rules globally.&lt;br /&gt;&lt;br /&gt;116. In a Client/Server context, what does API (Application Programming Interface) refer to ?&lt;br /&gt;&lt;br /&gt;An API, in a Client/Server context, is a specification of a set of functions for communication between the client and the server.&lt;br /&gt;&lt;br /&gt;117. Give some examples of standard API??s ?&lt;br /&gt;&lt;br /&gt;Open Database Connectivity (ODBC),&lt;br /&gt;Integrated Database Application Programming Interface (IDAPI),&lt;br /&gt;XOpen&lt;br /&gt;SQL/CLI&lt;br /&gt;&lt;br /&gt;118. What is the main advantage of developing an application using an API ?&lt;br /&gt;&lt;br /&gt;The application can be connected to any back end server that is supported by the API.&lt;br /&gt;&lt;br /&gt;119. What is the main disadvantage of developing an application using an API ?&lt;br /&gt;&lt;br /&gt;The application cannot use any special features of the backend server.&lt;br /&gt;&lt;br /&gt;120. Why is an event driven program referred to a passive program ?&lt;br /&gt;&lt;br /&gt;Because an event driven program is always waiting for something to happen before processing.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8207764024290046992?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8207764024290046992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8207764024290046992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8207764024290046992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8207764024290046992'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/sql-interview-questions-7.html' title='SQL Interview Questions -7'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-9000415009195706878</id><published>2008-07-24T09:04:00.000-07:00</published><updated>2008-07-24T09:06:50.162-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql interview questions'/><title type='text'>SQL Interview Questions -6</title><content type='html'>&lt;a href=""&gt; 81. Which procedure can be used to create a customized error message?&lt;br /&gt;1. RAISE_ERROR&lt;br /&gt;2. SQLERRM&lt;br /&gt;3. RAISE_APPLICATION_ERROR&lt;br /&gt;4. RAISE_SERVER_ERROR&lt;br /&gt;&lt;br /&gt;82. The CHECK_THEATER trigger of the THEATER table has been disabled. Which command can you issue to enable this trigger?&lt;br /&gt;1. ALTER TRIGGER check_theater ENABLE;&lt;br /&gt;2. ENABLE TRIGGER check_theater;&lt;br /&gt;3. ALTER TABLE check_theater ENABLE check_theater;&lt;br /&gt;4. ENABLE check_theater;&lt;br /&gt;&lt;br /&gt;83. Examine this database trigger&lt;br /&gt;52. CREATE OR REPLACE TRIGGER prevent_gross_modification&lt;br /&gt;53. {additional trigger information}&lt;br /&gt;54. BEGIN&lt;br /&gt;55. IF TO_CHAR(sysdate, DY) = MON&lt;br /&gt;56. THEN&lt;br /&gt;57. RAISE_APPLICATION_ERROR(-20000,Gross receipts cannot be deleted on Monday);&lt;br /&gt;58. END IF;&lt;br /&gt;59. END;&lt;br /&gt;&lt;br /&gt;This trigger must fire before each DELETE of the GROSS_RECEIPT table. It should fire only once for the entire DELETE statement. What additional information must you add?&lt;br /&gt;1. BEFORE DELETE ON gross_receipt&lt;br /&gt;2. AFTER DELETE ON gross_receipt&lt;br /&gt;3. BEFORE (gross_receipt DELETE)&lt;br /&gt;4. FOR EACH ROW DELETED FROM gross_receipt&lt;br /&gt;&lt;br /&gt;84. Examine this function:&lt;br /&gt;61. CREATE OR REPLACE FUNCTION set_budget&lt;br /&gt;62. (v_studio_id IN NUMBER, v_new_budget IN NUMBER) IS&lt;br /&gt;63. BEGIN&lt;br /&gt;64. UPDATE studio&lt;br /&gt;65. SET yearly_budget = v_new_budget&lt;br /&gt;WHERE id = v_studio_id;&lt;br /&gt;&lt;br /&gt;IF SQL%FOUND THEN&lt;br /&gt;RETURN TRUEl;&lt;br /&gt;ELSE&lt;br /&gt;RETURN FALSE;&lt;br /&gt;END IF;&lt;br /&gt;&lt;br /&gt;COMMIT;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;Which code must be added to successfully compile this function?&lt;br /&gt;1. Add RETURN right before the IS keyword.&lt;br /&gt;2. Add RETURN number right before the IS keyword.&lt;br /&gt;3. Add RETURN boolean right after the IS keyword.&lt;br /&gt;4. Add RETURN boolean right before the IS keyword.&lt;br /&gt;&lt;br /&gt;85. Under which circumstance must you recompile the package body after recompiling the package specification?&lt;br /&gt;1. Altering the argument list of one of the package constructs&lt;br /&gt;2. Any change made to one of the package constructs&lt;br /&gt;3. Any SQL statement change made to one of the package constructs&lt;br /&gt;4. Removing a local variable from the DECLARE section of one of the package constructs&lt;br /&gt;&lt;br /&gt;86. Procedure and Functions are explicitly executed. This is different from a database trigger. When is a database trigger executed?&lt;br /&gt;1. When the transaction is committed&lt;br /&gt;2. During the data manipulation statement&lt;br /&gt;3. When an Oracle supplied package references the trigger&lt;br /&gt;4. During a data manipulation statement and when the transaction is committed&lt;br /&gt;&lt;br /&gt;87. Which Oracle supplied package can you use to output values and messages from database triggers, stored procedures and functions within SQL*Plus?&lt;br /&gt;1. DBMS_DISPLAY 2. DBMS_OUTPUT 3. DBMS_LIST 4. DBMS_DESCRIBE&lt;br /&gt;&lt;br /&gt;88. What occurs if a procedure or function terminates with failure without being handled?&lt;br /&gt;1. Any DML statements issued by the construct are still pending and can be committed or rolled back.&lt;br /&gt;2. Any DML statements issued by the construct are committed&lt;br /&gt;3. Unless a GOTO statement is used to continue processing within the BEGIN section, the construct terminates.&lt;br /&gt;4. The construct rolls back any DML statements issued and returns the unhandled exception to the calling environment.&lt;br /&gt;&lt;br /&gt;89. Examine this code&lt;br /&gt;71. BEGIN&lt;br /&gt;72. theater_pck.v_total_seats_sold_overall := theater_pck.get_total_for_year;&lt;br /&gt;73. END;&lt;br /&gt;&lt;br /&gt;For this code to be successful, what must be true?&lt;br /&gt;1. Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the GET_TOTAL_FOR_YEAR function must exist only in the body of the THEATER_PCK package.&lt;br /&gt;2. Only the GET_TOTAL_FOR_YEAR variable must exist in the specification of the THEATER_PCK package.&lt;br /&gt;3. Only the V_TOTAL_SEATS_SOLD_OVERALL variable must exist in the specification of the THEATER_PCK package.&lt;br /&gt;4. Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the GET_TOTAL_FOR_YEAR function must exist in the specification of the THEATER_PCK package.&lt;br /&gt;&lt;br /&gt;90 A stored function must return a value based on conditions that are determined at runtime. Therefore, the SELECT statement cannot be hard-coded and must be created dynamically when the function is executed. Which Oracle supplied package will enable this feature?&lt;br /&gt;&lt;br /&gt;1. DBMS_DDL&lt;br /&gt;2. DBMS_DML&lt;br /&gt;3. DBMS_SYN&lt;br /&gt;4. DBMS_SQL&lt;br /&gt;&lt;br /&gt;91 How to implement ISNUMERIC function in SQL *Plus ?&lt;br /&gt;&lt;br /&gt;Method 1:&lt;br /&gt;&lt;br /&gt;Select length (translate (trim (column_name),' +-.0123456789',' ')) from dual ;&lt;br /&gt;&lt;br /&gt;Will give you a zero if it is a number or greater than zero if not numeric (actually gives the count of non numeric characters)&lt;br /&gt;&lt;br /&gt;Method 2:&lt;br /&gt;&lt;br /&gt;select instr(translate('wwww',&lt;br /&gt;'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',&lt;br /&gt;'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'),'X')&lt;br /&gt;FROM dual;&lt;br /&gt;&lt;br /&gt;It returns 0 if it is a number, 1 if it is not.&lt;br /&gt;&lt;br /&gt;92 How to Select last N records from a Table?&lt;br /&gt;&lt;br /&gt;select * from (select rownum a, CLASS_CODE,CLASS_DESC from clm)&lt;br /&gt;where a &gt; ( select (max(rownum)-10) from clm)&lt;br /&gt;&lt;br /&gt;Here N = 10&lt;br /&gt;&lt;br /&gt;The following query has a Problem of performance in the execution of the following query where the table ter.ter_master have 22231 records. So the results are obtained after hours.&lt;br /&gt;&lt;br /&gt;Cursor rem_master(brepno VARCHAR2) IS&lt;br /&gt;select a.* from ter.ter_master a&lt;br /&gt;where NOT a.repno in (select repno from ermast) and&lt;br /&gt;(brepno = 'ALL' or a.repno &gt; brepno)&lt;br /&gt;Order by a.repno&lt;br /&gt;&lt;br /&gt;What are steps required tuning this query to improve its performance?&lt;br /&gt;&lt;br /&gt;-Have an index on TER_MASTER.REPNO and one on ERMAST.REPNO&lt;br /&gt;&lt;br /&gt;-Be sure to get familiar with EXPLAIN PLAN. This can help you determine the execution path that Oracle takes. If you are using Cost Based Optimizer mode, then be sure that your statistics on TER_MASTER are up-to-date. -Also, you can change your SQL to:&lt;br /&gt;&lt;br /&gt;SELECT a.*&lt;br /&gt;FROM ter.ter_master a&lt;br /&gt;WHERE NOT EXISTS (SELECT b.repno FROM ermast b&lt;br /&gt;WHERE a.repno=b.repno) AND&lt;br /&gt;(a.brepno = 'ALL' or a.repno &gt; a.brepno)&lt;br /&gt;ORDER BY a.repno;&lt;br /&gt;&lt;br /&gt;93 What is the difference between Truncate and Delete interms of Referential Integrity?&lt;br /&gt;&lt;br /&gt;DELETE removes one or more records in a table, checking referential Constraints (to see if there are dependent child records) and firing any DELETE triggers. In the order you are deleting (child first then parent) There will be no problems.&lt;br /&gt;TRUNCATE removes ALL records in a table. It does not execute any triggers. Also, it only checks for the existence (and status) of another foreign key Pointing to the table. If one exists and is enabled, then you will get The following error. This is true even if you do the child tables first.&lt;br /&gt;ORA-02266: unique/primary keys in table referenced by enabled foreign keys&lt;br /&gt;You should disable the foreign key constraints in the child tables before issuing the TRUNCATE command, then re-enable them afterwards.&lt;br /&gt;&lt;br /&gt;94. What does preemptive in preemptive multitasking mean ?&lt;br /&gt;&lt;br /&gt;Preemptive refers to the fact that each task is alloted fixed time slots and at the end of that time slot the next task is started.&lt;br /&gt;&lt;br /&gt;95. What does the OLTP stands for ?&lt;br /&gt;&lt;br /&gt;OLTP stands for On Line Transaction Processing&lt;br /&gt;&lt;br /&gt;96. What is the most important requirement for OLTP ?&lt;br /&gt;&lt;br /&gt;OLTP requires real time response.&lt;br /&gt;&lt;br /&gt;97. In a client server environment, what would be the major work that the client deals with ?&lt;br /&gt;&lt;br /&gt;The client deals with the user interface part of the system.&lt;br /&gt;&lt;br /&gt;98. Why is the most of the processing done at the sever ?&lt;br /&gt;&lt;br /&gt;To reduce the network traffic and for application sharing and implementing business rules.&lt;br /&gt;&lt;br /&gt;99. What does teh term upsizing refer to ?&lt;br /&gt;&lt;br /&gt;Applications that have outgrown their environment are re-engineered to run in a larger environment. This is upsizing.&lt;br /&gt;&lt;br /&gt;100. What does one do when one is rightsizing ?&lt;br /&gt;&lt;br /&gt;With rightsizing, one would move applications to the most appropriate server platforms.&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-9000415009195706878?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/9000415009195706878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=9000415009195706878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/9000415009195706878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/9000415009195706878'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/sql-interview-questions-6.html' title='SQL Interview Questions -6'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8483389340535178992</id><published>2008-07-24T09:02:00.000-07:00</published><updated>2008-07-24T09:04:04.498-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql interview questions'/><title type='text'>SQL Interview Questions -5</title><content type='html'>&lt;a href=""&gt; 60.What is CYCLE/NO CYCLE in a Sequence?&lt;br /&gt;&lt;br /&gt;CYCLE specifies that the sequence continue to generate values after reaching either maximum or minimum value. After pan-ascending sequence reaches its maximum value, it generates its minimum value. After a descending sequence reaches its minimum, it generates its maximum.&lt;br /&gt;NO CYCLE specifies that the sequence cannot generate more values after reaching its maximum or minimum value.&lt;br /&gt;&lt;br /&gt;61. What are the advantages of VIEW?&lt;br /&gt;&lt;br /&gt;- To protect some of the columns of a table from other users.&lt;br /&gt;- To hide complexity of a query.&lt;br /&gt;- To hide complexity of calculations.&lt;br /&gt;&lt;br /&gt;62. Can a view be updated/inserted/deleted? If Yes - under what conditions?&lt;br /&gt;&lt;br /&gt;A View can be updated/deleted/inserted if it has only one base table if the view is based on columns from one or more tables then insert, update and delete is not possible.&lt;br /&gt;&lt;br /&gt;63. If a view on a single base table is manipulated will the changes be reflected on the base table?&lt;br /&gt;&lt;br /&gt;If changes are made to the tables and these tables are the base tables of a view, then the changes will be reference on the view.&lt;br /&gt;&lt;br /&gt;64. Which of the following statements is true about implicit cursors?&lt;br /&gt;&lt;br /&gt;1. Implicit cursors are used for SQL statements that are not named.&lt;br /&gt;2. Developers should use implicit cursors with great care.&lt;br /&gt;3. Implicit cursors are used in cursor for loops to handle data processing.&lt;br /&gt;4. Implicit cursors are no longer a feature in Oracle.&lt;br /&gt;&lt;br /&gt;65. Which of the following is not a feature of a cursor FOR loop?&lt;br /&gt;&lt;br /&gt;1. Record type declaration.&lt;br /&gt;2. Opening and parsing of SQL statements.&lt;br /&gt;3. Fetches records from cursor.&lt;br /&gt;4. Requires exit condition to be defined.&lt;br /&gt;&lt;br /&gt;66. A developer would like to use referential datatype declaration on a variable. The variable name is EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LNAME, respectively. How would the developer define this variable using referential datatypes?&lt;br /&gt;&lt;br /&gt;1. Use employee.lname%type.&lt;br /&gt;2. Use employee.lname%rowtype.&lt;br /&gt;3. Look up datatype for EMPLOYEE column on LASTNAME table and use that.&lt;br /&gt;4. Declare it to be type LONG.&lt;br /&gt;&lt;br /&gt;67. Which three of the following are implicit cursor attributes?&lt;br /&gt;&lt;br /&gt;1. %found&lt;br /&gt;2. %too_many_rows&lt;br /&gt;3. %notfound&lt;br /&gt;4. %rowcount&lt;br /&gt;5. %rowtype&lt;br /&gt;&lt;br /&gt;68. If left out, which of the following would cause an infinite loop to occur in a simple loop?&lt;br /&gt;&lt;br /&gt;1. LOOP&lt;br /&gt;2. END LOOP&lt;br /&gt;3. IF-THEN&lt;br /&gt;4. EXIT&lt;br /&gt;&lt;br /&gt;69. Which line in the following statement will produce an error?&lt;br /&gt;&lt;br /&gt;1. cursor action_cursor is&lt;br /&gt;2. select name, rate, action&lt;br /&gt;3. into action_record&lt;br /&gt;4. from action_table;&lt;br /&gt;5. There are no errors in this statement.&lt;br /&gt;&lt;br /&gt;70. The command used to open a CURSOR FOR loop is&lt;br /&gt;&lt;br /&gt;1. open&lt;br /&gt;2. fetch&lt;br /&gt;3. parse&lt;br /&gt;4. None, cursor for loops handle cursor opening implicitly.&lt;br /&gt;&lt;br /&gt;71. What happens when rows are found using a FETCH statement&lt;br /&gt;&lt;br /&gt;1. It causes the cursor to close&lt;br /&gt;2. It causes the cursor to open&lt;br /&gt;3. It loads the current row values into variables&lt;br /&gt;4. It creates the variables to hold the current row values&lt;br /&gt;&lt;br /&gt;72. Read the following code:&lt;br /&gt;10. CREATE OR REPLACE PROCEDURE find_cpt&lt;br /&gt;11. (v_movie_id {Argument Mode} NUMBER, v_cost_per_ticket {argument mode} NUMBER)&lt;br /&gt;12. IS&lt;br /&gt;13. BEGIN&lt;br /&gt;14. IF v_cost_per_ticket &gt; 8.5 THEN&lt;br /&gt;15. SELECT cost_per_ticket&lt;br /&gt;16. INTO v_cost_per_ticket&lt;br /&gt;17. FROM gross_receipt&lt;br /&gt;18. WHERE movie_id = v_movie_id;&lt;br /&gt;19. END IF;&lt;br /&gt;20. END;&lt;br /&gt;Which mode should be used for V_COST_PER_TICKET?&lt;br /&gt;1. IN&lt;br /&gt;2. OUT&lt;br /&gt;3. RETURN&lt;br /&gt;4. IN OUT&lt;br /&gt;&lt;br /&gt;73. Read the following code:&lt;br /&gt;22. CREATE OR REPLACE TRIGGER update_show_gross&lt;br /&gt;23. {trigger information}&lt;br /&gt;24. BEGIN&lt;br /&gt;25. {additional code}&lt;br /&gt;26. END;&lt;br /&gt;&lt;br /&gt;The trigger code should only execute when the column, COST_PER_TICKET, is greater than $3. Which trigger information will you add?&lt;br /&gt;&lt;br /&gt;1. WHEN (new.cost_per_ticket &gt; 3.75)&lt;br /&gt;2. WHEN (:new.cost_per_ticket &gt; 3.75&lt;br /&gt;3. WHERE (new.cost_per_ticket &gt; 3.75)&lt;br /&gt;4. WHERE (:new.cost_per_ticket &gt; 3.75)&lt;br /&gt;&lt;br /&gt;74. What is the maximum number of handlers processed before the PL/SQL block is exited when an exception occurs?&lt;br /&gt;&lt;br /&gt;1. Only one&lt;br /&gt;2. All that apply&lt;br /&gt;3. All referenced&lt;br /&gt;4. None&lt;br /&gt;&lt;br /&gt;77. For which trigger timing can you reference the NEW and OLD qualifiers?&lt;br /&gt;&lt;br /&gt;1. Statement and Row 2. Statement only 3. Row only 4. Oracle Forms trigger&lt;br /&gt;&lt;br /&gt;78. Read the following code:&lt;br /&gt;CREATE OR REPLACE FUNCTION get_budget(v_studio_id IN NUMBER)&lt;br /&gt;RETURN number IS&lt;br /&gt;&lt;br /&gt;v_yearly_budget NUMBER;&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;SELECT yearly_budget&lt;br /&gt;INTO v_yearly_budget&lt;br /&gt;FROM studio&lt;br /&gt;WHERE id = v_studio_id;&lt;br /&gt;&lt;br /&gt;RETURN v_yearly_budget;&lt;br /&gt;END;&lt;br /&gt;Which set of statements will successfully invoke this function within SQL*Plus?&lt;br /&gt;1. VARIABLE g_yearly_budget NUMBER&lt;br /&gt;EXECUTE g_yearly_budget := GET_BUDGET(11);&lt;br /&gt;2. VARIABLE g_yearly_budget NUMBER&lt;br /&gt;EXECUTE :g_yearly_budget := GET_BUDGET(11);&lt;br /&gt;3. VARIABLE :g_yearly_budget NUMBER&lt;br /&gt;EXECUTE :g_yearly_budget := GET_BUDGET(11);&lt;br /&gt;4. VARIABLE g_yearly_budget NUMBER&lt;br /&gt;&lt;br /&gt;31. CREATE OR REPLACE PROCEDURE update_theater&lt;br /&gt;32. (v_name IN VARCHAR v_theater_id IN NUMBER) IS&lt;br /&gt;33. BEGIN&lt;br /&gt;34. UPDATE theater&lt;br /&gt;35. SET name = v_name&lt;br /&gt;36. WHERE id = v_theater_id;&lt;br /&gt;37. END update_theater;&lt;br /&gt;&lt;br /&gt;79. When invoking this procedure, you encounter the error:&lt;br /&gt;ORA-000: Unique constraint(SCOTT.THEATER_NAME_UK) violated.&lt;br /&gt;How should you modify the function to handle this error?&lt;br /&gt;1. An user defined exception must be declared and associated with the error code and handled in the EXCEPTION section.&lt;br /&gt;2. Handle the error in EXCEPTION section by referencing the error code directly.&lt;br /&gt;3. Handle the error in the EXCEPTION section by referencing the UNIQUE_ERROR predefined exception.&lt;br /&gt;4. Check for success by checking the value of SQL%FOUND immediately after the UPDATE statement.&lt;br /&gt;&lt;br /&gt;80. Read the following code:&lt;br /&gt;40. CREATE OR REPLACE PROCEDURE calculate_budget IS&lt;br /&gt;41. v_budget studio.yearly_budget%TYPE;&lt;br /&gt;42. BEGIN&lt;br /&gt;43. v_budget := get_budget(11);&lt;br /&gt;44. IF v_budget &lt;&gt;&lt;br /&gt;45. THEN&lt;br /&gt;46. set_budget(11,30000000);&lt;br /&gt;47. END IF;&lt;br /&gt;48. END;&lt;br /&gt;&lt;br /&gt;You are about to add an argument to CALCULATE_BUDGET. What effect will this have?&lt;br /&gt;1. The GET_BUDGET function will be marked invalid and must be recompiled before the next execution.&lt;br /&gt;2. The SET_BUDGET function will be marked invalid and must be recompiled before the next execution.&lt;br /&gt;3. Only the CALCULATE_BUDGET procedure needs to be recompiled.&lt;br /&gt;4. All three procedures are marked invalid and must be recompiled. &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8483389340535178992?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8483389340535178992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8483389340535178992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8483389340535178992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8483389340535178992'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/sql-interview-questions-5.html' title='SQL Interview Questions -5'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-7866380943063985248</id><published>2008-07-24T09:01:00.000-07:00</published><updated>2008-07-24T09:02:40.982-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql interview questions'/><title type='text'>SQL Interview Questions -4</title><content type='html'>&lt;a href=""&gt; 41. What is a join? Explain the different types of joins?&lt;br /&gt;&lt;br /&gt;Join is a query, which retrieves related columns or rows from multiple tables.&lt;br /&gt;Self Join - Joining the table with itself.&lt;br /&gt;Equi Join - Joining two tables by equating two common columns.&lt;br /&gt;Non-Equi Join - Joining two tables by equating two common columns.&lt;br /&gt;Outer Join - Joining two tables in such a way that query can also retrieve rows that do not have corresponding join value in the other table.&lt;br /&gt;&lt;br /&gt;42. What is the sub-query?&lt;br /&gt;&lt;br /&gt;Sub-query is a query whose return values are used in filtering conditions of the main query.&lt;br /&gt;&lt;br /&gt;43. What is correlated sub-query?&lt;br /&gt;&lt;br /&gt;Correlated sub-query is a sub-query, which has reference to the main query.&lt;br /&gt;&lt;br /&gt;44. Explain CONNECT BY PRIOR?&lt;br /&gt;&lt;br /&gt;Retrieves rows in hierarchical order eg.&lt;br /&gt;select empno, ename from emp where.&lt;br /&gt;&lt;br /&gt;45. Difference between SUBSTR and INSTR?&lt;br /&gt;&lt;br /&gt;INSTR (String1, String2 (n, (m)),&lt;br /&gt;INSTR returns the position of the m-th occurrence of the string 2 in string1. The search begins from nth position of string1.&lt;br /&gt;SUBSTR (String1 n, m)&lt;br /&gt;SUBSTR returns a character string of size m in string1, starting from n-th position of string1.&lt;br /&gt;&lt;br /&gt;46. Explain UNION, MINUS, UNION ALL and INTERSECT?&lt;br /&gt;&lt;br /&gt;INTERSECT - returns all distinct rows selected by both queries. MINUS - returns all distinct rows selected by the first query but not by the second. UNION - returns all distinct rows selected by either query UNION ALL - returns all rows selected by either query, including all duplicates.&lt;br /&gt;&lt;br /&gt;47. What is ROWID?&lt;br /&gt;&lt;br /&gt;ROWID is a pseudo column attached to each row of a table. It is 18 characters long, blockno, rownumber are the components of ROWID.&lt;br /&gt;&lt;br /&gt;48. What is the fastest way of accessing a row in a table?&lt;br /&gt;Using ROWID.&lt;br /&gt;CONSTRAINTS&lt;br /&gt;&lt;br /&gt;49. What is an integrity constraint?&lt;br /&gt;&lt;br /&gt;Integrity constraint is a rule that restricts values to a column in a table.&lt;br /&gt;&lt;br /&gt;50. What is referential integrity constraint?&lt;br /&gt;&lt;br /&gt;Maintaining data integrity through a set of rules that restrict the values of one or more columns of the tables based on the values of primary key or unique key of the referenced table.&lt;br /&gt;&lt;br /&gt;51. What is the usage of SAVEPOINTS?&lt;br /&gt;&lt;br /&gt;SAVEPOINTS are used to subdivide a transaction into smaller parts. It enables rolling back part of a transaction. Maximum of five save points are allowed.&lt;br /&gt;&lt;br /&gt;52. What is ON DELETE CASCADE?&lt;br /&gt;&lt;br /&gt;When ON DELETE CASCADE is specified Oracle maintains referential integrity by automatically removing dependent foreign key values if a referenced primary or unique key value is removed.&lt;br /&gt;&lt;br /&gt;53. What are the data types allowed in a table?&lt;br /&gt;&lt;br /&gt;CHAR, VARCHAR2, NUMBER, DATE, RAW, LONG and LONG RAW.&lt;br /&gt;&lt;br /&gt;54. What is difference between CHAR and VARCHAR2? What is the maximum SIZE allowed for each type?&lt;br /&gt;&lt;br /&gt;CHAR pads blank spaces to the maximum length.&lt;br /&gt;VARCHAR2 does not pad blank spaces.&lt;br /&gt;For CHAR the maximum length is 255 and 2000 for VARCHAR2.&lt;br /&gt;&lt;br /&gt;55. How many LONG columns are allowed in a table? Is it possible to use LONG columns in WHERE clause or ORDER BY?&lt;br /&gt;&lt;br /&gt;Only one LONG column is allowed. It is not possible to use LONG column in WHERE or ORDER BY clause.&lt;br /&gt;&lt;br /&gt;56. What are the pre-requisites to modify datatype of a column and to add a column with NOT NULL constraint?&lt;br /&gt;&lt;br /&gt;- To modify the datatype of a column the column must be empty.&lt;br /&gt;- To add a column with NOT NULL constrain, the table must be empty.&lt;br /&gt;&lt;br /&gt;57. Where the integrity constraints are stored in data dictionary?&lt;br /&gt;&lt;br /&gt;The integrity constraints are stored in USER_CONSTRAINTS.&lt;br /&gt;&lt;br /&gt;58. How will you activate/deactivate integrity constraints?&lt;br /&gt;&lt;br /&gt;The integrity constraints can be enabled or disabled by ALTER TABLE ENABLE CONSTRAINT / DISABLE CONSTRAINT.&lt;br /&gt;&lt;br /&gt;59. If unique key constraint on DATE column is created, will it validate the rows that are inserted with SYSDATE?&lt;br /&gt;&lt;br /&gt;It won't, Because SYSDATE format contains time attached with it.&lt;br /&gt;&lt;br /&gt;60. What is a database link?&lt;br /&gt;&lt;br /&gt;Database link is a named path through which a remote database can be accessed.&lt;br /&gt;&lt;br /&gt;60. How to access the current value and next value from a sequence? Is it possible to access the current value in a session before accessing next value?&lt;br /&gt;&lt;br /&gt;Sequence name CURRVAL, sequence name NEXTVAL. It is not possible. Only if you access next value in the session, current value can be accessed.&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-7866380943063985248?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/7866380943063985248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=7866380943063985248' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7866380943063985248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7866380943063985248'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/sql-interview-questions-4.html' title='SQL Interview Questions -4'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-9215885638026561218</id><published>2008-07-24T08:59:00.000-07:00</published><updated>2008-07-24T09:01:22.950-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql interview questions'/><title type='text'>SQL Interview Questions -3</title><content type='html'>&lt;a href=""&gt; 21. Which command executes the contents of a specified file?&lt;br /&gt;&lt;br /&gt;START or @.&lt;br /&gt;&lt;br /&gt;22. What is the value of comm and sal after executing the following query if the initial value of ‘sal’ is 10000&lt;br /&gt;UPDATE EMP SET SAL = SAL + 1000, COMM = SAL*0.1;?&lt;br /&gt;&lt;br /&gt;sal = 11000, comm = 1000.&lt;br /&gt;&lt;br /&gt;23. Which command displays the SQL command in the SQL buffer, and then executes it?&lt;br /&gt;&lt;br /&gt;RUN.&lt;br /&gt;&lt;br /&gt;24. What command is used to get back the privileges offered by the GRANT command?&lt;br /&gt;&lt;br /&gt;REVOKE.&lt;br /&gt;&lt;br /&gt;25. What will be the output of the following query? SELECT DECODE(TRANSLATE('A','1234567890','1111111111'), '1','YES', 'NO' );? NO.&lt;br /&gt;&lt;br /&gt;Explanation : The query checks whether a given string is a numerical digit.&lt;br /&gt;&lt;br /&gt;26. Which date function is used to find the difference between two dates?&lt;br /&gt;&lt;br /&gt;MONTHS_BETWEEN.&lt;br /&gt;&lt;br /&gt;27. What operator performs pattern matching?&lt;br /&gt;&lt;br /&gt;LIKE operator.&lt;br /&gt;&lt;br /&gt;28. What is the use of the DROP option in the ALTER TABLE command?&lt;br /&gt;&lt;br /&gt;It is used to drop constraints specified on the table.&lt;br /&gt;&lt;br /&gt;29. What operator tests column for the absence of data?&lt;br /&gt;&lt;br /&gt;IS NULL operator.&lt;br /&gt;&lt;br /&gt;30. What are the privileges that can be granted on a table by a user to others?&lt;br /&gt;&lt;br /&gt;Insert, update, delete, select, references, index, execute, alter, all.&lt;br /&gt;&lt;br /&gt;31. Which function is used to find the largest integer less than or equal to a specific value?&lt;br /&gt;&lt;br /&gt;FLOOR.&lt;br /&gt;&lt;br /&gt;32. Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?&lt;br /&gt;&lt;br /&gt;Data Definition Language (DDL).&lt;br /&gt;&lt;br /&gt;33. What is the use of DESC in SQL?&lt;br /&gt;&lt;br /&gt;DESC has two purposes. It is used to describe a schema as well as to retrieve rows from table in descending order.&lt;br /&gt;Explanation :&lt;br /&gt;The query SELECT * FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME in descending order.&lt;br /&gt;&lt;br /&gt;34. What command is used to create a table by copying the structure of another table?&lt;br /&gt;&lt;br /&gt;CREATE TABLE .. AS SELECT command&lt;br /&gt;Explanation:&lt;br /&gt;To copy only the structure, the WHERE clause of the SELECT command should contain a FALSE statement as in the following.&lt;br /&gt;CREATE TABLE NEWTABLE AS SELECT * FROM EXISTINGTABLE WHERE 1=2;&lt;br /&gt;If the WHERE condition is true, then all the rows or rows satisfying the condition will be copied to the new table.&lt;br /&gt;&lt;br /&gt;35. TRUNCATE TABLE EMP;&lt;br /&gt;DELETE FROM EMP;&lt;br /&gt;Will the outputs of the above two commands differ?&lt;br /&gt;&lt;br /&gt;Both will result in deleting all the rows in the table EMP..&lt;br /&gt;&lt;br /&gt;36. What is the output of the following query SELECT TRUNC(1234.5678,-2) FROM DUAL;?&lt;br /&gt;&lt;br /&gt;1200.&lt;br /&gt;&lt;br /&gt;37. What are the wildcards used for pattern matching.?&lt;br /&gt;&lt;br /&gt;_ for single character substitution and % for multi-character substitution.&lt;br /&gt;&lt;br /&gt;38. What is the parameter substitution symbol used with INSERT INTO command?&lt;br /&gt;&lt;br /&gt;&amp;&lt;br /&gt;&lt;br /&gt;39. What's an SQL injection?&lt;br /&gt;&lt;br /&gt;SQL Injection is when form data contains an SQL escape sequence and injects a new SQL query to be run.&lt;br /&gt;&lt;br /&gt;40. What is difference between TRUNCATE &amp; DELETE&lt;br /&gt;&lt;br /&gt;TRUNCATE commits after deleting entire table i.e., cannot be rolled back. Database triggers do not fire on TRUNCATE&lt;br /&gt;DELETE allows the filtered deletion. Deleted records can be rolled back or committed. Database triggers fire on DELETE. &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-9215885638026561218?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/9215885638026561218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=9215885638026561218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/9215885638026561218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/9215885638026561218'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/sql-interview-questions-3.html' title='SQL Interview Questions -3'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-4457377776527409728</id><published>2008-07-24T08:57:00.000-07:00</published><updated>2008-07-24T08:59:50.439-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql interview questions'/><title type='text'>SQL Interview Questions -2</title><content type='html'>&lt;a href=""&gt; 1. The most important DDL statements in SQL are:&lt;br /&gt;&lt;br /&gt;CREATE TABLE - creates a new database table&lt;br /&gt;&lt;br /&gt;ALTER TABLE - alters (changes) a database table&lt;br /&gt;&lt;br /&gt;DROP TABLE - deletes a database table&lt;br /&gt;&lt;br /&gt;CREATE INDEX - creates an index (search key)&lt;br /&gt;&lt;br /&gt;DROP INDEX - deletes an index&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Operators used in SELECT statements.&lt;br /&gt;&lt;br /&gt;= Equal&lt;br /&gt;&lt;&gt; or != Not equal&lt;br /&gt;&gt; Greater than&lt;br /&gt;&lt;&gt;= Greater than or equal&lt;br /&gt;&lt;= Less than or equal BETWEEN Between an inclusive range LIKE Search for a pattern&lt;br /&gt;&lt;br /&gt;3. SELECT statements:&lt;br /&gt;&lt;br /&gt;SELECT column_name(s) FROM table_name&lt;br /&gt;SELECT DISTINCT column_name(s) FROM table_name&lt;br /&gt;SELECT column FROM table WHERE column operator value&lt;br /&gt;SELECT column FROM table WHERE column LIKE pattern&lt;br /&gt;SELECT column,SUM(column) FROM table GROUP BY column&lt;br /&gt;SELECT column,SUM(column) FROM table GROUP BY column HAVING SUM(column) condition value&lt;br /&gt;Note that single quotes around text values and numeric values should not be enclosed in quotes. Double quotes may be acceptable in some databases.&lt;br /&gt;&lt;br /&gt;4. The SELECT INTO Statement is most often used to create backup copies of tables or for archiving records.&lt;br /&gt;&lt;br /&gt;SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source&lt;br /&gt;SELECT column_name(s) INTO newtable [IN externaldatabase] FROM source WHERE column_name operator value&lt;br /&gt;&lt;br /&gt;5. The INSERT INTO Statements:&lt;br /&gt;&lt;br /&gt;INSERT INTO table_name VALUES (value1, value2,....)&lt;br /&gt;INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,....)&lt;br /&gt;&lt;br /&gt;6. The Update Statement:&lt;br /&gt;&lt;br /&gt;UPDATE table_name SET column_name = new_value WHERE column_name = some_value&lt;br /&gt;&lt;br /&gt;7. The Delete Statements:&lt;br /&gt;&lt;br /&gt;DELETE FROM table_name WHERE column_name = some_value&lt;br /&gt;Delete All Rows:&lt;br /&gt;DELETE FROM table_name or DELETE * FROM table_name&lt;br /&gt;&lt;br /&gt;8. Sort the Rows:&lt;br /&gt;&lt;br /&gt;SELECT column1, column2, ... FROM table_name ORDER BY columnX, columnY, ..&lt;br /&gt;SELECT column1, column2, ... FROM table_name ORDER BY columnX DESC&lt;br /&gt;SELECT column1, column2, ... FROM table_name ORDER BY columnX DESC, columnY ASC&lt;br /&gt;&lt;br /&gt;9. The IN operator may be used if you know the exact value you want to return for at least one of the columns.&lt;br /&gt;&lt;br /&gt;SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..)&lt;br /&gt;&lt;br /&gt;10. BETWEEN ... AND&lt;br /&gt;&lt;br /&gt;SELECT column_name FROM table_name WHERE column_name BETWEEN value1 AND value2 The values can be numbers, text, or dates.&lt;br /&gt;&lt;br /&gt;11. What is the use of CASCADE CONSTRAINTS?&lt;br /&gt;&lt;br /&gt;When this clause is used with the DROP command, a parent table can be dropped even when a child table exists.&lt;br /&gt;&lt;br /&gt;12. Why does the following command give a compilation error?&lt;br /&gt;&lt;br /&gt;DROP TABLE &amp;TABLE_NAME; Variable names should start with an alphabet. Here the table name starts with an '&amp;' symbol.&lt;br /&gt;&lt;br /&gt;18. What will be the output of the following query?&lt;br /&gt;SELECT REPLACE(TRANSLATE(LTRIM(RTRIM('!! ATHEN !!','!'), '!'), 'AN', '**'),'*','TROUBLE') FROM DUAL;?&lt;br /&gt;TROUBLETHETROUBLE. p&gt;&lt;br /&gt;&lt;br /&gt;19. What does the following query do?&lt;br /&gt;&lt;br /&gt;SELECT SAL + NVL(COMM,0) FROM EMP;?&lt;br /&gt;This displays the total salary of all employees. The null values in the commission column will be replaced by 0 and added to salary.&lt;br /&gt;&lt;br /&gt;20. What is the advantage of specifying WITH GRANT OPTION in the GRANT command?&lt;br /&gt;&lt;br /&gt;The privilege receiver can further grant the privileges he/she has obtained from the owner to any other user.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-4457377776527409728?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/4457377776527409728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=4457377776527409728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4457377776527409728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4457377776527409728'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/sql-interview-questions-2.html' title='SQL Interview Questions -2'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8221790226786285858</id><published>2008-07-24T08:54:00.000-07:00</published><updated>2008-07-24T08:57:34.995-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sql interview questions'/><title type='text'>SQl Job Interview Questions</title><content type='html'>&lt;a href=""&gt; SQL&lt;br /&gt;SQL is an English like language consisting of commands to store, retrieve, maintain &amp; regulate access to your database.&lt;br /&gt;&lt;br /&gt;SQL*Plus&lt;br /&gt;SQL*Plus is an application that recognizes &amp; executes SQL commands &amp; specialized SQL*Plus commands that can customize reports, provide help &amp; edit facility &amp; maintain system variables.&lt;br /&gt;&lt;br /&gt;NVL&lt;br /&gt;NVL : Null value function converts a null value to a non-null value for the purpose of evaluating an expression. Numeric Functions accept numeric I/P &amp; return numeric values. They are MOD, SQRT, ROUND, TRUNC &amp; POWER.&lt;br /&gt;&lt;br /&gt;Date Functions&lt;br /&gt;Date Functions are ADD_MONTHS, LAST_DAY, NEXT_DAY, MONTHS_BETWEEN &amp; SYSDATE.&lt;br /&gt;&lt;br /&gt;Character Functions&lt;br /&gt;Character Functions are INITCAP, UPPER, LOWER, SUBSTR &amp; LENGTH. Additional functions are GREATEST &amp; LEAST. Group Functions returns results based upon groups of rows rather than one result per row, use group functions. They are AVG, COUNT, MAX, MIN &amp; SUM.&lt;br /&gt;&lt;br /&gt;TTITLE &amp; BTITLE&lt;br /&gt;TTITLE &amp; BTITLE are commands to control report headings &amp; footers.&lt;br /&gt;&lt;br /&gt;COLUMN&lt;br /&gt;COLUMN command define column headings &amp; format data values.&lt;br /&gt;&lt;br /&gt;BREAK&lt;br /&gt;BREAK command clarify reports by suppressing repeated values, skipping lines &amp; allowing for controlled break points.&lt;br /&gt;&lt;br /&gt;COMPUTE&lt;br /&gt;command control computations on subsets created by the BREAK command.&lt;br /&gt;&lt;br /&gt;SET&lt;br /&gt;SET command changes the system variables affecting the report environment.&lt;br /&gt;&lt;br /&gt;SPOOL&lt;br /&gt;SPOOL command creates a print file of the report.&lt;br /&gt;&lt;br /&gt;JOIN&lt;br /&gt;JOIN is the form of SELECT command that combines info from two or more tables.&lt;br /&gt;Types of Joins are Simple (Equijoin &amp; Non-Equijoin), Outer &amp; Self join.&lt;br /&gt;Equijoin returns rows from two or more tables joined together based upon a equality condition in the WHERE clause.&lt;br /&gt;Non-Equijoin returns rows from two or more tables based upon a relationship other than the equality condition in the WHERE clause.&lt;br /&gt;Outer Join combines two or more tables returning those rows from one table that have no direct match in the other table.&lt;br /&gt;Self Join joins a table to itself as though it were two separate tables.&lt;br /&gt;&lt;br /&gt;Union&lt;br /&gt;Union is the product of two or more tables.&lt;br /&gt;&lt;br /&gt;Intersect&lt;br /&gt;Intersect is the product of two tables listing only the matching rows.&lt;br /&gt;&lt;br /&gt;Minus&lt;br /&gt;Minus is the product of two tables listing only the non-matching rows.&lt;br /&gt;&lt;br /&gt;Correlated Subquery&lt;br /&gt;Correlated Subquery is a subquery that is evaluated once for each row processed by the parent statement. Parent statement can be Select, Update or Delete. Use CRSQ to answer multipart questions whose answer depends on the value in each row processed by parent statement.&lt;br /&gt;&lt;br /&gt;Multiple columns&lt;br /&gt;Multiple columns can be returned from a Nested Subquery.&lt;br /&gt;&lt;br /&gt;Sequences&lt;br /&gt;Sequences are used for generating sequence numbers without any overhead of locking. Drawback is that after generating a sequence number if the transaction is rolled back, then that sequence number is lost.&lt;br /&gt;&lt;br /&gt;Synonyms&lt;br /&gt;Synonyms is the alias name for table, views, sequences &amp; procedures and are created for reasons of Security and Convenience.&lt;br /&gt;Two levels are Public - created by DBA &amp; accessible to all the users. Private - Accessible to creator only. Advantages are referencing without specifying the owner and Flexibility to customize a more meaningful naming convention.&lt;br /&gt;&lt;br /&gt;Indexes&lt;br /&gt;Indexes are optional structures associated with tables used to speed query execution and/or guarantee uniqueness. Create an index if there are frequent retrieval of fewer than 10-15% of the rows in a large table and columns are referenced frequently in the WHERE clause. Implied tradeoff is query speed vs. update speed. Oracle automatically update indexes. Concatenated index max. is 16 columns.&lt;br /&gt;&lt;br /&gt;Data types&lt;br /&gt;Max. columns in a table is 255. Max. Char size is 255, Long is 64K &amp; Number is 38 digits.&lt;br /&gt;Cannot Query on a long column.&lt;br /&gt;Char, Varchar2 Max. size is 2000 &amp; default is 1 byte.&lt;br /&gt;Number(p,s) p is precision range 1 to 38, s is scale -84 to 127.&lt;br /&gt;Long Character data of variable length upto 2GB.&lt;br /&gt;Date Range from Jan 4712 BC to Dec 4712 AD.&lt;br /&gt;Raw Stores Binary data (Graphics Image &amp; Digitized Sound). Max. is 255 bytes.&lt;br /&gt;Mslabel Binary format of an OS label. Used primarily with Trusted Oracle.&lt;br /&gt;&lt;br /&gt;Order of SQL statement execution&lt;br /&gt;Where clause, Group By clause, Having clause, Order By clause &amp; Select.&lt;br /&gt;&lt;br /&gt;Transaction&lt;br /&gt;Transaction is defined as all changes made to the database between successive commits.&lt;br /&gt;&lt;br /&gt;Commit&lt;br /&gt;Commit is an event that attempts to make data in the database identical to the data in the form. It involves writing or posting data to the database and committing data to the database. Forms check the validity of the data in fields and records during a commit. Validity check are uniqueness, consistency and db restrictions.&lt;br /&gt;&lt;br /&gt;Posting&lt;br /&gt;Posting is an event that writes Inserts, Updates &amp; Deletes in the forms to the database but not committing these transactions to the database.&lt;br /&gt;&lt;br /&gt;Rollback&lt;br /&gt;Rollback causes work in the current transaction to be undone.&lt;br /&gt;&lt;br /&gt;Savepoint&lt;br /&gt;Savepoint is a point within a particular transaction to which you may rollback without rolling back the entire transaction.&lt;br /&gt;&lt;br /&gt;Set Transaction&lt;br /&gt;Set Transaction is to establish properties for the current transaction.&lt;br /&gt;&lt;br /&gt;Locking&lt;br /&gt;Locking are mechanisms intended to prevent destructive interaction between users accessing data. Locks are used to achieve.&lt;br /&gt;&lt;br /&gt;Consistency&lt;br /&gt;Consistency : Assures users that the data they are changing or viewing is not changed until the are thro' with it.&lt;br /&gt;&lt;br /&gt;Integrity&lt;br /&gt;Assures database data and structures reflects all changes made to them in the correct sequence. Locks ensure data integrity and maximum concurrent access to data. Commit statement releases all locks. Types of locks are given below.&lt;br /&gt;Data Locks protects data i.e. Table or Row lock.&lt;br /&gt;Dictionary Locks protects the structure of database object i.e. ensures table's structure does not change for the duration of the transaction.&lt;br /&gt;Internal Locks &amp; Latches protects the internal database structures. They are automatic.&lt;br /&gt;Exclusive Lock allows queries on locked table but no other activity is allowed.&lt;br /&gt;Share Lock allows concurrent queries but prohibits updates to the locked tables.&lt;br /&gt;Row Share allows concurrent access to the locked table but prohibits for a exclusive table lock.&lt;br /&gt;Row Exclusive same as Row Share but prohibits locking in shared mode.&lt;br /&gt;Shared Row Exclusive locks the whole table and allows users to look at rows in the table but prohibit others from locking the table in share or updating them.&lt;br /&gt;Share Update are synonymous with Row Share.&lt;br /&gt;&lt;br /&gt;Deadlock&lt;br /&gt;Deadlock is a unique situation in a multi user system that causes two or more users to wait indefinitely for a locked resource. First user needs a resource locked by the second user and the second user needs a resource locked by the first user. To avoid dead locks, avoid using exclusive table lock and if using, use it in the same sequence and use Commit frequently to release locks.&lt;br /&gt;&lt;br /&gt;Mutating Table&lt;br /&gt;Mutating Table is a table that is currently being modified by an Insert, Update or Delete statement. Constraining Table is a table that a triggering statement might need to read either directly for a SQL statement or indirectly for a declarative Referential Integrity constraints. Pseudo Columns behaves like a column in a table but are not actually stored in the table. E.g. Currval, Nextval, Rowid, Rownum, Level etc.&lt;br /&gt;&lt;br /&gt;SQL*Loader&lt;br /&gt;SQL*Loader is a product for moving data in external files into tables in an Oracle database. To load data from external files into an Oracle database, two types of input must be provided to SQL*Loader : the data itself and the control file. The control file describes the data to be loaded. It describes the Names and format of the data files, Specifications for loading data and the Data to be loaded (optional). Invoking the loader sqlload username/password controlfilename .&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8221790226786285858?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8221790226786285858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8221790226786285858' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8221790226786285858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8221790226786285858'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/sql-job-interview-questions.html' title='SQl Job Interview Questions'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-2915213582925077669</id><published>2008-07-24T08:52:00.000-07:00</published><updated>2008-07-24T08:54:06.501-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Solutions to C programming questions</title><content type='html'>&lt;a href=""&gt;1 solution) gives compiler error because of post increment on an expression and it it valid only on variable&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2 solution) 9 9 56&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3 solution) ans1: x*=y+1;&lt;br /&gt;ans2:x*=++y,y--;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4 solution) emptystring or nthing&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5 solution) First call can take an integer as input whether or not you put any spaces/newlines/white space characters before it.&lt;br /&gt;But the second call expects at least one ' ' [ space ] character and then some/none white space characters and then an integer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6 solution) 16&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7 solution) 1111&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8 solution) prints the numbers in 2 rows each containing 10 elements with in between spaces&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9 solution) it won't because of overflow in the statement *a=*a+*b;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10 solution) 4 8&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11 solution) 987641&lt;br /&gt;&lt;br /&gt;12 solution) 2 1 2&lt;br /&gt;&lt;br /&gt;13 solution) unsigned/**/int/**/p;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;14 solution) 3 3 5 5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15 solution) output1:2 3&lt;br /&gt;output2:2 4&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;16 solution) 111&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;17 solution) 82&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;18 solution) segmentation fault&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;19 solution) 15&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;20 solution) (nil)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;21 solution) It prints the lower case letters present in the input&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;22 solution) 3 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;23 solution) 12&lt;br /&gt;concatinate(1,2)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;24 solution) *1 -&gt; replacing '&lt;' with '+' in the declaration of the loop #include&lt;br /&gt;int main(){&lt;br /&gt;int n = 42;&lt;br /&gt;for(int i = 0; i + n; i-- )&lt;br /&gt;printf("-");&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;* 2 -&gt; replacing n with i in the declaration of the loop&lt;br /&gt;#include&lt;br /&gt;int main(){&lt;br /&gt;int n = 42;&lt;br /&gt;for(int i = 0; i &lt;&gt; adding a '-' before i in the comparison in for loop&lt;br /&gt;#include&lt;br /&gt;int main(){&lt;br /&gt;int n = 42;&lt;br /&gt;for(int i = 0; -i &lt; href="http://placementsindia.blogspot.com/2007/10/c-programming-questions.html"&gt; &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-2915213582925077669?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/2915213582925077669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=2915213582925077669' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2915213582925077669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2915213582925077669'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/solutions-to-c-programming-questions.html' title='Solutions to C programming questions'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-4833468740860077535</id><published>2008-07-24T08:50:00.000-07:00</published><updated>2008-07-24T08:52:00.859-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Modified Array based QuickSort with respect to the Partition Strategy </title><content type='html'>&lt;a href=""&gt;Recall that the linked-list version of quicksort() puts all items whose keys are equal to the pivot's key into a third queue, which doesn't need to be sorted. This can save much time if there are many repeated keys.&lt;br /&gt;&lt;br /&gt;The array-based version of quicksort() does not treat items with equal keys specially, so those items are sorted in the recursive calls.&lt;br /&gt;&lt;br /&gt;Is it possible to modify array-based quicksort() so that the array is partitioned into three parts (keys less than pivot, keys equal to pivot, keys greater than pivot) while still being in-place? (The only memory you may use is the array plus a constant amount of additional memory.)&lt;br /&gt;&lt;br /&gt;Why or why not?&lt;br /&gt;&lt;br /&gt;Solution:In the first place,whatever I put here is only my approach to solve this problem and much better solution might exist.Now getting on to the solution..&lt;br /&gt;&lt;br /&gt;In linked list implementation,we simply modify the pointers so that we end up with 3 lists.One list L1 to contain all the keys less than pivot ,one L2 with keys equal to the pivot and the other L3 with keys greater than pivot.Hence what we require is only an additional head pointer which points to this list L3 containing all elements equal to the pivot.SO we do not require any significant additional memory !!&lt;br /&gt;&lt;br /&gt;But this is not the case with array implementation wherein we are confronted by difficulties arising from fixed size of array .If at all we want to maintain a list of keys equal to the pivot, then we need to maintain a separate array and also need to remove all those from the original array,which means a herder's task.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We will do it in much simpler way.Whenever,a duplicate entry of pivot is encountered by the left pointer,swap it with some element ,smaller than pivot and positioned to its left.Hence we move all the pivots encountered by the left pointer to the left extreme of the array. Similarly move all the pivots encountered by the right pointer to the right side of the array.&lt;br /&gt;Now we have all the elements equal to the pivot on either extreme ends of the array.&lt;br /&gt;In the middle,we have remaining 2 sub-arrays.Now the array looks like this&lt;br /&gt;L2-left L1 L3 L2-right&lt;br /&gt;Now get all these pivot elements in the left extreme (L2-left) to occupy the positions preceding L3 by swapping with those elements on the right portion of the first list L1.Similarly do swaps to get L2-right next to L2-Left by swapping its elements with those elements on the left portion of 3rd list L3.Now we have array in the form L1,L2,L3 where L2-left and L2-right are joined into one.&lt;br /&gt;&lt;br /&gt;Now we can recursively sort L2-left and L2-right.&lt;br /&gt;&lt;br /&gt;I am also putting the code of normal array based quicksort and this modified version ,so that once can verify it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int leftpivotcounter=0; //global variable&lt;br /&gt;int rightpivotcounter=0; //global variable&lt;br /&gt;// these 2 are the only additional space used to accomplish the task in modified quicksort.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void swap(int *a,int *b)&lt;br /&gt;{&lt;br /&gt;       int temp=*a;&lt;br /&gt;       *a=*b;&lt;br /&gt;       *b=temp;&lt;br /&gt;}&lt;br /&gt;void normal_quicksort(int *arr,int left,int right)&lt;br /&gt;{&lt;br /&gt;       if(left&gt;=right)&lt;br /&gt;               return;&lt;br /&gt;       else if(right-left==1)&lt;br /&gt;       {&lt;br /&gt;               if(arr[left]&gt;arr[right])&lt;br /&gt;                       swap(arr+left,arr+right);&lt;br /&gt;       }&lt;br /&gt;       else&lt;br /&gt;       {&lt;br /&gt;               swap(arr+(left+right)/2,arr+right);&lt;br /&gt;               int rpos=right,lpos=left;&lt;br /&gt;               int pivot=arr[right--];&lt;br /&gt;               while(left &lt;right)&lt;br /&gt;               {&lt;br /&gt;                       while(left &lt;rpos &amp;&amp;arr[left]&lt;=pivot  )&lt;br /&gt;                               left++;&lt;br /&gt;                       while(right&gt;=lpos &amp;&amp;arr[right]&gt;=pivot )&lt;br /&gt;                               right--;&lt;br /&gt;                       if(left &lt;=right  )&lt;br /&gt;                       {&lt;br /&gt;                               swap(arr+left,arr+right);&lt;br /&gt;                       }&lt;br /&gt;                       else if (left &gt; right )&lt;br /&gt;                       {&lt;br /&gt;&lt;br /&gt;                               swap(arr+right+1,arr+rpos);&lt;br /&gt;&lt;br /&gt;                               partition(arr,lpos,right);&lt;br /&gt;                               partition(arr,right+2,rpos);&lt;br /&gt;                               break;&lt;br /&gt;                       }&lt;br /&gt;&lt;br /&gt;               }&lt;br /&gt;       }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void modified_quicksort(int *arr,int left,int right)&lt;br /&gt;{&lt;br /&gt;       if(left&gt;=right)&lt;br /&gt;               return;&lt;br /&gt;       else if(right-left==1)&lt;br /&gt;       {&lt;br /&gt;               if(arr[left]&gt;arr[right])&lt;br /&gt;                       swap(arr+left,arr+right);&lt;br /&gt;       }&lt;br /&gt;       else&lt;br /&gt;       {&lt;br /&gt;               swap(arr+(left+right)/2,arr+right);&lt;br /&gt;               int rpos=right,lpos=left;&lt;br /&gt;               leftpivotcounter=lpos-1;&lt;br /&gt;               rightpivotcounter=rpos;&lt;br /&gt;               int pivot=arr[right--];&lt;br /&gt;               while(left &lt;right)&lt;br /&gt;               {&lt;br /&gt;                       while(left &lt;rpos &amp;&amp;arr[left]&lt;=pivot  )&lt;br /&gt;                       {&lt;br /&gt;                               if(arr[left]==pivot)&lt;br /&gt;                               {&lt;br /&gt;                                       leftpivotcounter++;&lt;br /&gt;                                       swap(arr+leftpivotcounter,arr+left);&lt;br /&gt;                               }&lt;br /&gt;                               left++;&lt;br /&gt;                       }&lt;br /&gt;                       while(right&gt;=lpos &amp;&amp;arr[right]&gt;=pivot )&lt;br /&gt;                       {&lt;br /&gt;                               if(arr[right]==pivot)&lt;br /&gt;                               {&lt;br /&gt;                                       rightpivotcounter--;&lt;br /&gt;                                       swap(arr+rightpivotcounter,arr+right);&lt;br /&gt;                               }&lt;br /&gt;                               right--;&lt;br /&gt;                       }&lt;br /&gt;                       if(left &lt;=right  )&lt;br /&gt;                       {&lt;br /&gt;                               swap(arr+left,arr+right);&lt;br /&gt;                       }&lt;br /&gt;                       else if (left &gt; right )&lt;br /&gt;                       {&lt;br /&gt; swap(arr+right+1,arr+rpos);&lt;br /&gt;                               for(int i=0;(i+lpos&lt;=leftpivotcounter) &amp;&amp;((2*i) &lt;right-lpos);i++)&lt;br /&gt;                               {&lt;br /&gt;                                       swap(arr+lpos+i,arr+right-i);&lt;br /&gt;                               }&lt;br /&gt;                               for(int i=0;(rpos-i-1&gt;=rightpivotcounter) &amp;&amp; (rpos &gt; right+3+2*i) ;i++)&lt;br /&gt;                               {&lt;br /&gt;                                       swap(arr+rpos-1-i,arr+right+2+i);&lt;br /&gt;                               }&lt;br /&gt;                               partition(arr,lpos,right-(leftpivotcounter-lpos+1));&lt;br /&gt;                               partition(arr,right+2+(rpos-rightpivotcounter),rpos);&lt;br /&gt;                               break;&lt;br /&gt;                       }&lt;br /&gt;&lt;br /&gt;               }&lt;br /&gt;       }&lt;br /&gt;}&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-4833468740860077535?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/4833468740860077535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=4833468740860077535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4833468740860077535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4833468740860077535'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/modified-array-based-quicksort-with.html' title='Modified Array based QuickSort with respect to the Partition Strategy '/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-6696689017363313296</id><published>2008-07-24T08:49:00.000-07:00</published><updated>2008-07-24T08:50:20.591-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Last Non Zero Digit of Factorial</title><content type='html'>&lt;a href=""&gt;Question Write a program that can compute the last non-zero digit of any factorial for ( 0 &lt;= N &lt;= 10000). For example, if your program is asked to compute the last nonzero digit of 5!, your program should produce 2 because 5! = 120, and 2 is the last nonzero digit of 120.&lt;br /&gt;&lt;br /&gt;Solution:Well if one has thoroughly gone through the post,&lt;br /&gt;the answer is easy to arrive at.Since the question asks only about the last non Zero digit,we need not bother about calculating the whole factorial and can just keep track of last nonzero digit by writing nonzerodigit(N)=nonzerodigit(N* nonzerodigit(N-1)).&lt;br /&gt;&lt;br /&gt;Here follows the last nonzero digits of first 5 numbers.&lt;br /&gt;N factorial Last Non Zero Digit&lt;br /&gt;&lt;br /&gt;1! 1&lt;br /&gt;2! nonzerodigit(2*1)=2&lt;br /&gt;3! nonzerodigit(3*2)=6&lt;br /&gt;4! nonzerodigit(4*6)=4&lt;br /&gt;5! nonzerodigit(4*5)=2!!!(one gets zero if only the last digit is tracked)&lt;br /&gt;&lt;br /&gt;So ,it should be clear the mere tracking of last digit is not enough but we need to track some K digits in each factorial.&lt;br /&gt;So we track the last K digits of factorial of each number and store them in a vector V.&lt;br /&gt;At the same time we want to have minimum K.&lt;br /&gt;A brief thought would suggest that we should track of that many no of digits such that for all numbers &lt;=1000 we should never encounter a 0 in V.&lt;br /&gt;&lt;br /&gt;This means K is 1+ maximum no of zeros one would encounter in N! for N&lt;=1000.&lt;br /&gt;&lt;br /&gt;In this particular case K is 1+5 (maximum no of zeros is 5 since 5^5=3125 and 5^6&gt;10000).&lt;br /&gt;&lt;br /&gt;So track the last 6 digits of each of the factorials.Thus we arrived at the solution!!&lt;br /&gt;&lt;br /&gt;Question If you have already solved the above problem, then give a generalized method to find the last X non-zero digits of N factorial&lt;br /&gt;&lt;br /&gt;Solution:This question is similar to the above one except that we need to track X-1 more digits of N! .&lt;br /&gt;so answer to this is X+No of zeros in N! factorial.&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-6696689017363313296?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/6696689017363313296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=6696689017363313296' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6696689017363313296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6696689017363313296'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/last-non-zero-digit-of-factorial.html' title='Last Non Zero Digit of Factorial'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-7979462048827559239</id><published>2008-07-24T08:48:00.000-07:00</published><updated>2008-07-24T08:49:09.076-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Quick Sort routine to find the kth smallest element in an array</title><content type='html'>&lt;a href=""&gt;Question Describe an efficient algorithm based on Quicksort that will find the element of a set that would be at position k if the elements were sorted.&lt;br /&gt;&lt;br /&gt;Solution:We make slight modifications to the quicksort routine to find the kth smallest element.Like in normal quicksort,we choose a pivot and partition the remaining array in to 2 sub arrays.At this stage,we have 3 possibilities.&lt;br /&gt;&lt;br /&gt;1)the size of the first sub array is k-1 ,in which case pivot itself is the kth smallest.&lt;br /&gt;2)the size of the first sub array is greater than k ,in which case kth smallest element is to be recursively searched in the first sub-array.&lt;br /&gt;&lt;br /&gt;3)the size of the first sub array is less than k-1 ,in which case reuired element is to be recursively searched in the second sub-array.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hence unlike quicksort where each problem gives rise to 2 subproblems,here each problem gives rise to only 1 sub problem.&lt;br /&gt;&lt;br /&gt;Pseudo Code:&lt;br /&gt;&lt;br /&gt;QuickSelect(Array A, n, k)&lt;br /&gt;pivot = A [Random(1, n)]&lt;br /&gt;X={x | x belongs to A and x &lt;=pivot}&lt;br /&gt;Y={x | x belongs to A and x &gt;=pivot}&lt;br /&gt;if size(X) = k&lt;br /&gt;return pivot;&lt;br /&gt;else if size(X) &lt; k&lt;br /&gt;return QuickSelect(Y,n-size(X)-1,k-size(X)-1);&lt;br /&gt;else&lt;br /&gt;return QuickSelect(X,size(X),k);&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-7979462048827559239?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/7979462048827559239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=7979462048827559239' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7979462048827559239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7979462048827559239'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/quick-sort-routine-to-find-kth-smallest.html' title='Quick Sort routine to find the kth smallest element in an array'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-5981936865206400888</id><published>2008-07-24T08:45:00.000-07:00</published><updated>2008-07-24T08:48:00.891-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Run time Analysis of QuickSort ,Nature of Input,Pivot strategies</title><content type='html'>&lt;a href=""&gt;Question Determine the running time of QuickSort for&lt;br /&gt;&lt;br /&gt;a.Sorted input&lt;br /&gt;b.reverse -ordered input&lt;br /&gt;c.random input&lt;br /&gt;d. When all the elements are equal&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:This solution is being written with the assumption that middle element of the array is chosen as the pivot.The answers differ based on the pivot selection as well.&lt;br /&gt;a.Sorted input&lt;br /&gt;In the case of sorted input,the left and right pointers of the sub arrays pass each other with out a single swap in all the iterations.The problem is divided in to 2 equal problems in all but the base case of unit size array.Hence the recurrence relation for this case is T(N)=2*T(N/2)+O(N).Hence the complexity in this case is O(NlogN).&lt;br /&gt;&lt;br /&gt;b.reverse-ordered input&lt;br /&gt;&lt;br /&gt;This case is identical to the previous case except that we have so many swaps in each iteration.The left and right pointers swap the content on each increment in their directions.This effects only the O(N) part of the recurrence relation that we have in the previous case.But as the swap is of complexity O(1), the complexity of each iteration remains the same.And the division of the array is still even.So the complexity doesn't change.Hence it is still O(NlogN)&lt;br /&gt;&lt;br /&gt;c.Random Input&lt;br /&gt;Well there are theorems asserting that the complexity of quicksort on a random input is O(NlogN).We will prove it by considering evenly the chances of even and worst splits.&lt;br /&gt;let's consider that good and bad splits alternate in the iterations, with good splits in the best case (N/2) and bad ones in the worst (N-1).&lt;br /&gt;So every two levels, the array's been cut in half,which means, it's still exponential reduction -- O(NlogN ).&lt;br /&gt;&lt;br /&gt;d. When all the elements are equal&lt;br /&gt;&lt;br /&gt;It is as good as the sorted array.So the complexity is O(NlogN).&lt;br /&gt;&lt;br /&gt;Question The ones who are familiar with QuickSort might also be well aware of the important phase of the algorithm-the pivot selection.Suppose we always choose the middle element as the pivot .Does this make it unlikely that QuickSort will require quadratic time?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:Choosing the middle element never makes it unlikey that the QuickSort will require quadratic time.One might encounter an input in which the middle element is always the maximum in all iterations.Then the complexity will be quadratic.&lt;br /&gt;&lt;br /&gt;example:a={1,3,2} choosing 3 as pivot produces 2 subproblems , one of size 0 and other of size 2.In the next iteration,with out loss of generality take 2 as the pivot.It produces a sub array of size 1 and another of size 0.Thus an input can always be generated in such a way that QuickSort routine always gives rise to 2 subarrays,one of them being of size 0.Hence quadratic time is not always avoidable.&lt;br /&gt;&lt;br /&gt;Question What is the worst-case behavior (number of comparisons) for quick sort?&lt;br /&gt;Solution:As we have seen in the previous question,because of a bad pivot selection we might at the worst run in to quadratic time complexity.&lt;br /&gt;&lt;br /&gt;Question In selecting the pivot for QuickSort, which is the best choice for optimal partitioning:&lt;br /&gt;a.The first element of the array&lt;br /&gt;b.The last element of the array&lt;br /&gt;c.The middle element of the array&lt;br /&gt;d.The largest element of the array&lt;br /&gt;e.The median of the array&lt;br /&gt;f.Any of the above&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:while the choices a,b,c will always not guarantee O(NlogN) complexity,choice d always gives quadratic run time.choice e guarantees even partition of the array.Hence it is the optimal partition.&lt;br /&gt;hence the sol is e.&lt;br /&gt;&lt;br /&gt;Question In its worst case QuickSort behaves like:&lt;br /&gt;a.Bubble sort&lt;br /&gt;b.Selection sort&lt;br /&gt;c.Insertion sort&lt;br /&gt;d.Bin sort&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:In the worst ,the pivot selected will always be the maximum element leading to quadratic time complexity.In this case as it depicts the behaviour of bubble sort,where in maximum element always bubbles to the end.&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-5981936865206400888?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/5981936865206400888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=5981936865206400888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5981936865206400888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5981936865206400888'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/run-time-analysis-of-quicksort-nature.html' title='Run time Analysis of QuickSort ,Nature of Input,Pivot strategies'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-2086670567718109044</id><published>2008-07-24T08:44:00.000-07:00</published><updated>2008-07-24T08:45:40.422-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Tree Arithmetic</title><content type='html'>&lt;a href=""&gt;1)If a tree has N nodes, then how many are the edges?&lt;br /&gt;&lt;br /&gt;Solution:Every node has a parent except the root.Each edge associates a node with its child.So the number of edges are N-1.&lt;br /&gt;&lt;br /&gt;2)Prove that there exists only a single path from each node to the root?&lt;br /&gt;Solution:If there are more than 1 paths from a node to the root,it means there are more than 1 parents for one of the ancestors of the node concerned, which is impossible in a tree.&lt;br /&gt;&lt;br /&gt;3)Prove that the depth of a tree is always equal to the height of the tree?&lt;br /&gt;&lt;br /&gt;Solution: Height of a tree is the height of the root.Depth of a tree is the depth of the deepest node, which is the number of edges from root to it.This should also be the node which defines the height of the root,otherwise we end up with a contradiction.&lt;br /&gt;&lt;br /&gt;4)The structure of a typical tree is to have in each node ,besides it data, a pointer to each of its children.But this might be infeasible if there aren’t fixed number of children at each node.So how do modify this data structure to accommodate variable no of children at each node?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:Well the answer to this is child sibling relationship.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5)What are the maximum and minimum depths of a binary search tree?&lt;br /&gt;&lt;br /&gt;Solution:In a binary tree of N nodes,the maximum depth is N-1 when it develops only on 1 side and the minimum is floor(log(N)).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6)How many are the no of null pointers for a binary tree of N nodes?&lt;br /&gt;&lt;br /&gt;Solution: Total no of pointer=2*N. And each edge is associated with 1 pointer.&lt;br /&gt;So the no of null pointer is 2*N-(N-1)=N+1 .&lt;br /&gt;&lt;br /&gt;7)Distinguish inorder , preorder and postorder traversals properly?&lt;br /&gt;Solution: Inorder traversal:Left subtree is first processed ,followed by root and then by right subtree.&lt;br /&gt;&lt;br /&gt;Preorder: root is first processed followed by left and right subtrees.There is no order defined between left and right children.Essentially left and right subtrees are traversed only after the root is traversed.&lt;br /&gt;&lt;br /&gt;Postorder:Left and right children are traversed before traversing root.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8)How is a binary tree different from binary search tree?&lt;br /&gt;&lt;br /&gt;Solution:In Binary search tree, all the elements in the left subtree are &lt;= root and all the elements in the right subtree are &gt;= root,which is not the case with all the binary trees.&lt;br /&gt;&lt;br /&gt;9)Recursive calls have always been employed in the case of trees because of their recursive structural property.But linked lists aren’t that different .But why recursion is not that advisable in the case of lists?(A little theoretical …. Think in terms of limited stack size of your machine)&lt;br /&gt;&lt;br /&gt;Solution:The depth of a well built tree of N nodes is log(N).So recursive calls are affordable most of the times as stack overflow is seldom possible.But if recursive calls are employed for lists, then the order of recursive call stack size is N which&lt;br /&gt;is not feasible for large N.&lt;br /&gt;&lt;br /&gt;10)What are the complexities of insertion,deletion on a binary search tree?&lt;br /&gt;&lt;br /&gt;Solution:Insertion in a well built binary search tree is O(logN) and so is the deletion.This is under assumption that depth of tree is O(logN).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11)Show that the maximum number of nodes in a binary tree of height H is 2^(H+1) -1&lt;br /&gt;&lt;br /&gt;Solution:In a binary tree of height H ,with maximum number of nodes,all the levels should be completely filled.At depth d, the number of nodes should be 2^d.&lt;br /&gt;Therefore, the total number of nodes =1+2+4+....+2^H=2^(H+1)-1.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-2086670567718109044?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/2086670567718109044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=2086670567718109044' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2086670567718109044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2086670567718109044'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/tree-arithmetic.html' title='Tree Arithmetic'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-2649791961640567540</id><published>2008-07-24T08:43:00.000-07:00</published><updated>2008-07-24T08:44:25.404-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Number of ways to express a number as summation of consecutive numbers</title><content type='html'>&lt;a href=""&gt;Question.All the positive numbers can be expressed as a sum of one, two or more consecutive positive integers. For example 9 can be expressed in three such ways, 2+3+4, 4+5 or 9. Given an integer ,you will have to determine in how many ways that number can be expressed as summation of consecutive numbers.&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;2+3+4=(1+2+3+4)-(1)&lt;br /&gt;=(1+2+3+4+5)-(1+2+3)&lt;br /&gt;=(1+2+3+4+5+6+7+8+9)-(1+2+3+4+5+6+7+8)&lt;br /&gt;&lt;br /&gt;This shows that the no of solutions to this problem is the no of tuples (n,m) such that&lt;br /&gt;given number K can be expressed as K=(1+2+..........+n)-(1+2+3+...........+m)&lt;br /&gt;and n &gt; m&lt;br /&gt;&lt;br /&gt;i.e K=n*(n+1)/2 -m*(m+1)/2&lt;br /&gt;=(n-m)(n+m+1)/2&lt;br /&gt;2*k=(n-m)*(n+m+1)&lt;br /&gt;If we put the factor n-m=p and (n+m+1)=q,we get S=2*k=p*q&lt;br /&gt;As p+q=2*n+1 is odd and S is even either n-m is odd otherwise n+m+1 is odd.&lt;br /&gt;This leaves out with finding out the no of odd divisors of S,which can be easily done using prime factorization.&lt;br /&gt;if S=(2^p)*(3^q)*(5^r)*(7^s)......&lt;br /&gt;&lt;br /&gt;then the solution is (q+1)*(r+1)*(s+1)*.. i.e the no of odd divisors of S.&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-2649791961640567540?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/2649791961640567540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=2649791961640567540' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2649791961640567540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2649791961640567540'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/number-of-ways-to-express-number-as.html' title='Number of ways to express a number as summation of consecutive numbers'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-7152761945152563384</id><published>2008-07-24T08:41:00.000-07:00</published><updated>2008-07-24T08:43:20.352-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Solutions to Logical Puzzles-2</title><content type='html'>&lt;a href=""&gt;)3&lt;br /&gt;It is of the form 0^2+2,1^2+2,3^2+2,6^2+2,10^2+2,.....&lt;br /&gt;The sequence of n is 0,1,3,6,10,... so the next n is 15 =&gt; 15^2+2&lt;br /&gt;&lt;br /&gt;2)2&lt;br /&gt;The function is S(n)=S(n-1)*(n+2) + 3 ,n&gt;1&lt;br /&gt;=6 ,n=1&lt;br /&gt;&lt;br /&gt;3)1&lt;br /&gt;It is of the form S(n)*3+2 for even and S(n)*2-3 for odd where S(n) is the nth element.&lt;br /&gt;So 7th element = 239*2-3=475&lt;br /&gt;&lt;br /&gt;4)2&lt;br /&gt;The function is S(n)=(n+2)^3 -2&lt;br /&gt;&lt;br /&gt;5)1&lt;br /&gt;The numbers in the sequence is a combination of n^2 and n^3 and n is odd.&lt;br /&gt;&lt;br /&gt;6)2&lt;br /&gt;The function is S(n)=S(n-1)*n-n n&gt;1&lt;br /&gt;=3 n=1&lt;br /&gt;&lt;br /&gt;7)&lt;br /&gt;&lt;br /&gt;8)1&lt;br /&gt;The function is S(n)=(S(n-1)-1)*(n-1) n&gt;1&lt;br /&gt;=8 n=1&lt;br /&gt;&lt;br /&gt;9)&lt;br /&gt;&lt;br /&gt;10)&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-7152761945152563384?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/7152761945152563384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=7152761945152563384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7152761945152563384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7152761945152563384'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/solutions-to-logical-puzzles-2.html' title='Solutions to Logical Puzzles-2'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-5738301365989608949</id><published>2008-07-24T08:38:00.000-07:00</published><updated>2008-07-24T08:41:46.328-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Combinations</title><content type='html'>&lt;a href=""&gt;Question:Computing the exact number of ways that N things can be taken M at a time can be a great challenge when N and/or M become very large.So given 5&lt;=N&lt;=100 5&lt;=M&lt;=100 and M&lt;=N.Compute the EXACT value of: N!/(M!*(N-M)!) The final value of C will fit in a 32-bit Pascal LongInt or a C long. So deduce an approach based on this assumption given.&lt;br /&gt;&lt;br /&gt;Solution:At a mere glance,this problem may seem to have a direct solution,though it isn't upon a long thought.The naive approach to calculate combination of N things taken M at a time is obtained by mere application of formula,which mean finding N! ,M! and (N-M)! and the putting them in the expression.But as N and M are independently large enough for overflows to occur in N! and M! calculations.&lt;br /&gt;One of the approaches to solve this problem,based on prime factorization can be formulated in the following manner.&lt;br /&gt;&lt;br /&gt;Consider a prime P whose exponents in N!,M! and (N-M)! are p1,p2 and p3 respectively.&lt;br /&gt;&lt;br /&gt;therefore the exponent of P in N!/M!*(N-M)! is p1+p2-p3.&lt;br /&gt;&lt;br /&gt;This way we can store the exponents of all primes &lt;= the largest prime which divides N.&lt;br /&gt;&lt;br /&gt;One this is done ,we can merely multiply all these primes each raised to its exponent to get the required answer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now getting on to the tricky part of finding the exponent of a prime P in N!&lt;br /&gt;&lt;br /&gt;In general ,if P is any prime,then the no of P's in N! is given by&lt;br /&gt;Sum (floor(n/P^i)) for P^i &lt;= N This apparently weird formula can be explained with ease!! consider the numbers 1,2,3,.........,,N.Every Pth number is divisible by P.So all those multiples of P put together contribute floor(N/P) to the power of P. Similarly every P^2th number is divisible by P^2.And each of them have already contributed 1 to power of P in previous iteration,as each of them are divisible by P.So each of them contribute an additional 1, which means they all together contribute floor(N/P^2) to the already sum. These terms of contribution go on till we have P^i &lt;= N,hence the summation Sum (floor(N/P^i)) for P^i &lt;= N The Cpp implementation of above task is given below&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;iostream&gt;&lt;br /&gt;using namespace std;&lt;br /&gt;#include&lt;cmath&gt;&lt;br /&gt;#include&lt;cstdlib&gt;&lt;br /&gt;#include&lt;cstdio&gt;&lt;br /&gt;#include&lt;vector&gt;&lt;br /&gt;typedef vector&lt;int&gt; powers;&lt;br /&gt;void insert(vector&lt;powers&gt; &amp;P,int i,vector&lt;int&gt; V,int size)&lt;br /&gt;{&lt;br /&gt;       vector&lt;int&gt; temp=P[i-1];&lt;br /&gt;        //calculation of exponent of each prime&lt;br /&gt;       for(int j=0;j &lt;size &amp;&amp; i!=1;j++)&lt;br /&gt;       {&lt;br /&gt;               while(i%V[j]==0)&lt;br /&gt;               {&lt;br /&gt;                       temp[j]++;&lt;br /&gt;                       i/=V[j];&lt;br /&gt;               }&lt;br /&gt;       }&lt;br /&gt;       P.push_back(temp);&lt;br /&gt;}&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;       vector&lt;int&gt; V;&lt;br /&gt;       vector&lt;powers&gt; P;&lt;br /&gt;       V.push_back(2);&lt;br /&gt;       bool flag;&lt;br /&gt;       int N,R;&lt;br /&gt;       for(int i=3;i&lt;100;i+=2)&lt;br /&gt;       {&lt;br /&gt;               flag=true;&lt;br /&gt;               for(int j=0;V[j]*V[j] &lt;=i;j++)&lt;br /&gt;               {&lt;br /&gt;                       if(i%V[j]==0)&lt;br /&gt;                       {&lt;br /&gt;                               flag=false;&lt;br /&gt;                               break;&lt;br /&gt;                       }&lt;br /&gt;               }&lt;br /&gt;               if(flag)&lt;br /&gt;               {&lt;br /&gt;                       V.push_back(i);&lt;br /&gt;               }&lt;br /&gt;       }&lt;br /&gt;       int size=V.size();&lt;br /&gt;       vector&lt;int&gt; temp(size,0);&lt;br /&gt;       P.push_back(temp);&lt;br /&gt;       P.push_back(temp);&lt;br /&gt;       for(int i=2;i&lt;=100;i++)&lt;br /&gt;       {&lt;br /&gt;               insert(P,i,V,size);&lt;br /&gt;       }&lt;br /&gt;       while(cin &gt;&gt; N &gt;&gt;R)&lt;br /&gt;       {&lt;br /&gt;               if(N==0 &amp;&amp; R==0)&lt;br /&gt;               {&lt;br /&gt;                       return(0);&lt;br /&gt;               }&lt;br /&gt;               else&lt;br /&gt;               {&lt;br /&gt;                       long sol=1;&lt;br /&gt;                       for(int i=0;i&lt;size;i++)&lt;br /&gt;                       {&lt;br /&gt;&lt;br /&gt;               sol*=(long)pow((double)V[i],P[N][i]-P[R][i]&lt;br /&gt;                    -P[N-R][i]); //Pi^(p1-p2-p3)&lt;br /&gt;                       }&lt;br /&gt;                       cout&lt;&lt;N&lt;&lt;" things taken &lt;br /&gt;                       "&lt;&lt;R&lt;&lt;" at a time is &lt;br /&gt;                       "&lt;&lt;sol&lt;&lt;" exactly."&lt;&lt;'\n';&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;               }&lt;br /&gt;&lt;br /&gt;       }&lt;br /&gt;       return(0);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-5738301365989608949?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/5738301365989608949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=5738301365989608949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5738301365989608949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5738301365989608949'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/combinations.html' title='Combinations'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-6742019346593143382</id><published>2008-07-24T08:37:00.000-07:00</published><updated>2008-07-24T08:38:36.505-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Solutions to Basic C Interview Questions</title><content type='html'>&lt;a href=""&gt;Click here for the questions&gt;&lt;br /&gt;&lt;br /&gt;1)To check for it, create two pointers,and set each to the start of the list. Update each as follows:&lt;br /&gt;&lt;br /&gt;while (pointer1) {&lt;br /&gt;pointer1 = pointer1-&gt;next;&lt;br /&gt;pointer2 = pointer2-&gt;next;&lt;br /&gt;if (pointer2) pointer2=pointer2-&gt;next;&lt;br /&gt;if (pointer1 == pointer2) {&lt;br /&gt;print ("circular linked list\n");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;2)Union x : 1101791232 21.500000&lt;br /&gt;Union y : 100 d 0.000000&lt;br /&gt;&lt;br /&gt;3)It is an object of some class whose purpose is to indicate that a real object of that class does not exist. One common use for a null object is a return value from a member function that is supposed to return an object with some specified properties but cannot find such an object.&lt;br /&gt;&lt;br /&gt;4) Java,Smalltalk,Eiffel,Sather.&lt;br /&gt;&lt;br /&gt;5)A container class is a class that is used to hold objects in memory or&lt;br /&gt;external storage. A container class acts as a generic holder. A&lt;br /&gt;container class has a predefined behavior and a well-known interface. A&lt;br /&gt;container class is a supporting class whose purpose is to hide the&lt;br /&gt;topology used for maintaining the list of objects in memory. When a&lt;br /&gt;container class contains a group of mixed objects, the container is&lt;br /&gt;called a heterogeneous container; when the container is holding a group&lt;br /&gt;of objects that are all the same, the container is called a homogeneous&lt;br /&gt;container.&lt;br /&gt;&lt;br /&gt;6)fffffff0&lt;br /&gt;&lt;br /&gt;7)C was the C++ predecessor. As it's name implies, a lot of C remains in C++. Although not actually being more powerful than C, C++ allows the programmer to more easily manage and operate with Objects, using an OOP (Object Oriented Programming) concept.&lt;br /&gt;&lt;br /&gt;C++ allows the programmer to create classes, which are somewhat similar to C structures. However, to a class can be assigned methods, functions associated to it, of various prototypes, which can access and operate within the class, somewhat like C functions often operate on a supplied handler pointer.&lt;br /&gt;&lt;br /&gt;Although it is possible to implement anything which C++ could implement in C, C++ aids to standarize a way in which objects are created and managed, whereas the C programmer who implements the same system has a lot of liberty on how to actually implement the internals, and style among programmers will vary a lot on the design choices made.&lt;br /&gt;&lt;br /&gt;In C, some will prefer the handler-type, where a main function initializes a handler, and that handler can be supplied to other functions of the library as an object to operate on/through. Others will even want to have that handler link all the related function pointers within it which then must be called using a convention closer to C++.&lt;br /&gt;&lt;br /&gt;To finish this discussion, C++ applications are generally slower at runtime, and are much slower to compile than C programs. The low-level infrastructure for C++ binary execution is also larger. For these reasons C is always commonly used even if C++ has alot of popularity, and will probably continue to be used in projects where size and speed are primary concerns, and portable code still required (assembly would be unsuitable then).&lt;br /&gt;&lt;br /&gt;8)Incomplete types&lt;br /&gt;refers to pointers in which there is non availability of the&lt;br /&gt;implementation of the referenced location or it points to some location&lt;br /&gt;whose value is not available for modification.&lt;br /&gt;&lt;br /&gt;int *i=0x400 // i points to address 400&lt;br /&gt;*i=0; //set the value of memory location pointed by i.&lt;br /&gt;&lt;br /&gt;9)Printf : Call by value&lt;br /&gt;Scanf : Call by reference&lt;br /&gt;&lt;br /&gt;10)a const pointer means the pointer which represents the address of one value. so if you declare a pointer inside the function, it doesn't have scope outside the function. if it is also available to the outside function whenever we declare a pointer as const.&lt;br /&gt;&lt;br /&gt;11)Type casting must be done wheneever the data type of the variable to which u r gonna assign some values is diff from the data type of the variable on the right side.&lt;br /&gt;&lt;br /&gt;for instance;&lt;br /&gt;&lt;br /&gt;float f;&lt;br /&gt;int i = 10 , j = 5 ;&lt;br /&gt;&lt;br /&gt;f = (float) ( i / j ) ;&lt;br /&gt;&lt;br /&gt;f -------&gt; left side variable.&lt;br /&gt;i -------&gt; right side variable.&lt;br /&gt;&lt;br /&gt;but always make sure that the size of the var on the left is greater than that of the right. else there will be data loss.&lt;br /&gt;&lt;br /&gt;A type cast should not be used to override a const or volatile declaration. Overriding these type modifiers can cause the program to fail to run correctly.&lt;br /&gt;A type cast should not be used to turn a pointer to one type of structure or data type into another. In the&lt;br /&gt;rare events in which this action is beneficial, using a union to hold the values makes the programmer.s&lt;br /&gt;intentions clearer.&lt;br /&gt;&lt;br /&gt;12)he answer is the standard library function qsort(). It.s the easiest sort by far for several reasons:&lt;br /&gt;It is already written.&lt;br /&gt;It is already debugged.&lt;br /&gt;It has been optimized as much as possible (usually).&lt;br /&gt;Void qsort(void *buf, size_t num, size_t size, int (*comp)(const void *ele1, const void *ele2));&lt;br /&gt;&lt;br /&gt;13)The answer depends on what you mean by quickest. For most sorting problems, it just doesn't matter how quick the sort is because it is done infrequently or other operations take significantly more time anyway. Even in cases in which sorting speed is of the essence, there is no one answer. It depends on not only the size and nature of the data, but also the likely order. No algorithm is best in all cases.&lt;br /&gt;There are three sorting methods in this author.s .toolbox. that are all very fast and that are useful in different situations. Those methods are quick sort, merge sort, and radix sort.&lt;br /&gt;&lt;br /&gt;The Quick Sort&lt;br /&gt;The quick sort algorithm is of the .divide and conquer. type. That means it works by reducing a sorting&lt;br /&gt;problem into several easier sorting problems and solving each of them. A .dividing. value is chosen from the input data, and the data is partitioned into three sets: elements that belong before the dividing value, the value itself, and elements that come after the dividing value. The partitioning is performed by exchanging elements that are in the first set but belong in the third with elements that are in the third set but belong in the first Elements that are equal to the dividing element can be put in any of the three sets.the algorithm will still work properly.&lt;br /&gt;&lt;br /&gt;The Merge Sort&lt;br /&gt;The merge sort is a .divide and conquer. sort as well. It works by considering the data to be sorted as a&lt;br /&gt;sequence of already-sorted lists (in the worst case, each list is one element long). Adjacent sorted lists are merged into larger sorted lists until there is a single sorted list containing all the elements. The merge sort is good at sorting lists and other data structures that are not in arrays, and it can be used to sort things that don.t fit into memory. It also can be implemented as a stable sort.&lt;br /&gt;&lt;br /&gt;The Radix Sort&lt;br /&gt;The radix sort takes a list of integers and puts each element on a smaller list, depending on the value of its least significant byte. Then the small lists are concatenated, and the process is repeated for each more significant byte until the list is sorted. The radix sort is simpler to implement on fixed-length data such as ints.&lt;br /&gt;&lt;br /&gt;14)Both the merge sort and the radix sort are good sorting algorithms to use for linked lists.&lt;br /&gt;&lt;br /&gt;15)The preprocessor is used to modify your program according to the preprocessor directives in your source code. Preprocessor directives (such as #define) give the preprocessor specific instructions on how to modify your source code. The preprocessor reads in all of your include files and the source code you are compiling and creates a preprocessed version of your source code. This preprocessed version has all of its macros and constant symbols replaced by their corresponding code and value assignments. If your source code contains any conditional preprocessor directives (such as #if), the preprocessor evaluates the condition and modifies your source code accordingly.&lt;br /&gt;The C preprocessor is used to modify your program according to the preprocessor directives in your source code. A preprocessor directive is a statement (such as #define) that gives the preprocessor specific instructions on how to modify your source code. The preprocessor is invoked as the first part of your compiler program.s compilation step. It is usually hidden from the programmer because it is run automatically by the compiler.&lt;br /&gt;&lt;br /&gt;16)The standard C library provides several functions for converting strings to numbers of all formats (integers, longs, floats, and so on) and vice versa.&lt;br /&gt;&lt;br /&gt;The following functions can be used to convert strings to numbers:&lt;br /&gt;Function Name Purpose&lt;br /&gt;atof() Converts a string to a double-precision floating-point value.&lt;br /&gt;atoi() Converts a string to an integer.&lt;br /&gt;atol() Converts a string to a long integer.&lt;br /&gt;strtod() Converts a string to a double-precision floating-point value and reports any .leftover. numbers that could not be converted.&lt;br /&gt;strtol() Converts a string to a long integer and reports any .leftover. numbers that could not be converted.&lt;br /&gt;strtoul() Converts a string to an unsigned long integer and reports any .leftover. numbers that could not be converted.&lt;br /&gt;&lt;br /&gt;17)&lt;br /&gt;The standard C library provides several functions for converting numbers of all formats (integers, longs, floats, and so on) to strings and vice versa&lt;br /&gt;&lt;br /&gt;The following functions can be used to convert integers to strings:&lt;br /&gt;Function Name Purpose&lt;br /&gt;itoa() Converts an integer value to a string.&lt;br /&gt;ltoa() Converts a long integer value to a string.&lt;br /&gt;ultoa() Converts an unsigned long integer value to a string.&lt;br /&gt;&lt;br /&gt;The following functions can be used to convert floating-point values to strings:&lt;br /&gt;Function Name Purpose&lt;br /&gt;ecvt() Converts a double-precision floating-point value to a string without an embedded decimal point.&lt;br /&gt;fcvt() Same as ecvt(), but forces the precision to a specified number of digits.&lt;br /&gt;gcvt() Converts a double-precision floating-point value to a string with an embedded decimal point.&lt;br /&gt;&lt;br /&gt;18)The heap is where malloc(), calloc(), and realloc() get memory.&lt;br /&gt;Getting memory from the heap is much slower than getting it from the stack. On the other hand, the heap&lt;br /&gt;is much more flexible than the stack. Memory can be allocated at any time and deallocated in any order. Such&lt;br /&gt;memory isn't deallocated automatically; you have to call free().&lt;br /&gt;Recursive data structures are almost always implemented with memory from the heap. Strings often come&lt;br /&gt;from there too, especially strings that could be very long at runtime. If you can keep data in a local variable (and allocate it from the stack), your code will run faster than if you put the data on the heap. Sometimes you can use a better algorithm if you use the heap.faster, or more robust, or more flexible. It's a tradeoff.&lt;br /&gt;If memory is allocated from the heap, it.s available until the program ends. That's great if you remember to deallocate it when you.re done.&lt;br /&gt;&lt;br /&gt;19)n++ takes more than one instruction, ++n is faster. n++ has to store n, increment the variable and return n, while ++n increment n and return without storing the previous value of n.&lt;br /&gt;&lt;br /&gt;20) If a program is large, it is subdivided into a number of smaller programs that are called modules or subprograms. If a complex problem is solved using more modules, this approach is known as modular programming.&lt;br /&gt;&lt;br /&gt;21)expression if (a=0) always return false&lt;br /&gt;expression if (a=1) always return true&lt;br /&gt;&lt;br /&gt;22)Malloc is dynamic memory allocation,it allocates the memory and initialize garbage value.Calloc is similar to malloc but only difference is initialize zero&lt;br /&gt;&lt;br /&gt;23)A middle level language&lt;br /&gt;&lt;br /&gt;24)Overloading is polymorphism which is one of the characteristics of Object oriented programming. C is not and object oriented language like C++ or Java. Therefore, no overloading, inheritance, etc.&lt;br /&gt;&lt;br /&gt;25)Static int variable are accessed only inside the file where it is defined. Thus we can have same variable name in 2 files if the variable is defined as static. The scope of the variable is limited to the file in which it is defined.&lt;br /&gt;&lt;br /&gt;On the other hand if the variable is not defined as static and defined globally then it can be accessed across the files. To access the variable which is global variable and declared and defined in file A, keyword "extern" is used in front of the variable in file B. This indicated to compiler while compiling that the variable is defined in some other file other than B and continues compiling and while linking the variable it search for the actual definition and links.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-6742019346593143382?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/6742019346593143382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=6742019346593143382' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6742019346593143382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6742019346593143382'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/solutions-to-basic-c-interview.html' title='Solutions to Basic C Interview Questions'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8351180224133831962</id><published>2008-07-24T08:34:00.000-07:00</published><updated>2008-07-24T08:37:03.828-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Solutions to Logical Puzzles-1</title><content type='html'>&lt;a href=""&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;We need 3 cuts to cut a cube into 6 equal pieces,with one cut in each dimension.Maximum identical pieces obtained with n cuts[if n is a factor of 3] = (n/3 + 1)^3, with n/3 cuts, we form n/3 + 1 equal pieces.If we need to get maximum number of identical cubes with some number of cuts then the number of cuts in all the dimensions should be equal if possible or almost equal.&lt;br /&gt;The number of identical pieces formed with l,n,m cuts in the 3 demensions are (l+1)*(n+1)*(m+1).&lt;br /&gt;&lt;br /&gt;1)3,Here there are 6,7,8 cuts in each dimension&lt;br /&gt;&lt;br /&gt;2)2&lt;br /&gt;&lt;br /&gt;3)4,Here the number of cuts are 7,7,6 in the 3 dimensions.&lt;br /&gt;&lt;br /&gt;4)1&lt;br /&gt;&lt;br /&gt;5)3&lt;br /&gt;&lt;br /&gt;All the problems from 6-18 are based mostly on imagination.Note that 27 identical pieces have no color at all i.e they are inner pieces.&lt;br /&gt;&lt;br /&gt;6)3&lt;br /&gt;&lt;br /&gt;7)4&lt;br /&gt;&lt;br /&gt;8)1&lt;br /&gt;&lt;br /&gt;9)3&lt;br /&gt;&lt;br /&gt;10)2&lt;br /&gt;&lt;br /&gt;11)2&lt;br /&gt;&lt;br /&gt;12)4&lt;br /&gt;&lt;br /&gt;13)1&lt;br /&gt;&lt;br /&gt;14)4&lt;br /&gt;&lt;br /&gt;15)3&lt;br /&gt;&lt;br /&gt;16)1&lt;br /&gt;&lt;br /&gt;17)4&lt;br /&gt;&lt;br /&gt;18)1&lt;br /&gt;&lt;br /&gt;19)2&lt;br /&gt;&lt;br /&gt;20)4&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8351180224133831962?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8351180224133831962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8351180224133831962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8351180224133831962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8351180224133831962'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/solutions-to-logical-puzzles-1.html' title='Solutions to Logical Puzzles-1'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-140920584337414223</id><published>2008-07-24T08:33:00.000-07:00</published><updated>2008-07-24T08:34:53.550-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Solutions to Logical Puzzles-3</title><content type='html'>&lt;a href=""&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;1)&lt;br /&gt;&lt;br /&gt;2)3,&lt;br /&gt;The number obtained by dividing 48 with 4 is 12 which is even while all the others get odd number for the same.&lt;br /&gt;&lt;br /&gt;3)4,&lt;br /&gt;The sequence has to be AON,EWR,IEV,MMZ&lt;br /&gt;&lt;br /&gt;4)2&lt;br /&gt;The remaining 3 are input devices.&lt;br /&gt;&lt;br /&gt;5)2&lt;br /&gt;The remaining 3 represent an image.&lt;br /&gt;&lt;br /&gt;6)3&lt;br /&gt;Trousers can only take a plural form while others can also take a singular form.&lt;br /&gt;&lt;br /&gt;7)&lt;br /&gt;&lt;br /&gt;8)&lt;br /&gt;&lt;br /&gt;9)4&lt;br /&gt;All the other three lie inside a cell.&lt;br /&gt;&lt;br /&gt;10)&lt;br /&gt;&lt;br /&gt;11)4&lt;br /&gt;&lt;br /&gt;12)3&lt;br /&gt;&lt;br /&gt;13)1&lt;br /&gt;&lt;br /&gt;14)2&lt;br /&gt;&lt;br /&gt;15)3&lt;br /&gt;&lt;br /&gt;16)3&lt;br /&gt;&lt;br /&gt;17)1&lt;br /&gt;&lt;br /&gt;18)3&lt;br /&gt;&lt;br /&gt;19)3&lt;br /&gt;&lt;br /&gt;20)4&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-140920584337414223?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/140920584337414223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=140920584337414223' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/140920584337414223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/140920584337414223'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/solutions-to-logical-puzzles-3.html' title='Solutions to Logical Puzzles-3'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-3524071894583147641</id><published>2008-07-24T08:23:00.000-07:00</published><updated>2008-07-24T08:25:06.121-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>C program to find the height of a binary search tree</title><content type='html'>&lt;a href=""&gt;Question:Write a C program to find the depth or height of a binary tree&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;struct binarysearchtree&lt;br /&gt;{&lt;br /&gt;       int data;&lt;br /&gt;       struct binarysearchtree* left;&lt;br /&gt;       struct binarysearchtree* right;&lt;br /&gt;};&lt;br /&gt;typedef struct binarysearchtree* tree;&lt;br /&gt;&lt;br /&gt;int max(int a,int b)&lt;br /&gt;{&lt;br /&gt;       if(a &gt;=b)&lt;br /&gt;               return a;&lt;br /&gt;       else&lt;br /&gt;               return b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int height(tree T)&lt;br /&gt;{&lt;br /&gt;  if(T==NULL)&lt;br /&gt;       return 0;&lt;br /&gt;  else&lt;br /&gt;  {&lt;br /&gt;       int h1=height(T-&gt;left);&lt;br /&gt;       int h2=height(T-&gt;right);&lt;br /&gt;       return 1+max(h1,h2);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-3524071894583147641?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/3524071894583147641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=3524071894583147641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3524071894583147641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3524071894583147641'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/c-program-to-find-height-of-binary.html' title='C program to find the height of a binary search tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-1691777482703345553</id><published>2008-07-24T08:21:00.000-07:00</published><updated>2008-07-24T08:23:09.381-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>C program to determine the number of nodes in a binary tree</title><content type='html'>&lt;a href=""&gt;Question:Write a C program to determine the number of elements(or size) in a binary tree?&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;struct binarysearchtree&lt;br /&gt;{&lt;br /&gt;      int data;&lt;br /&gt;      struct binarysearchtree* left;&lt;br /&gt;      struct binarysearchtree* right;&lt;br /&gt;};&lt;br /&gt;typedef struct binarysearchtree* tree;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int tree_size(tree  T)&lt;br /&gt;{&lt;br /&gt;  if(T==NULL)&lt;br /&gt;     return 0;&lt;br /&gt;  else&lt;br /&gt;  {&lt;br /&gt;     return 1+tree_size(T-&gt;left)+tree_size(T-&gt;right);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-1691777482703345553?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/1691777482703345553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=1691777482703345553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1691777482703345553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1691777482703345553'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/c-program-to-determine-number-of-nodes.html' title='C program to determine the number of nodes in a binary tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-6363705548902699169</id><published>2008-07-24T08:19:00.000-07:00</published><updated>2008-07-24T08:21:40.275-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>C program to delete a tree</title><content type='html'>Write a C program to delete a tree(i.e, free up its nodes)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;struct binarysearchtree&lt;br /&gt;{&lt;br /&gt;      int data;&lt;br /&gt;      struct binarysearchtree* left;&lt;br /&gt;      struct binarysearchtree* right;&lt;br /&gt;};&lt;br /&gt;typedef struct binarysearchtree* tree;&lt;br /&gt;&lt;br /&gt;void tree_free(tree T)&lt;br /&gt;{&lt;br /&gt;  if (T==NULL)&lt;br /&gt;     return;&lt;br /&gt;  else&lt;br /&gt;  {&lt;br /&gt;      tree_free(T-&gt;left);&lt;br /&gt;      tree_free(T-&gt;right);&lt;br /&gt;      free(T);&lt;br /&gt;  }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-6363705548902699169?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/6363705548902699169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=6363705548902699169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6363705548902699169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6363705548902699169'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/c-program-to-delete-tree.html' title='C program to delete a tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-3366721983079617662</id><published>2008-07-24T08:18:00.000-07:00</published><updated>2008-07-24T08:19:51.086-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Minimum Value of a Binary Search Tree</title><content type='html'>Question:Write a C program to find the minimum value in a binary search tree.&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;struct binarysearchtree&lt;br /&gt;{&lt;br /&gt;       int data;&lt;br /&gt;       struct binarysearchtree* left;&lt;br /&gt;       struct binarysearchtree* right;&lt;br /&gt;};&lt;br /&gt;typedef struct binarysearchtree* tree;&lt;br /&gt;&lt;br /&gt;tree min(tree T)&lt;br /&gt;{&lt;br /&gt; if (T==NULL)&lt;br /&gt;    return NULL;&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt;    if(T-&gt;left==NULL)&lt;br /&gt;        return T;&lt;br /&gt;    else&lt;br /&gt;      return min(T-&gt;left);&lt;br /&gt; }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-3366721983079617662?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/3366721983079617662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=3366721983079617662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3366721983079617662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/3366721983079617662'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/minimum-value-of-binary-search-tree.html' title='Minimum Value of a Binary Search Tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-1887724755001292602</id><published>2008-07-24T08:15:00.000-07:00</published><updated>2008-07-24T08:18:02.376-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Solutions to Questions on recursion</title><content type='html'>&lt;a href=""&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1)&lt;br /&gt;int Fibinocci(int n)&lt;br /&gt;{&lt;br /&gt;   if(n==1)&lt;br /&gt;       return 1;&lt;br /&gt;   else&lt;br /&gt;       n+Fibinocci(n-1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;2)&lt;br /&gt;void reverse(char*str)&lt;br /&gt;{&lt;br /&gt;   if(*str != '\0')&lt;br /&gt;               reverse(str+1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;3)&lt;br /&gt;int Factorial(int n)&lt;br /&gt;{&lt;br /&gt;   if(n==1)&lt;br /&gt;        return 1;&lt;br /&gt;   else&lt;br /&gt;       return(n*Factorial(n-1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;4)&lt;br /&gt;void MoveTower(int disk, int source, int dest, int spare):&lt;br /&gt;{&lt;br /&gt;   if(disk == 1)&lt;br /&gt;       printf("Move top disc from %d to %d\n",source,desc);&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;       MoveTower(disk - 1, source, spare, dest); &lt;br /&gt;       printf("Move top disc from %d to %d\n",source,desc);            &lt;br /&gt;                   // Step 2&lt;br /&gt;       MoveTower(disk - 1, spare, dest, source);&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;5)&lt;br /&gt;int gcd(int a,int b)&lt;br /&gt;{&lt;br /&gt;   if(b==0)&lt;br /&gt;       return(a);&lt;br /&gt;   else&lt;br /&gt;       return(gcd(b,a(mod)b);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6)&lt;br /&gt;arr is an array containing N integers.You can also change the program by keeping characters.k is initially 0.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void permutation(int *arr, int N, int k)&lt;br /&gt;{&lt;br /&gt;   static level = -1;&lt;br /&gt;   level = level+1;&lt;br /&gt;   arr[k] = level;&lt;br /&gt;&lt;br /&gt;    if (level == N)&lt;br /&gt;   {&lt;br /&gt;       if(arr!=0)&lt;br /&gt;       for(int i=0; i &lt; N;i++)&lt;br /&gt;         printf("%d",arr[i]);     &lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;     for (int i = 0; i &lt; N; i++)&lt;br /&gt;         if (arr[i] == 0)&lt;br /&gt;             permutation(arr, N, i);&lt;br /&gt;  level = level-1;&lt;br /&gt;  arr[k] = 0;&lt;br /&gt;}   &lt;br /&gt;&lt;br /&gt;7)void combinations(char*str,int no)&lt;br /&gt;{&lt;br /&gt;        int temp1=0;&lt;br /&gt;        int i,count,n=1,num,len;&lt;br /&gt;        &lt;br /&gt;   for(i=0;*(str+i)!='\0';i++);&lt;br /&gt;   len=i;&lt;br /&gt;   &lt;br /&gt;   for(i=0;i &lt; len;i++)&lt;br /&gt;                n=2*n;&lt;br /&gt;        temp=(int*)malloc(len*sizeof(int));&lt;br /&gt;        for(i=0;i &lt; len;i++)&lt;br /&gt;                *(temp+i)=0;&lt;br /&gt;        for(num=0;num &lt;= n;num=num+1)&lt;br /&gt;        {&lt;br /&gt;                temp1=num;&lt;br /&gt;                for(i=0;i &lt; len;i++)&lt;br /&gt;                {&lt;br /&gt;                        *(temp+i) = temp1%2;&lt;br /&gt;                        temp1=temp1/2;&lt;br /&gt;                }&lt;br /&gt;                count=0;&lt;br /&gt;                for(i=0;i &lt; len;i++)&lt;br /&gt;                {&lt;br /&gt;                        if(*(temp+i)==1)&lt;br /&gt;                                count++;&lt;br /&gt;                }&lt;br /&gt;                if(count==no)&lt;br /&gt;      { &lt;br /&gt;      for(i=0;i &lt; len;i++)&lt;br /&gt;             {&lt;br /&gt;                 if(*(temp+i)==1)&lt;br /&gt;                        printf("%c",*(str+i));&lt;br /&gt;             }&lt;br /&gt;          printf("\n");&lt;br /&gt;                        &lt;br /&gt;   &lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8)&lt;br /&gt;Mergesort:a is an array of n intergers,temp is just a temporary array.low is initially 0 and high is n-1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void mergesort(int *a,int *temp,int low,int hi)&lt;br /&gt;{&lt;br /&gt;   int mid;&lt;br /&gt;   if(hi==low)&lt;br /&gt;   {&lt;br /&gt;       return;&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;       mid=(low+hi)/2;&lt;br /&gt;       mergesort(a,temp,low,mid);&lt;br /&gt;       printf("1\n");&lt;br /&gt;       mergesort(a,temp,mid+1,hi);&lt;br /&gt;       printf("2\n");&lt;br /&gt;       merge(a,temp,low,mid+1,hi);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void merge(int a[],int temp[],int left,int rig,int r)&lt;br /&gt;{&lt;br /&gt;   printf("%d %d %d\n",left,rig,r);&lt;br /&gt;   int i,l,n,k;&lt;br /&gt;   l=rig-1;&lt;br /&gt;   k=left;&lt;br /&gt;   n=r-left+1;&lt;br /&gt;   while(left&lt;=l&amp;&amp;rig&lt;=r)             &lt;br /&gt;   {&lt;br /&gt;        if(a[left]&lt;=a[rig])&lt;br /&gt;            temp[k++]=a[left++];&lt;br /&gt;        else&lt;br /&gt;            temp[k++]=a[rig++];&lt;br /&gt;   }&lt;br /&gt;   while(left&lt;=l)&lt;br /&gt;        temp[k++]=a[left++];&lt;br /&gt;   while(rig&lt;=r)                &lt;br /&gt;        temp[k++]=a[rig++];         &lt;br /&gt;   for(i=0;i &lt; n;i++,r--)                &lt;br /&gt;        a[r]=temp[r];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Quicksort:a is an array of n integers.left is initially 0 and right is n-1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void quick(int *a, int left, int right)&lt;br /&gt;{&lt;br /&gt;   int temp,i,k;&lt;br /&gt;   temp=left;&lt;br /&gt;   if (left&gt;=right)&lt;br /&gt;   {      &lt;br /&gt;       return;&lt;br /&gt;   }&lt;br /&gt; &lt;br /&gt;   k=(left+right)/2;&lt;br /&gt;   swap(a,left,k);&lt;br /&gt;   for (i=left+1;i&lt;=right;i++)&lt;br /&gt;   {&lt;br /&gt;        if (a[i] &lt; a[left])&lt;br /&gt;        {&lt;br /&gt;            swap(a,++temp,i);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    swap(a,left,temp); //swap a[left] and a[temp]&lt;br /&gt;    quick(a,left,temp-1);&lt;br /&gt;    quick(a,temp+1,right);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-1887724755001292602?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/1887724755001292602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=1887724755001292602' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1887724755001292602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1887724755001292602'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/solutions-to-questions-on-recursion.html' title='Solutions to Questions on recursion'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-7779762983100432030</id><published>2008-07-24T08:09:00.000-07:00</published><updated>2008-07-24T08:15:36.646-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>C program to create mirror copy of a tree</title><content type='html'>Question:Write a C program to create a mirror copy of a tree left nodes become right and right nodes become left)&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;struct binarysearchtree{&lt;br /&gt;       int data;&lt;br /&gt;       struct binarysearchtree* left;&lt;br /&gt;       struct binarysearchtree* right;&lt;br /&gt;};&lt;br /&gt;typedef struct binarysearchtree* tree;&lt;br /&gt;&lt;br /&gt;tree mirror_copy(tree T)&lt;br /&gt;{&lt;br /&gt; if(T==NULL)&lt;br /&gt; return T;&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt;    tree temp1=mirror_copy(T-&gt;left);&lt;br /&gt;    tree temp2=mirror_copy(T-&gt;right);&lt;br /&gt;    T-&gt;left=temp2;&lt;br /&gt;    T-&gt;right=temp1;&lt;br /&gt;    return T;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-7779762983100432030?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/7779762983100432030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=7779762983100432030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7779762983100432030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7779762983100432030'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/c-program-to-create-mirror-copy-of-tree.html' title='C program to create mirror copy of a tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-6558819425869464236</id><published>2008-07-24T08:06:00.000-07:00</published><updated>2008-07-24T08:09:21.519-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Solutions to Amazon Intern Interview Questions</title><content type='html'>&lt;a href=""&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;1)Place a red ball in a urn and all the further balls in the other urn.The probability for picking out the red ball is now greater than 0.5.&lt;br /&gt;&lt;br /&gt;2)If v&lt;=2V then the position is (v*L)/(2*V) from the starting point else it is 2*L -(v*L)/(2*V) from the starting point.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4)If we know the process then we can kill it by killall -9 "process name" else we can kill it using its process id obtained by the command ps -x by kill -9 "processid" .&lt;br /&gt;&lt;br /&gt;5)Top command displays all the Linux tasks running at that particular time.It provides their running time and the resources used.&lt;br /&gt;&lt;br /&gt;6)The number appearing 2 times is (sum of all the numbers in the array) - (sum of the numbers from 1 to n).&lt;br /&gt;For floating numbers multiply it with 100 and proceed.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-6558819425869464236?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/6558819425869464236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=6558819425869464236' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6558819425869464236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6558819425869464236'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/solutions-to-amazon-intern-interview.html' title='Solutions to Amazon Intern Interview Questions'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8602103164482281076</id><published>2008-07-24T08:03:00.000-07:00</published><updated>2008-07-24T08:06:34.492-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Traversals of a Binary Tree</title><content type='html'>&lt;a href=""&gt;Write C code to implement the preorder(), inorder() and postorder() traversals. Whats their time complexities?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;struct binarysearchtree{&lt;br /&gt;      int data;&lt;br /&gt;      struct binarysearchtree* left;&lt;br /&gt;      struct binarysearchtree* right;&lt;br /&gt;};&lt;br /&gt;typedef struct binarysearchtree* tree;&lt;br /&gt;&lt;br /&gt;void inorder_print(tree T)&lt;br /&gt;{&lt;br /&gt;      if (T!=NULL)&lt;br /&gt;      {&lt;br /&gt;              printf("%d\n",T-&gt;data);&lt;br /&gt;              inorder_print(T-&gt;left);&lt;br /&gt;              inorder_print(T-&gt;right);&lt;br /&gt;      }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void postorder_print(tree T)&lt;br /&gt;{&lt;br /&gt; if (T==NULL)&lt;br /&gt; {&lt;br /&gt;    return;&lt;br /&gt; }&lt;br /&gt; postorder_print(T-&gt;left);&lt;br /&gt; postorder_print(T-&gt;right);&lt;br /&gt; printf("%d\n",T-&gt;data);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void preorder_print(tree T)&lt;br /&gt;{&lt;br /&gt; if (T==NULL)&lt;br /&gt; {&lt;br /&gt;    return;&lt;br /&gt; }&lt;br /&gt; printf("%d\n",T-&gt;data);&lt;br /&gt; preorder_print(T-&gt;left);&lt;br /&gt; preorder_print(T-&gt;right);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Each of them traverse all the nodes.&lt;br /&gt;So the complexity is O(N).&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8602103164482281076?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8602103164482281076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8602103164482281076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8602103164482281076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8602103164482281076'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/traversals-of-binary-tree.html' title='Traversals of a Binary Tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-6787770341989108933</id><published>2008-07-24T08:01:00.000-07:00</published><updated>2008-07-24T08:03:35.677-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Solutions to Google Top Interview Puzzles</title><content type='html'>&lt;a href=""&gt;To start with,we are posting solutions to some of the questions.In due course of time ,all the questions shall be solved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.There is an array A[N] of N numbers. You have to compose an array Output[N] such that Output[i] will be equal to multiplication of all the elements of A[N] except A[i]. For example Output[0] will be multiplication of A[1] to A[N-1] and Output[1] will be multiplication of A[0] and from A[2] to A[N-1].&lt;br /&gt;&lt;br /&gt;Solve it without division operator and in O(n).&lt;br /&gt;&lt;br /&gt;Solution:At each position i,we need to assign A[i], the product of all the elements in the array except A[i].This amounts to same as putting A[i]=a*b,where a=cumulative product of all those elements to the left of A[i] and b=cumulative product of all those elements to the right of A[i].&lt;br /&gt;&lt;br /&gt;We can put this simply by storing the result in a separate array and by traversing the input array twice.&lt;br /&gt;&lt;br /&gt;In the first iteration, we traverse the input array left to right and assign Output[i]=a (where a is the product of all the numbers preceding A[i]).&lt;br /&gt;&lt;br /&gt;Now we traverse the input array again ,but in reverse direction and this time we find&lt;br /&gt;b(here b is the product of all the numbers following A[i]) and Assign&lt;br /&gt;&lt;br /&gt;Output[i]=Output[i]*b; which amounts to putting Output[i]=a*b&lt;br /&gt;&lt;br /&gt;Hence Each Output[i] contains the product of all the elements in A except A[i].&lt;br /&gt;&lt;br /&gt;Below is a C function to do the same.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int* function(int  input[],int size,int output[])&lt;br /&gt;{&lt;br /&gt;  long int result=1;&lt;br /&gt;  for(int i=0;i&lt;size;i++)&lt;br /&gt;  {&lt;br /&gt;   output[i]=result;&lt;br /&gt;   result*=input[i];&lt;br /&gt;  }&lt;br /&gt;  result=1;&lt;br /&gt;  for(int i=size-1;i&gt;=0;i--)&lt;br /&gt;  {&lt;br /&gt;  output[i]*=result;&lt;br /&gt;  result*=input[i];&lt;br /&gt;  }&lt;br /&gt;  return output;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;2.There is a linked list of numbers of length N. N is very large and you don’t know N. You have to write a function that will return k random numbers from the list. Numbers should be completely random.&lt;br /&gt;&lt;br /&gt;Hint:&lt;br /&gt;&lt;br /&gt;1. Use random function rand() (returns a number between 0 and 1) and irand()&lt;br /&gt;(return either 0 or 1)&lt;br /&gt;2. It should be done in O(n).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:Traverse the list, generating a new random number for each entry. Keep a ‘top k’ chart of the highest random numbers, and their associated entries. When we hit the end of the list, the numbers in the chart are the required random numbers.&lt;br /&gt;&lt;br /&gt;This random number generated for each element can be defined as a function f=absolute(irand()-rand()),which is random enough.&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;3 Find or determine non existence of a number in a sorted list of N numbers where the numbers range over M, M &gt;&gt; N and N large enough to span multiple disks. Algorithm to beat O(log n) bonus points for constant time algorithm&lt;br /&gt;&lt;br /&gt;Solution:This problem can be solved using bitmaps.bitmap will be an array (say b_array) where we have one bit per M possible number. If we use a character array to store bitmaps, b_array size will be M/8, since 1 char can store 8 bits. Bitmap array will be initialized to zero first. Now for each of the N numbers its corresponding bit should be turned on(1). Corresponding bit for 'n' can be found as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;base = n/8; (base is the char whose certain bit needs to be set)&lt;br /&gt;&lt;br /&gt;offset = 1 &lt;&lt; (n mod 8); (offset is the bit to be set)&lt;br /&gt;&lt;br /&gt;b_array[base] |= offset; (I set the particular bit)&lt;br /&gt;&lt;br /&gt;Once this is done of all N numbers, given a number m,&lt;br /&gt;we can first find corresponding  bit offset and check whether it is one.&lt;br /&gt;&lt;br /&gt;base = m/8; (base is the char whose certain bit needs to be set)&lt;br /&gt;&lt;br /&gt;offset = 1 &lt;&lt; (m mod 8); (offset is the bit to be set)&lt;br /&gt;&lt;br /&gt;if (b_array[base] &amp; offset)&lt;br /&gt;    // found the number&lt;br /&gt;else&lt;br /&gt;    //number could not be found&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;*Any other solutions will be appreciated.&lt;br /&gt;&lt;br /&gt;5)You are given an array [a1 To an] and we have to construct another array [b1 To bn] where bi = a1*a2*...*an/ai. you are allowed to use only constant space and the time complexity is O(n). No divisions are allowed.&lt;br /&gt;&lt;br /&gt;Solution:Please refer to Question1.This question is identical to the first one,except that it is made to look much harder.&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6 How do you put a Binary Search Tree in an array in a efficient manner.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hint :: If the node is stored at the ith position and its children are at&lt;br /&gt;2i and 2i+1(I mean level order wise)Its not the most efficient way.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:The method of construction given in Hint though looks good at a mere glance,it has too many shortcomings.Exponential memory is required at the worst case.&lt;br /&gt;&lt;br /&gt;The solution is maintain inorder and one of the other 2 traversals of the tree.These 2 are sufficient to construct back the tree.So the space requirement now is 2N i.e O(N)&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;7. How do you find out the fifth maximum element in an Binary Search Tree in efficient manner.&lt;br /&gt;Note :: You should not use use any extra space. i.e sorting Binary Search Tree&lt;br /&gt;and storing the results in an array and listing out the fifth element.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int num=0;&lt;br /&gt;void max(tree*t)&lt;br /&gt;{&lt;br /&gt;        if(t==NULL)&lt;br /&gt;                return;&lt;br /&gt;        max(t-&gt;right);&lt;br /&gt;        num++;&lt;br /&gt;        if(num==5)&lt;br /&gt;                printf("%d\n",t-&gt;no);&lt;br /&gt;        max(t-&gt;left);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;8.Given a Data Structure having first n integers and next n chars. A = i1 i2 i3 ... iN c1 c2 c3 ... cN.Write an in-place algorithm to rearrange the elements of the array ass A = i1 c1 i2 c2 ... in cn&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:we divide the array in four sections:[X,Y|A,B]&lt;br /&gt;It is easy to see that with swaps we can modify it to the form [X,A|Y,B].&lt;br /&gt;Now do recursion to solve [X|A] and [Y|B] separately,essentially using divide and conquer.[as given in comments section]&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;9.Given two sequences of items, find the items whose&lt;br /&gt;absolute number increases or decreases the most when comparing&lt;br /&gt;one sequence with the other by reading the sequence only once.&lt;br /&gt;&lt;br /&gt;Solution:Well, this question requires some reading and understanding&lt;br /&gt;of data streams.The stress is upon the algorithmic challenges in web search engines.It wouldn't be appropriate to quote a short piece of text&lt;br /&gt;as the answer.So please go through the paperFinding Frequent Items in Data Streams to have a thorough understanding of the problem&lt;br /&gt;as well as its applications.&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11.How many lines can be drawn in a 2D plane such that they are equidistant from 3 non-collinear points ?&lt;br /&gt;&lt;br /&gt;Solution:The three non-collinear points form a triangle. There will be 3 lines which are equidistant from all the three points.&lt;br /&gt;Draw altitudes from each point to the line joining the other two points.We get 3 altitudes.Now draw a line passing through the mid point of the altitude line and parallel to line onto which the altitude is drawn.This line is equidistant from all the 3 points.Thus we get 3 lines.&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;13.Given that you have one string of length N and M small strings of length L . How do you efficiently find the occurrence of each small string in the larger one ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:This solution has been framed on the assumption that all the occurances of a string in the large string of length N are to be reported.&lt;br /&gt;So one can just sort the M strings in O(l*Mlog(M)).An additional l figures because comparison function of strings of length l is of complexity O(l).&lt;br /&gt;Once these M strings are sorted,we can simply do a binary search on them for each of the N-l+1 continuous substrings of big string.The complexity of this search for each such substring is O(l*logM).&lt;br /&gt;So the complexity of this procedure is O(l*MlogM)+O((N-l+1)*(l*logM)).&lt;br /&gt;For N&gt;&gt;l this reduces to O(l*MlogM)+O(N*l*log(M).&lt;br /&gt;This can be reduced to O((M+N)*l*log(M)).&lt;br /&gt;&lt;br /&gt;If you find a better solution than this,please post it in the comments section.&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;14.Given a Binary Tree, Programmatically you need to Prove it is a Binary Search Tree&lt;br /&gt;Hint: Some kind of pointer handling with In Order Traversal - anybody in for&lt;br /&gt;writing some code.&lt;br /&gt;Solution:If the given binary tree is a Binary search tree,then the inorder traversal should output the elements in increasing order.We make use of this property of inorder traversal to check whether the given binary tree is a BST or not.We make note of the latest element that could have been printed and compare it with the current element.Given below is a C function to check it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bool flag=true;&lt;br /&gt;void inorder(tree T,int *lastprinted)&lt;br /&gt;{&lt;br /&gt;if(T==NULL)&lt;br /&gt;  {&lt;br /&gt;   printf("the tree is empty .Hence, it is a BST\n");&lt;br /&gt;  }&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;  if(T-&gt;left!=NULL)&lt;br /&gt;  {&lt;br /&gt;      inorder(T-&gt;left,lastprinted);&lt;br /&gt;  }&lt;br /&gt;  if(T-&gt;data &gt; *lastprinted)&lt;br /&gt;  {&lt;br /&gt;     *lastprinted=T-&gt;data;&lt;br /&gt;  }&lt;br /&gt;  else&lt;br /&gt;  {&lt;br /&gt;     printf("the given binary tree is not a BST\n");&lt;br /&gt;     flag=false;&lt;br /&gt;     exit(0);&lt;br /&gt;  }&lt;br /&gt;  inorder(T-&gt;right,lastprinted);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now check the value of flag to say whether it is a BST or not.If it is not then it is already taken care by the code.&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15.You are given a small sorted list of numbers, and a very very long sorted list of numbers - so long that it had to be put on a disk in different blocks. How would you find those short list numbers in the bigger one?&lt;br /&gt;&lt;br /&gt;Solution:For each chunk of sorted list which occupies a block,make a note of the first and last elements.Thus we have lookup table giving the first and last elements of each of the blocks.Now associate an empty list with each of the blocks.&lt;br /&gt;Now try to find the block which might contain the first entry A[1]of the small sorted list(say)A given.Since we knew the first and last elements of all the blocks,we can identify the block Bi ,which only can contain the desired number.Now add A[1] to the empty list associated with Bi.Now we need to identify the candidate block for A[2].As A is also sorted,A[2] should lie either in Bi or its successors.So we simultaneously traverse&lt;br /&gt;A as well as lookup table.When we are done with finding the probable blocks of all the numbers in A,we have also finished the look up table. We also have in the lists associated with each block,all those entries of A to search for, in that particular block.Now for each block Bi,search for all the entries in its list using binary search.This way we have minimized the number of disk block accesses,which is the bottleneck .&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;16.Suppose you have given N companies, and we want to eventually merge them into one big company. How many ways are theres to merge?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:Different solutions exist for this problem,depending on how once perceives the question.&lt;br /&gt;If all the companies are assumed to be unique things,then the solution goes like this.Initially we need to merge 2 companies.These 2 can be chosen in Nc2 ways.Now in the second iteration we can merge 2 companies among the remaining N-1 in N-1c2.&lt;br /&gt;We go on merging like this until we have a single union of all the companies.&lt;br /&gt;Hence the number of ways of doing this is (Nc2)*(N-1c2)*(N-2c2)*........*(2c2)=(N!*(N-1)!)/2^(N-1) .&lt;br /&gt;&lt;br /&gt;One more way of looking at this problem is the structural aspect of merging.In the above solution suppose there are 4 companies say,to be merged.&lt;br /&gt;&lt;br /&gt;We could have merged companies 1&amp;2 in the first iteration and 3&amp;4 in the 2nd iteration.Likewise we could have also merged 3&amp;4 in the first iteration and then 1&amp;2 in the 2nd iteration.After these 2 merges,both of them are identical,though we put them as different ways in solution1,depending on which 2 were merged before the other 2.If we were interested only in the structural aspects,then the above solution doesn't even consider that.&lt;br /&gt;If we are interested in the number of structurally different ways to merge these, then we can confront this problem on the assumption that all the given companies are identical .Then this problem reduces to parenthesis problem,i.e number of ways of putting N pairs of parenthesis.The answer then would be N-1 th Catalan Number,&lt;br /&gt;i.e (2N-2)!/N!(N-1)!.&lt;br /&gt;&lt;br /&gt;If the companies aren't identical ,with some permutations also getting into the picture, then the solution isn't straightforward and we couldn't figure it out.&lt;br /&gt;&lt;br /&gt;So if anyone has a solution to this,please post it in the comments section.&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;17.Given a file of 4 billion 32-bit integers, how to find one that appears at least twice?&lt;br /&gt;&lt;br /&gt;Solution:The maximum size of int is 2,147,483,647 in case of 32-bit integers. Thus we need declare an array of long long int.&lt;br /&gt;Then we can do a merge sort and in doing so we can find the integers which appear atleast twice in the merge step.Thus we can solve the problem in&lt;br /&gt;nlogn time.&lt;br /&gt;If you have any better solution then please comment.&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;18 Write a program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.&lt;br /&gt;&lt;br /&gt;Solution:This question is similar to question 9 in the context which it appears and&lt;br /&gt;answer lies in the same paper Finding Frequent Items in Data Streams.&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;19.Design a stack. We want to push, pop, and also, retrieve the minimum element in constant time.&lt;br /&gt;Solution:Use 2 stacks S1 in to which the elements are pushed and S2 in to which only the current minimum is pushed.&lt;br /&gt;When one needs to insert an element E ,we first push E on to S1 and then access the top element T of S2 which is the minimum before E has been inserted.If only E is less than T , we push E on to S2 .&lt;br /&gt;When one needs to pop an element ,pop the top element of S1 and if this element is also equal to the one on top of S2, then pop it off S2 as well.&lt;br /&gt;&lt;br /&gt;Hence the current minimum will always be on top of S2 .Hence along with other normal stack operations, access of minimum element is also possible in O(1).&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;20.Given a set of coin denominators, find the minimum number of coins to give a certain amount of change.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:This is a flavour of coin change problem ,for which sufficient material is available at Coin Change Problem.&lt;br /&gt;If you have gone through the above link,please refer below to the minor changes we make to the pseudo code of one given in the above link.&lt;br /&gt;&lt;br /&gt;Let p[n][m] denote the minimum no of coins of various denomination required to give change for n cents from coins of m different denominations.&lt;br /&gt;&lt;br /&gt;P[n][m]=min((1+p[n-S[m]][m]),p[n][m-1])// these notations will be clear only if you go through the above link thoroughly.&lt;br /&gt;&lt;br /&gt;Then it isn't much difficult to write the conditions for base cases as well.&lt;br /&gt;This is only a suggested solution to this problem and we have clues here and there as to how to proceed.&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;21.Given an array,&lt;br /&gt;&lt;br /&gt;i) find the longest continuous increasing subsequence.&lt;br /&gt;&lt;br /&gt;ii) find the longest increasing subsequence.&lt;br /&gt;&lt;br /&gt;Solution:a)Given a sequence,we can find the longest continuous increasing subsequence in O(n) time.We traverse the sequence one and keep track of the points where the number decreases.&lt;br /&gt;&lt;br /&gt;b)This problem can be solved in O(n^2).This can be solved in 3 methods.One method is to find the longest path in a directed acyclic graph.The other method is to sort the given sequence and make it copy and find the longest common subsequence on the 2 sequences.The third one is using the dynamic programming.&lt;br /&gt;The following is a function which returns the length of the longest increasing subsequence in a.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int lis(int*a,int n)&lt;br /&gt;{&lt;br /&gt; int length[n],path[n],i,j,max=0;&lt;br /&gt;&lt;br /&gt; for(i=0;i &lt; N;i++)&lt;br /&gt;  length[i]=1,path[i]=i; //path contains the longest subsequence.&lt;br /&gt;&lt;br /&gt; for(i=1;i &lt; N;i++)&lt;br /&gt;  for(j=0;j &lt; i;j++)&lt;br /&gt;   if(a[i] &gt; a[j] &amp;&amp; length[i] &lt; length[j]+1)&lt;br /&gt;    length[i]=length[j]+1,path[i]=j;&lt;br /&gt;&lt;br /&gt; for(i=0;i &lt; N;i++)&lt;br /&gt;  if(max &lt; length[i])&lt;br /&gt;   max=length[i];&lt;br /&gt;&lt;br /&gt; return max;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;22.Suppose we have N companies, and we want to eventually merge them into one big company. How many ways are there to merge?&lt;br /&gt;&lt;br /&gt;Solution:This is a repeated question, same as the 16th. So please refer to the 16th answer.&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;23.Write a function to find the middle node of a single link list.&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;typedef struct linklist&lt;br /&gt;{&lt;br /&gt;        int no;&lt;br /&gt;        struct linklist*next;&lt;br /&gt;}list;&lt;br /&gt;&lt;br /&gt;void midvalue(list*start)&lt;br /&gt;{&lt;br /&gt;list*head;&lt;br /&gt;head=start;&lt;br /&gt;while(1)&lt;br /&gt;{&lt;br /&gt;   if(start-&gt;next==NULL)&lt;br /&gt;   {&lt;br /&gt;    if(head-&gt;next==NULL)&lt;br /&gt;     {&lt;br /&gt;       printf("Only one node in the list which is %d\n",head-&gt;no);&lt;br /&gt;     }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;       printf("Middle node is %d\n",head-&gt;next-&gt;no);&lt;br /&gt;   }&lt;br /&gt;   break;&lt;br /&gt;  }&lt;br /&gt;  if(start-&gt;next-&gt;next==NULL)&lt;br /&gt;  {&lt;br /&gt;     printf("Middle nodes are %d and %d\n",head-&gt;no,head-&gt;next-&gt;no);&lt;br /&gt;  }&lt;br /&gt;     start=start-&gt;next-&gt;next;&lt;br /&gt;     head=head-&gt;next;&lt;br /&gt;  }&lt;br /&gt;        return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This algorithm loops for n/2 times where n is the length of the list.Thus its complexity is O(n).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;24.Given two binary trees, write a compare function to check if they are equal or not. Being equal means that they have the same value and same structure.&lt;br /&gt;&lt;br /&gt;Solution:The following is a function to check if the two trees are similar or not.It returns true if they are similar else false.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int compareTree(struct node* a, struct node* b) {&lt;br /&gt;    if (a==NULL &amp;&amp; b==NULL) &lt;br /&gt;  return(true);&lt;br /&gt;    else if (a!=NULL &amp;&amp; b!=NULL) {&lt;br /&gt;    return(&lt;br /&gt;      a-&gt;data == b-&gt;data &amp;&amp;&lt;br /&gt;      compareTree(a-&gt;left, b-&gt;left) &amp;&amp;&lt;br /&gt;      compareTree(a-&gt;right, b-&gt;right)&lt;br /&gt;    );&lt;br /&gt;  }&lt;br /&gt;    else return(false);&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;25.Implement put/get methods of a fixed size cache with LRU replacement algorithm.&lt;br /&gt;&lt;br /&gt;Solution:Each cache unit consists of an id,data and its age.In the Least recently used algorithm if the cache is full and we need to put some data, we replace it an the unit whose age is the least.&lt;br /&gt;Getting some data is just a search for the data thereby incrementing it age and resorting the cache units.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;get(id)&lt;br /&gt;{&lt;br /&gt; z=search(id);&lt;br /&gt; data=cache[z].data;&lt;br /&gt; cache[z].age++;&lt;br /&gt; sort(cache);&lt;br /&gt; return(x);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;put(id,x)&lt;br /&gt;{&lt;br /&gt; if(top==cachesize)  //if cache is full&lt;br /&gt;  top--&lt;br /&gt; cache[top].id=id;   &lt;br /&gt; cache[top].data=x;&lt;br /&gt; cache[top].age=0;&lt;br /&gt; top++;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;26 You are given with three sorted arrays ( in ascending order), you are required to find a triplet ( one element from each array) such that distance is minimum.&lt;br /&gt;&lt;br /&gt;Distance is defined like this :&lt;br /&gt;&lt;br /&gt;If a[i], b[j] and c[k] are three elements then&lt;br /&gt;&lt;br /&gt;distance=max(abs(a[i]-b[j]),abs(a[i]-c[k]),abs(b[j]-c[k]))"&lt;br /&gt;&lt;br /&gt;Please give a solution in O(n) time complexity&lt;br /&gt;&lt;br /&gt;Solution:Point to the first elements of the three arrays, namely a[0],b[0],c[0].&lt;br /&gt;Find the smallest and second smallest of the three.Let us say that a[0] is the smallest and b[0] is the second smallest. Increment the pointer of a until you find a[i]&gt;b[0]. Calculate the difference between a[i-1] and c[0] and store it as current min. Now,again find the smallest and second smallest between a[i], b[0], and c[0] and repeat the above process. If the new difference is smaller than current min,update the value of current min.&lt;br /&gt;Repeat the above process until one of the arrays are finished.&lt;br /&gt;&lt;br /&gt;Click here for the questions&lt;br /&gt;&lt;br /&gt;27.Classic - Egg Problem&lt;br /&gt;&lt;br /&gt;You are given 2 eggs.You have access to a 100-storey building.&lt;br /&gt;&lt;br /&gt;Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100 th floor.Both eggs are identical.You need to figure out the highest floor of a 100-storey building an egg can be dropped without breaking.&lt;br /&gt;&lt;br /&gt;Now the question is how many drops you need to make. You are allowed to break 2 eggs in the process.&lt;br /&gt;&lt;br /&gt;Solution:Let d be the number of drops required.&lt;br /&gt;Now we need to find an optimal solution no matter at which floor the egg breaks.&lt;br /&gt;So we find d such that it doesn't depend on the floor number.&lt;br /&gt;&lt;br /&gt;Let us break the egg at floor d. If the egg breaks then we have atmax d-1 floors to test for the highest floor,thus making it d breaks in total.&lt;br /&gt;If the egg doesn't break at floor d,then proceed to floor 2d-1,where we make the 2nd attempt.If it breaks here we have d-2 breaks in the worst case to find the highest floor.&lt;br /&gt;We proceed in this fashion,till we reach the 100th floor.&lt;br /&gt;&lt;br /&gt;Thus we break at d,2*d-1,3*d-2,....&lt;br /&gt;&lt;br /&gt;thus d+(d-1)+(d-2)+.... 1 &lt;=100&lt;br /&gt;=&gt;d=14&lt;br /&gt;Thus we need atmax of 14 attempts for any case.&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-6787770341989108933?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/6787770341989108933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=6787770341989108933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6787770341989108933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6787770341989108933'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/solutions-to-google-top-interview.html' title='Solutions to Google Top Interview Puzzles'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-7497235552629150606</id><published>2008-07-24T08:00:00.000-07:00</published><updated>2008-07-24T08:01:38.173-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Solutions to problems in recursion analysis</title><content type='html'># Using the substitution method, we substitute the function recursively till we arrive at T(1).&lt;br /&gt;i.e T(n)=T(n/2) + 1 = T(n/4) + 1 + 1 = ....&lt;br /&gt;&lt;br /&gt;We get a total of lg(n) iterations&lt;br /&gt;i.e T(n)=T(1) +lg(n)&lt;br /&gt;&lt;br /&gt;Thus the complexity is O(lg n).&lt;br /&gt;&lt;br /&gt;# Similar to the 1st problem, it takes lg(n) iterations to reach T(1).After final iteration:&lt;br /&gt;&lt;br /&gt;T(n)=(2^lg(n))*(T(1) + lg(n)*17)&lt;br /&gt;&lt;br /&gt;Thus the complexity is (2^lg(n))*(lg n) = n*lg(n)&lt;br /&gt;&lt;br /&gt;# Let n=2^m,then T(2^m)=2*T(2^m/2) + 1&lt;br /&gt;Now let S(m)=T(2^m).&lt;br /&gt;=&gt;S(m)=2*S(m/2) +1&lt;br /&gt;&lt;br /&gt;This is the same as 2nd problem.&lt;br /&gt;Thus the complexity is O(m*lg(m)),but m=lg(n)&lt;br /&gt;&lt;br /&gt;Thus the final complexity is O(lg(n)*lg(lg(n)))&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-7497235552629150606?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/7497235552629150606/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=7497235552629150606' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7497235552629150606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/7497235552629150606'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/solutions-to-problems-in-recursion.html' title='Solutions to problems in recursion analysis'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-1524621775458311711</id><published>2008-07-24T07:59:00.000-07:00</published><updated>2008-07-24T08:00:04.764-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>solution1</title><content type='html'>&lt;a href=""&gt;There is an array A[N] of N numbers. You have to compose an array Output[N] such that Output[i] will be equal to multiplication of all the elements of A[N] except A[i]. For example Output[0] will be multiplication of A[1] to A[N-1] and Output[1] will be multiplication of A[0] and from A[2] to A[N-1].&lt;br /&gt;&lt;br /&gt;Solve it without division operator and in O(n).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution:At each position i,we need to assign A[i], the product of all the elements in the array except A[i].This amounts to same as putting A[i]=a*b,where a=cumulative product of all those elements to the left of A[i] and b=cumulative product of all those elements to the right of A[i].&lt;br /&gt;&lt;br /&gt;We can put this simply by storing the result in a separate array and by traversing the input array twice.&lt;br /&gt;&lt;br /&gt;In the first iteration, we traverse the input array left to right and assign Output[i]=a (where a is the product of all the numbers preceding A[i]).&lt;br /&gt;&lt;br /&gt;Now we traverse the input array again ,but in reverse direction and this time we find&lt;br /&gt;b(here b is the product of all the numbers following A[i]) and Assign&lt;br /&gt;&lt;br /&gt;Output[i]=Output[i]*b; which amounts to putting Output[i]=a*b&lt;br /&gt;&lt;br /&gt;Hence Each Output[i] contains the product of all the elements in A except A[i].&lt;br /&gt;&lt;br /&gt;Below is a C function to do the same.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int* function(int  input[],int size,int output[])&lt;br /&gt;{&lt;br /&gt; long int result=1;&lt;br /&gt; for(int i=0;i&lt;size;i++)&lt;br /&gt; {&lt;br /&gt;  output[i]=result;&lt;br /&gt;  result*=input[i];&lt;br /&gt; }&lt;br /&gt; result=1;&lt;br /&gt; for(int i=size-1;i&gt;=0;i--)&lt;br /&gt; {&lt;br /&gt; output[i]*=result;&lt;br /&gt; result*=input[i];&lt;br /&gt; }&lt;br /&gt; return output;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-1524621775458311711?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/1524621775458311711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=1524621775458311711' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1524621775458311711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1524621775458311711'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/solution1.html' title='solution1'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-5204367195497905524</id><published>2008-07-24T07:58:00.000-07:00</published><updated>2008-07-24T07:59:00.555-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>C-program to make a copy of a tree</title><content type='html'>&lt;a href=""&gt;7.Write a C program to create&lt;br /&gt;a copy of a tree&lt;br /&gt;&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;struct binarysearchtree{&lt;br /&gt;      int data;&lt;br /&gt;      struct binarysearchtree* left;&lt;br /&gt;      struct binarysearchtree* right;&lt;br /&gt;};&lt;br /&gt;typedef struct binarysearchtree* tree;&lt;br /&gt;&lt;br /&gt;tree copy(tree T)&lt;br /&gt;{&lt;br /&gt; if(T== NULL)&lt;br /&gt;        return NULL;&lt;br /&gt;else&lt;br /&gt; {&lt;br /&gt;        tree *newtree=(tree*)malloc(sizeof(tree));&lt;br /&gt;        newtree-&gt;data=tree-&gt;data;&lt;br /&gt;        newtree-&gt;left=copy(T-&gt;left);&lt;br /&gt;        newtree-&gt;right=copy(T-&gt;right);&lt;br /&gt;        return newtree;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-5204367195497905524?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/5204367195497905524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=5204367195497905524' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5204367195497905524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5204367195497905524'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/c-program-to-make-copy-of-tree.html' title='C-program to make a copy of a tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-5089937472835705220</id><published>2008-07-24T07:57:00.000-07:00</published><updated>2008-07-24T07:58:17.775-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>C-program to check whether a binary tree is a Binary search tree</title><content type='html'>&lt;a href=""&gt;8. Write a C program to check if a given binary tree is a binary search tree or not?&lt;br /&gt;Solution:&lt;br /&gt;If the given binary tree is a Binary search tree,then the inorder traversal should output the elements in increasing order.We make use of this property of inorder traversal to check whether the given binary tree is a BST or not.We make note of the latest element that could have been printed and compare it with the current element.Given below is a C function to check it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;bool flag=true;&lt;br /&gt;void inorder(tree T,int *lastprinted)&lt;br /&gt;{&lt;br /&gt;if(T==NULL)&lt;br /&gt;  {&lt;br /&gt;   printf("the tree is empty .Hence, it is a BST\n");&lt;br /&gt;  }&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;  if(T-&gt;left!=NULL)&lt;br /&gt;  {&lt;br /&gt;      inorder(T-&gt;left,lastprinted);&lt;br /&gt;  }&lt;br /&gt;  if(T-&gt;data &gt; *lastprinted)&lt;br /&gt;  {&lt;br /&gt;     *lastprinted=T-&gt;data;&lt;br /&gt;  }&lt;br /&gt;  else&lt;br /&gt;  {&lt;br /&gt;     printf("the given binary tree is not a BST\n");&lt;br /&gt;     flag=false;&lt;br /&gt;     exit(0);&lt;br /&gt;  }&lt;br /&gt;  inorder(T-&gt;right,lastprinted);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now check the value of flag to say whether it is a BST or not.If it is not then it is already taken care by the code.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-5089937472835705220?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/5089937472835705220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=5089937472835705220' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5089937472835705220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/5089937472835705220'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/c-program-to-check-whether-binary-tree.html' title='C-program to check whether a binary tree is a Binary search tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-768060652283582058</id><published>2008-07-24T07:56:00.000-07:00</published><updated>2008-07-24T07:57:26.491-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>C-program to delete a node from a tree</title><content type='html'>&lt;a href=""&gt;10. Write a C program to delete a node from a Binary Search Tree?&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;struct binarysearchtree{&lt;br /&gt;        int data;&lt;br /&gt;        struct binarysearchtree* left;&lt;br /&gt;        struct binarysearchtree* right;&lt;br /&gt;};&lt;br /&gt;typedef struct binarysearchtree* tree;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;tree delete_node(tree T,int num)&lt;br /&gt;{&lt;br /&gt;        tree temp;&lt;br /&gt;        if (T==NULL)&lt;br /&gt;                exit(0);&lt;br /&gt;                //return NULL;&lt;br /&gt;        else if(num&lt;T-&gt;data)&lt;br /&gt;                T-&gt;left=delete_node(T-&gt;left,num);&lt;br /&gt;        else if(num&gt;T-&gt;data)&lt;br /&gt;                T-&gt;right=delete_node(T-&gt;right,num);&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;                if(T-&gt;left!=NULL&amp;&amp;T-&gt;right!=NULL)&lt;br /&gt;                {&lt;br /&gt;                        temp=min(T-&gt;right);&lt;br /&gt;                        T-&gt;data=temp-&gt;data;&lt;br /&gt;                        T-&gt;right=delete_node(T-&gt;right,T-&gt;data);&lt;br /&gt;                }&lt;br /&gt;                else if(T-&gt;left==NULL)&lt;br /&gt;                {&lt;br /&gt;                        temp=T;&lt;br /&gt;                        T=T-&gt;right;&lt;br /&gt;                }&lt;br /&gt;                else if(T-&gt;right==NULL)&lt;br /&gt;                {&lt;br /&gt;                        temp=T;&lt;br /&gt;                        T=T-&gt;left;&lt;br /&gt;                }&lt;br /&gt;                        free(temp);&lt;br /&gt;        }&lt;br /&gt;        return T;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-768060652283582058?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/768060652283582058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=768060652283582058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/768060652283582058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/768060652283582058'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/c-program-to-delete-node-from-tree.html' title='C-program to delete a node from a tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-587298608515778710</id><published>2008-07-24T07:55:00.000-07:00</published><updated>2008-07-24T07:56:27.505-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Search On a Binary Search Tree</title><content type='html'>&lt;a href=""&gt;11. Write a C program to search for a value in a binary search tree (BST).&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;stdbool.h&gt;&lt;br /&gt;struct binarysearchtree{&lt;br /&gt;        int data;&lt;br /&gt;        struct binarysearchtree* left;&lt;br /&gt;        struct binarysearchtree* right;&lt;br /&gt;};&lt;br /&gt;typedef struct binarysearchtree* tree;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;tree search_node(tree T,int num)&lt;br /&gt;{&lt;br /&gt;        if(T==NULL)&lt;br /&gt;        {&lt;br /&gt;                return NULL;&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;                if(T-&gt;data&gt;num)&lt;br /&gt;                        search_node(T-&gt;left,num);&lt;br /&gt;                else if(T-&gt;data&lt;num)&lt;br /&gt;                     search_node(T-&gt;right,num);&lt;br /&gt;return T;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-587298608515778710?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/587298608515778710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=587298608515778710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/587298608515778710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/587298608515778710'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/search-on-binary-search-tree.html' title='Search On a Binary Search Tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8489649525167425247</id><published>2008-07-24T07:52:00.000-07:00</published><updated>2008-07-24T07:54:42.591-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>C-program to count the leaves in a tree</title><content type='html'>&lt;a href=""&gt;12. Write a C program to count the number of leaves in a tree&lt;br /&gt;Solution:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;struct binarysearchtree{&lt;br /&gt;        int data;&lt;br /&gt;        struct binarysearchtree* left;&lt;br /&gt;        struct binarysearchtree* right;&lt;br /&gt;};&lt;br /&gt;typedef struct binarysearchtree* tree;&lt;br /&gt;&lt;br /&gt;int count_leaves(tree T)&lt;br /&gt;{&lt;br /&gt;        if(T==NULL)&lt;br /&gt;         return 0;&lt;br /&gt;         else if(T-&gt;left==NULL &amp;&amp; T-&gt;right==NULL)&lt;br /&gt;         {&lt;br /&gt;                return 1;&lt;br /&gt;         }&lt;br /&gt;         else&lt;br /&gt;         return count_leaves(T-&gt;left)+count_leaves(T-&gt;right);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8489649525167425247?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8489649525167425247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8489649525167425247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8489649525167425247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8489649525167425247'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/c-program-to-count-leaves-in-tree.html' title='C-program to count the leaves in a tree'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-4574453912531753315</id><published>2008-07-24T07:51:00.000-07:00</published><updated>2008-07-24T07:55:27.497-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='solutions'/><title type='text'>Some Basic Questions on sorting and their solutions</title><content type='html'>&lt;a href=""&gt;1 .In a selectionsort of n elements, how many times is the swap function called in the complete execution of the algorithm?&lt;br /&gt;&lt;br /&gt;A. 1&lt;br /&gt;B. n - 1&lt;br /&gt;C. n log n&lt;br /&gt;D. n^2&lt;br /&gt;&lt;br /&gt;Solution: B. n-1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2 .Selectionsort and quicksort both fall into the same category of sorting algorithms. What is this category?&lt;br /&gt;&lt;br /&gt;* A. O(n log n) sorts&lt;br /&gt;* B. Divide-and-conquer sorts&lt;br /&gt;* C. Interchange sorts&lt;br /&gt;* D. Average time is quadratic.&lt;br /&gt;&lt;br /&gt;Solution: C.Interchange sorts reason:Selection sort is not O(n log n) and not a Divide-conquer sort too and Average time of quicksort is not quadratic.&lt;br /&gt;&lt;br /&gt;3 . Suppose that a selectionsort of 100 items has completed 42 iterations of the main loop. How many items are now guaranteed to be in their final spot (never to be moved again)?&lt;br /&gt;&lt;br /&gt;* A. 21&lt;br /&gt;* B. 41&lt;br /&gt;* C. 42&lt;br /&gt;* D. 43&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Solution: C. 42&lt;br /&gt;&lt;br /&gt;4 .Suppose we are sorting an array of ten integers using a some quadratic sorting algorithm. After four iterations of the algorithm's main loop, the array elements are ordered as shown here:&lt;br /&gt;&lt;br /&gt;1 2 3 4 5 0 6 7 8 9&lt;br /&gt;&lt;br /&gt;Which statement is correct? (Note: Our selection sort picks largest items first.)&lt;br /&gt;&lt;br /&gt;* A. The algorithm might be either selection sort or insertion sort.&lt;br /&gt;* B. The algorithm might be selectionsort, but could not be insertionsort.&lt;br /&gt;* C. The algorithm might be insertionsort, but could not be selectionsort.&lt;br /&gt;* D. The algorithm is neither selectionsort nor insertionsort.&lt;br /&gt;&lt;br /&gt;Solution: C. The algorithm might be insertion sort, but could not be selection sort.&lt;br /&gt;&lt;br /&gt;5 .Suppose we are sorting an array of eight integers using a some quadratic sorting algorithm. After four iterations of the algorithm's main loop, the array elements are ordered as shown here:&lt;br /&gt;&lt;br /&gt;2 4 5 7 8 1 3 6&lt;br /&gt;&lt;br /&gt;Which statement is correct? (Note: Our selectionsort picks largest items first.)&lt;br /&gt;&lt;br /&gt;* A. The algorithm might be either selectionsort or insertionsort.&lt;br /&gt;* B. The algorithm might be selectionsort, but it is not insertionsort.&lt;br /&gt;* C. The algorithm is not selectionsort, but it might be insertionsort.&lt;br /&gt;* D. The algorithm is neither selectionsort nor insertionsort.&lt;br /&gt;&lt;br /&gt;Solution: C. The algorithm is not selectionsort, but it might be insertionsort.&lt;br /&gt;&lt;br /&gt;6 .When is insertionsort a good choice for sorting an array?&lt;br /&gt;&lt;br /&gt;* A. Each component of the array requires a large amount of memory.&lt;br /&gt;* B. Each component of the array requires a small amount of memory.&lt;br /&gt;* C. The array has only a few items out of place.&lt;br /&gt;* D. The processor speed is fast.&lt;br /&gt;&lt;br /&gt;Solution: C. The array has only a few items out of place.&lt;br /&gt;&lt;br /&gt;7 What is the worst-case time for mergesort to sort an array of n elements?&lt;br /&gt;&lt;br /&gt;* A. O(log n)&lt;br /&gt;* B. O(n)&lt;br /&gt;* C. O(n log n)&lt;br /&gt;* D. O(n^2)&lt;br /&gt;&lt;br /&gt;Solution : C. O(n log n)&lt;br /&gt;&lt;br /&gt;8 What is the worst-case time for quicksort to sort an array of n elements?&lt;br /&gt;&lt;br /&gt;* A. O(log n)&lt;br /&gt;* B. O(n)&lt;br /&gt;* C. O(n log n)&lt;br /&gt;* D. O(n^2)&lt;br /&gt;&lt;br /&gt;Solution: D. O(n^2)&lt;br /&gt;&lt;br /&gt;9 .Mergesort makes two recursive calls. Which statement is true after these recursive calls finish, but before the merge step?&lt;br /&gt;&lt;br /&gt;* A. The array elements form a heap.&lt;br /&gt;* B. Elements in each half of the array are sorted amongst themselves.&lt;br /&gt;* C. Elements in the first half of the array are less than or equal to elements in the second half of the array.&lt;br /&gt;* D. None of the above.&lt;br /&gt;&lt;br /&gt;Solution: B. Elements in each half of the array are sorted amongst themselves.&lt;br /&gt;&lt;br /&gt;10 .Suppose we are sorting an array of eight integers using quicksort, and we have just finished the first partitioning with the array looking like this:&lt;br /&gt;&lt;br /&gt;2 5 1 7 9 12 11 10&lt;br /&gt;&lt;br /&gt;Which statement is correct?&lt;br /&gt;&lt;br /&gt;* A. The pivot could be either the 7 or the 9.&lt;br /&gt;* B. The pivot could be the 7, but it is not the 9.&lt;br /&gt;* C. The pivot is not the 7, but it could be the 9.&lt;br /&gt;* D. Neither the 7 nor the 9 is the pivot.&lt;br /&gt;&lt;br /&gt;Solution: A. The pivot could be either the 7 or the 9.&lt;br /&gt;&lt;br /&gt;11 .What is the worst-case time for heapsort to sort an array of n elements?&lt;br /&gt;&lt;br /&gt;* A. O(log n)&lt;br /&gt;* B. O(n)&lt;br /&gt;* C. O(n log n)&lt;br /&gt;* D. O(n^2)&lt;br /&gt;Solution: C. O(n log n)&lt;br /&gt;&lt;br /&gt;12.Suppose you are given a sorted list of N elements followed by f(N) randomly ordered elements.How would you sort the entire list if&lt;br /&gt;* A. f(N)=O(1)&lt;br /&gt;* B. f(N)=O(logN)&lt;br /&gt;* C. f(N)=O(N^1/2)&lt;br /&gt;* D. How large can f(N) be for the entire list still to be sortable in O(N) time?&lt;br /&gt;Solution:&lt;br /&gt;A. f(N)=O(1) In this case insertion sort would be the best ,giving the time complexity of O(N)&lt;br /&gt;&lt;br /&gt;B. f(N)=O(log N) Merge sort is the best option with a time complexity of O(N)&lt;br /&gt;&lt;br /&gt;C.f(N)=O(N^1/2) Merge sort is the best option with a time complexity of O(N)&lt;br /&gt;&lt;br /&gt;D.complexity = f(N)log f(N) + N +f(N)&lt;br /&gt;Clearly f(N) is O(N) for the complexity to be of O(N)&lt;br /&gt;&lt;br /&gt;Now O(N) is an over estimate on the upper bound of f(N) ,which is quite clear from the first term in the above expression.&lt;br /&gt;&lt;br /&gt;Now let f(N) is of the form k.N^(1/p ).Then with some simplification we get&lt;br /&gt;&lt;br /&gt;f(N)log(f(N)) is O(N ^(2/p)) and now to restrict the whole expression to O(N)&lt;br /&gt;we need to restrict p to p &gt;= 2&lt;br /&gt;&lt;br /&gt;But f(N)is O(N^(1/p)) which means f(N) can at most be of size N^1/2 .&lt;br /&gt;&lt;br /&gt;13.Prove that any algorithm that find an element X in a sorted list of N elements requires Omega(log N) comparisons.&lt;br /&gt;&lt;br /&gt;Solution:The search essentially becomes a search for X in a binary decision tree and this requires Omega(log N) comparisons.&lt;br /&gt;&lt;br /&gt;14.Prove that sorting N elements with integer keys in the range 1 &lt; Key &lt; M&lt;br /&gt;takes O(M + N) time using bucket sort.&lt;br /&gt;&lt;br /&gt;Solution: Putting the elements in to their corresponding buckets is of O(N).Then iteration of the buckets and printing the corresponding keys as many times as their frequency is of O(M+N).Hence the total complexity.&lt;br /&gt;&lt;br /&gt;15.Suppose you have an array of N elements,containing only 2 distinct keys, true and false.Give an O(N) algorithm to sort the array.&lt;br /&gt;&lt;br /&gt;Solution:Use bucket sort with 2 buckets.&lt;br /&gt;&lt;br /&gt;16.Prove that any comparison based algorithm to sort 4 elements requires at least 3 comparisons and at the max comparisons&lt;br /&gt;Solution:The binary decision tree has maximum distance of 3 and a maximum distance of 5 ,from the root to the leaf.As each edge corresponds to a comparison,we need minimum of 3 and maximum of 5 comparisons to sort 4 elements.&lt;br /&gt;&lt;br /&gt;17. In how many ways can 2 sorted arrays of combined size N be merged?&lt;br /&gt;Solution:Still up for debate.Any answers? :)&lt;br /&gt;&lt;br /&gt;18.Show that binary insertion may reasonably be expected to be an O(n log n) sort.&lt;br /&gt;Solution:Binary insertion sort employs binary search to find the right place to insert new elements, and therefore performs ceil (log(n!)) comparisons in the worst case, which is Θ(n log n). The algorithm as a whole still takes Θ(n2) time on average due to the series of swaps required for each insertion, and since it always uses binary search, the best case is no longer Ω(n) but Ω(n log n).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;19.You are given two sets of numbers Xi and Yj , where i and j run from 1 to N.&lt;br /&gt;Devise an algorithm to find the M largest values of Xi −Yj . This algorithm should&lt;br /&gt;not be quadratic in N, though it is permitted to be quadratic in M.&lt;br /&gt;You should regard N as being of the order of 20,000 and M as being of the order&lt;br /&gt;of 1,000.&lt;br /&gt;Solution:Use an order-statistic algorithm to find the Mth largest number in X,partition around that number and sort the M largest numbers.Repeat this for Y but sorting the M smallest numbers.This can be done in O(N+M log(M))Now with each of these sub-arrays having M elements,find the difference between each element of X and Y.We have M difference elements for each Xi in sorted order and in total M^2 differences.Use merge sort repeatedly to merge these portions .This is of complexity M^2.Hence the procedure.&lt;br /&gt;&lt;br /&gt;20.If 1024 numbers are drawn randomly in the range 0–127 and sorted by binary&lt;br /&gt;insertion, about how many compares would you expect?&lt;br /&gt;Solution:We have 3 comparisons coming in to the picture a&lt;b, a&gt;b, a=b.The overall number of comparisons won't change and it is still of the O(N log N). strictly speaking log(N!) comparisons.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-4574453912531753315?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/4574453912531753315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=4574453912531753315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4574453912531753315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4574453912531753315'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/some-basic-questions-on-sorting-and.html' title='Some Basic Questions on sorting and their solutions'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8926530713586864326</id><published>2008-07-24T07:50:00.000-07:00</published><updated>2008-07-24T07:51:01.596-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>Resume Tips</title><content type='html'>&lt;a href=""&gt;Resume is a very important document. The HR will have only your resume to understand your skills. Whatever pre screening happens will be at the resume level itself. Now a days no HR has the time to invite all the applicants to identify the skill set personally. So the Resume becomes vital.&lt;br /&gt;&lt;br /&gt;1: Prepare your own Resume: This will enable you to understand what you have mentioned in the resume. You will have more confidence to answer the questions.&lt;br /&gt;&lt;br /&gt;2: Mention only what ever you are totally confident about. The HR will identify any one topic in your resume and ask you the full details on the same topic.&lt;br /&gt;&lt;br /&gt;3:If you have mentioned any project details in your resume, take enough time to understand your strength on the methodology involved in the project from the scratch to the finish.&lt;br /&gt;&lt;br /&gt;4: Do not forget to mention the full details of your academics from High school to the last qualification with all details like year, subjects, division and percentage of marks.&lt;br /&gt;&lt;br /&gt;5: Do not hesitate to mention any additional information which may not be relevant to the academics.Somethings like NCC, study trips sports etc.&lt;br /&gt;&lt;br /&gt;6: It is very important to have good hobbies. Even if you don’t, better late than never. Start cultivating good hobbies like reading, journals relating to IT AND ITES, Internet browsing in terms of getting updated with current affairs of IT companies, reading good English novels to improve English speaking skills etc. Because, your hobbies reflect your time management skills, your approach towards career and life and your tastes in life.&lt;br /&gt;&lt;br /&gt;7: Prepare your resume as and when you need it. Do not prepare a common resume for all the companies. If you have varied skills in different technologies, Prioritize the respective company’s requirement first.&lt;br /&gt;&lt;br /&gt;8: Before you apply to a company go to their web site and understand full information available.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DONTS&lt;br /&gt;&lt;br /&gt;1. Do not mention a telephone number to which you don’t have an access or which is Not working&lt;br /&gt;&lt;br /&gt;2. Do not mention a mail id which is not working.&lt;br /&gt;&lt;br /&gt;3. Do not fake your experience. If you are a fresher, wait for the companies to look for Freshers and hit the bull’s eye. There are lot of companies which look for freshers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Covering letter.&lt;br /&gt;&lt;br /&gt;Write the covering letter first and then the resume. Because, you must prepare a letter in such a way that the reader gets curious about you and in such a way that generates some interest about you.&lt;br /&gt;&lt;br /&gt;In the covering letter you must address to HR, Name of the company correct address and the post applied for in the right field.In the matter you give a brief introduction&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8926530713586864326?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8926530713586864326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8926530713586864326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8926530713586864326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8926530713586864326'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/resume-tips.html' title='Resume Tips'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-2541019299479315278</id><published>2008-07-24T07:49:00.001-07:00</published><updated>2008-07-24T07:49:57.119-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>Secrets of a Selling Resume</title><content type='html'>&lt;a href=""&gt;Your resume is one of your most important initial job search tools. It is the key to getting an interview and opening the door to the job you want.&lt;br /&gt;&lt;br /&gt;Your resume is your advertisement. It promotes you by highlighting your skills, accomplishments, attributes and key capabilities in clear, concise and compelling statements. There are varying opinions among professionals as to what constitutes a persuasive resume. Although there is no one right way of creating a resume, there are some key strategies you can follow to effectively communicate your value. Doing so will convince an employer that you can make a contribution to the organization and its goals.&lt;br /&gt;&lt;br /&gt;Successful resumes have two key elements:&lt;br /&gt;&lt;br /&gt;They include an employer-centered objective, which gives them direction.&lt;br /&gt;They show evidence that you have the necessary background to do the job.&lt;br /&gt;&lt;br /&gt;The Objective&lt;br /&gt;&lt;br /&gt;Your objective is a short and realistic statement of interest, and it indicates the type of position you are seeking. It can be a list of functions you wish to perform, or can be a professional title such as "Structural Engineer" or "Software Development Intern" at XYZ Company. Often, the problem with objectives is that they are either too broad or too narrow. To avoid this pitfall, develop a targeted and balanced objective; e.g., "Pursuing a research and development position in chemical engineering." Include the job title and the name of the organization if you know them; e.g., "Seeking a position as an Electronic Systems Design Engineer at The Aerospace Corporation."&lt;br /&gt;&lt;br /&gt;You should have a variety of objectives that you can use to tailor your resume. In fact, you'll probably have several different resumes because you'll want to emphasize your skills and experience differently depending on the type of position for which you're applying. Chances are that you have the skills to work in various environments and jobs-there may be multiple industries were you could pursue job opportunities. At some point in your career, you may decide to change fields altogether. The years of work experience you have in an unrelated field can definitely apply to another field.&lt;br /&gt;&lt;br /&gt;Skills can easily transfer from one position to the next. For example, if you have worked in retail, your communication and organizational skills are applicable in any number of positions and industries. Highlighting and including transferable skills in your resume is a great way to market your value to a potential employer.&lt;br /&gt;&lt;br /&gt;The Body of Your Resume&lt;br /&gt;&lt;br /&gt;Your resume should feature information that highlights your qualifications and supports your objective. Provide specific examples of your accomplishments, skills and results.&lt;br /&gt;&lt;br /&gt;Organize your resume according to categories or headings that best reflect your level of experience and background. Here are some examples of resume headings:&lt;br /&gt;&lt;br /&gt;   1. Objective&lt;br /&gt;   2. Education&lt;br /&gt;   3. Related Course Work&lt;br /&gt;   4. Projects&lt;br /&gt;   5. Experience Skills&lt;br /&gt;   6. Activities&lt;br /&gt;   7. Awards/Honors&lt;br /&gt;   8. Related Experience&lt;br /&gt;   9. Other Employment&lt;br /&gt;  10. Military Experience&lt;br /&gt;  11. Volunteer Work&lt;br /&gt;  12. Community Service&lt;br /&gt;  13. Employment Summary&lt;br /&gt;  14. Accomplishments Summary of Qualifications Leadership Activities&lt;br /&gt;  15. Affiliations Publications&lt;br /&gt;  16. Presentations&lt;br /&gt;  17. Certification/Licensure &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that the bold headings on the list are generally the standard choices if you are seeking internship, co-op, summer or entry-level career positions. Refer to the sample resumes on page 36 for specific examples on how to build content within various headings.&lt;br /&gt;&lt;br /&gt;Adding Muscle to Your Resume&lt;br /&gt;&lt;br /&gt;It is a good idea to get your resume critiqued by a career services professional before you send it to employers. This service is available through nearly every campus career office. Here are some tips recommended by career counselors:&lt;br /&gt;&lt;br /&gt;   1. Start sentences with "power verbs".&lt;br /&gt;   2. Use present tense action words to describe current or in-progress experiences, and past tense action words to describe completed tasks.&lt;br /&gt;   3. Include keywords and descriptive words. Keywords may include job titles, specific technical or non-technical skills, personal traits, academic degrees, occupational functions and so on. If specific words and skills are emphasized in the job description, be sure to include them on your resume.&lt;br /&gt;   4. Quantify results whenever possible. Be specific in your descriptions. For example, if you helped process efficiency by 15%, state that.&lt;br /&gt;   5. Tailor your resume by changing the order of your headings to emphasize or deemphasize different aspects of your education and experience.&lt;br /&gt;   6. Position the most relevant information near the top of your resume.&lt;br /&gt;   7. Limit your resume to one page. The most powerful and memorable advertisements are 30 seconds long.&lt;br /&gt;   8. Create accomplishment statements versus a "laundry list" of tasks. Provide results whenever possible.&lt;br /&gt;   9. Avoid resume killers-grammatical, punctuation and typographical errors, and excessive abbreviations. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Electronic Resume Strategies&lt;br /&gt;&lt;br /&gt;Many organizations use electronic systems to store and access applicants' resumes. When you forward your resume via snail mail, fax, email or online application/resume template, it will most likely become a part of the organization's electronic resume bank.&lt;br /&gt;&lt;br /&gt;At the heart of your electronic resume building strategy are keywords. These commonly used industry-specific terms will help catch the attention of resume screening software programs. To maximize your chances of being selected by the organization's "electronic eye," your resume needs a mix of keywords and skills that match various position requirements included in the employer's database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Scanner Tips&lt;br /&gt;&lt;br /&gt;If you know that a prospective employer will use scanning technology on your hard-copy resume, use the following guidelines: Choose a font that's easy to read and professional looking, such as Times New Roman or Arial.&lt;br /&gt;&lt;br /&gt;Keep your font size between 11 and 14 points, and don't compress spaces between letters.&lt;br /&gt;Use white, standard-sized 81/2ý x 11ý paper printed on one side only.&lt;br /&gt;Do not use italic text, script, underlined passages, tab indents or resume templates.&lt;br /&gt;Avoid graphics, shading and boxes.&lt;br /&gt;If your scan-able resume is longer than one page, place your name as the first readable item on each page.&lt;br /&gt;Make everything on the page left-justified.&lt;br /&gt;Use ALL CAPS to distinguish your name or section headers.&lt;br /&gt;&lt;br /&gt;Tips for Electronic Resume Transmittals&lt;br /&gt;&lt;br /&gt;Many organizations specify how they prefer to receive electronic resumes-you should follow those instructions. In other words, if a company requests that applicants paste a resume into an email cover letter, do so. The safest way to send your resume via email is to save it as a plain text document. Do not attach a word-processed version of your resume to an email message-you could unknowingly have a virus on your computer and pass it along to a potential employer. You can, however, save your resume as a PDF and attach it to an emailed cover letter. The PDF format doesn't support viruses. Also, virtually every employer can open a PDF file. Here are some more tips: Emphasize key items of your resume with asterisks (*) or capital letters instead of bold type, italics or bullets. These elements don't carry over to a text document.Use a series of dashes to separate headings.Keep lines at about 65 characters to avoid line wraps.&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-2541019299479315278?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/2541019299479315278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=2541019299479315278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2541019299479315278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2541019299479315278'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/secrets-of-selling-resume.html' title='Secrets of a Selling Resume'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-1894340992388677043</id><published>2008-07-24T07:48:00.001-07:00</published><updated>2008-07-24T07:48:59.533-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>The Three R's of Resume Writing</title><content type='html'>&lt;a href=""&gt;Research The Company&lt;br /&gt;&lt;br /&gt;Read whatever literature the company has placed in the career library. For additional information, try the Internet or, even more directly, call the company. Ask for any literature it may have, find out how the company is structured, and ask what qualities the company generally looks for in its employees. Ask if there are openings in your area, and find out the name of the department head and give him or her a call. Explain that you are trying to decide whether to apply to their company, and ask for their recommendation for next steps. Thank that person for the information, and ask to whom your resume should be directed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Research the position.&lt;br /&gt;&lt;br /&gt;The more you know about the position, the better able you will be to sell yourself and to target the resume to that position. If possible, interview someone who does that same job. In addition to finding out the duties, ask if there is on-the-job training, whether they value education over experience (or vice versa), and what kind of turnover the department experiences. Ask what they like about the position and the company; more important, ask what they don't like about it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Research yourself.&lt;br /&gt;&lt;br /&gt;Your goal is not just to get a job. Your goal is to get a job that you will enjoy. After you find out all you can about the company and the position, ask yourself honestly whether this is what you really want to do and where you really want to be. The odds are overwhelming that you will not hold this position for more than two or three years, so it's not a lifetime commitment; however, this first job will be the base of your lifetime career. You must start successfully so that future recommendations will always be positive. Furthermore, three years is a long time to spend doing something you don't like, working in a position that isn't challenging, or living somewhere you don't want to live.&lt;br /&gt;&lt;br /&gt;Once you have done this research, you will sell yourself more effectively. Most employers devote an average of 15 to 30 seconds to each one, so it is your responsibility to make it attractive, readable and informational. One last word of advice: Before you go to the interview, review the version of your resume that you submitted to this employer. The resume can only get you the interview; the interview gets you the job.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-1894340992388677043?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/1894340992388677043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=1894340992388677043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1894340992388677043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/1894340992388677043'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/three-rs-of-resume-writing.html' title='The Three R&apos;s of Resume Writing'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8160383507243150605</id><published>2008-07-24T07:46:00.000-07:00</published><updated>2008-07-24T07:47:57.692-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>Top Ten Pitfalls of a Resume</title><content type='html'>&lt;a href=""&gt;   1.  Too long. Most new graduates should restrict their resumes to one page. If you have trouble condensing, get help from a technical or business writer or a career center professional.&lt;br /&gt;&lt;br /&gt;   2. Typographical, grammatical or spelling errors. These errors suggest carelessness, poor education and/or lack of intelligence. Have at least two people proofread your resume. Don't rely on a computer's spell-checkers or grammar-checkers.&lt;br /&gt;&lt;br /&gt;   3. Hard to read. A poorly typed or copied resume looks unprofessional. Use a computer. Use a plain typeface, no smaller than a 12-point font. Asterisks, bullets, underlining, boldface type and italics should be used only to make the document easier to read, not fancier. Again, ask a professional's opinion.&lt;br /&gt;&lt;br /&gt;   4. Too verbose (using too many words to say too little). Do not use complete sentences or paragraphs. Say as much as possible with as few words as possible. A, an and the can almost always be left out. Be careful in your use of jargon and avoid slang.&lt;br /&gt;&lt;br /&gt;   5. Too sparse. Give more than the bare essentials, especially when describing related work experience, skills, accomplishments, activities, interests and club memberships that will give employers desired information. Including membership in the Society of Women Engineers, for example, would be helpful to employers who wish to hire more women, yet cannot ask for that information.&lt;br /&gt;&lt;br /&gt;   6. Irrelevant information. Customize each resume to each position you seek (when possible). Of course, include all education and work experience, but emphasize only relevant experience, skills, accomplishments, activities and hobbies. Do not include marital status, age, sex, children, height, weight, health, church membership, etc.&lt;br /&gt;&lt;br /&gt;   7. Obviously generic. Too many resumes scream, "I need a job—any job!" The employer needs to feel that you are interested in that position with that company.&lt;br /&gt;&lt;br /&gt;   8. Too snazzy. Of course, use good quality bond paper, but avoid exotic types, colored paper, photographs, binders and graphics. More and more companies are scanning resumes into a database, so use white paper, black ink, plain type, and avoid symbols, underlining or italics.&lt;br /&gt;&lt;br /&gt;   9. Boring. Make your resume as dynamic as possible. Begin every statement with an action verb. Use active verbs, describing what you accomplished on the job. Don't write what someone else told you to do; write what you did. Take advantage of your rich vocabulary and avoid repeating words, especially the first word in a section.&lt;br /&gt;&lt;br /&gt;  10. Too modest. The resume showcases your qualifications in competition with the other applicants. Put your best foot forward without misrepresentation, falsification or arrogance.&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8160383507243150605?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8160383507243150605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8160383507243150605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8160383507243150605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8160383507243150605'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/top-ten-pitfalls-of-resume.html' title='Top Ten Pitfalls of a Resume'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-2206095917096329304</id><published>2008-07-24T07:43:00.000-07:00</published><updated>2008-07-24T07:46:45.127-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>Ten Tips for Writing Better Resumes</title><content type='html'>&lt;a href=""&gt;&lt;br /&gt;About to enter the job market? Have you spruced up your resume? If not, start working on it. In fact, keep an updated copy whether or not you are looking for a job, so that you are always prepared when the right opportunity comes along. Before you begin work on your résumé, remember: its sole purpose is to get you a job interview. An excellent resume is necessary to make a good first impression. Conversely, a bad résumé will eliminate you from the race, even if you have great qualifications.&lt;br /&gt;&lt;br /&gt;From my experience, which is corroborated by technical managers at other firms, most people tend to ignore the basics of a resume, which costs them the job interview. Also, since it is a reflection of your skills and personality, each resume is a unique document. What's common between different resumes are the basics, on which this article focuses. In addition to the information given here, you will need to work on a one-on-one basis with a professional, friend, or even your manager to fine-tune your resume. And once you have a killer résumé, don't forget to update it frequently. It is, after all, a work-in-progress document. The tips in this article were compiled from the author's extensive recruiting experiences at his company along with feedback from hiring managers at other high-tech companies.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. USE ATTRACTIVE FORMATTING&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Five minutes. That's all you have to grab the reader's attention and market yourself effectively. You can achieve this with attractive formatting.&lt;br /&gt;&lt;br /&gt;The key is to have a good balance of white space and text. Your résumé should not look empty, nor should it overwhelm the reader with text. Keep margins of at least 1" on all sides (some companies may still keep your résumé "on file" i.e. in three-ring binders). Make the résumé readable by using a minimum of a 10-point font for text and 11-point for headings. Use, at most, three levels of formatting (normal text, bold, and italics) or else it will distract the reader. Remember, although you want to get the reader's attention, do so with communicative titles and descriptions rather than with fancy fonts and graphics.&lt;br /&gt;&lt;br /&gt;A badly formatted résumé will look sloppy. If you submit such a document, you might as well forget about the interview.&lt;br /&gt;&lt;br /&gt;2. COVER THE BASICS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The key point here is to not complicate matters for the reader. They should be able to obtain all pertinent information about you without moving from their chair (yes, it sounds ludicrous, but that's how it needs to be). So, make sure that your résumé contains the following information.&lt;br /&gt;&lt;br /&gt;    * Contact Information like name, address, phone/fax numbers, and email address.&lt;br /&gt;    * Objective. A single statement should sum up your goals.&lt;br /&gt;    * Education. If you've graduated recently and want to highlight it, place education before the experience and skills section and list your coursework. List GPAs only if they are good. Education should always be listed in reverse chronological order. Assuming that you have an undergraduate degree, do not list your high school education since it is irrelevant.&lt;br /&gt;    * Work Experience. Again, this must be listed in reverse chronological order, and must include the company title, location, timeframe of work there, responsibilities and projects. More on this later.&lt;br /&gt;    * Publications, Patents, and Awards. List these or anything else that is relevant to your job function in this section. If you have many publications and patents, consider listing them on a separate page and attach it to your résumé.&lt;br /&gt;    * Computer Skills. This section can include hardware, software, programming language, and operating system experience. It's not necessary to include everything, but do make sure you list a few critical items which can be caught by résumé tracking software.&lt;br /&gt;    * Other Skills and Activities. This section can be used to show that you are a well-rounded individual. It can include membership in industry-related societies. Keep it short, general, and avoid controversial hobbies or pastimes.&lt;br /&gt;&lt;br /&gt;If you have many years of experience, you can also provide a summary of your skills before the "Experience" and "Education" sections.&lt;br /&gt;&lt;br /&gt;I've seen many résumés where people forgot to list their phone numbers, had glaring holes in their work experience and schooling, or did not mention their objective. Such deficiencies raise questions in the mind of the reader, and make his or her life more difficult by asking them to find information. Do you really want to do that, especially when there are hundreds of people applying for the same job?&lt;br /&gt;&lt;br /&gt;3. BE CONCISE AND COMMUNICATE RELEVANT INFORMATION&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the high-tech world, it is likely that managers who appreciate brevity will evaluate your résumé. So, keep the length in check. Follow the general rule of the thumb, one page for every eight years of experience. Also, don't repeat information.&lt;br /&gt;&lt;br /&gt;However, do not err on the side of extreme conciseness. The goal is to communicate your experience and separate yourself from the competition. Consider the following examples of information that is too concise, appropriate, and too detailed.&lt;br /&gt;&lt;br /&gt;"Designed a K6 motherboard for a sub-$1000 PC"&lt;br /&gt;—Too concise. Does not convey details of critical components, nor does it discuss applications.&lt;br /&gt;&lt;br /&gt;"Designed a motherboard using the K6 processor, 430TX chipset and associated peripherals. Target applications were sub-$1000 PCs. To lower cost, graphics acceleration was integrated on-board."&lt;br /&gt;—Appropriate. Discusses critical components, architecture, and applications.&lt;br /&gt;&lt;br /&gt;"Designed a motherboard using the K6 processor, 430TX chipset, Ultra-I/O controller, SDRAM, 512 KB of cache memory, clock generator, PCI and ISA slots, and a graphics accelerator with 4MB of memory on board. The system was targeted at sub-$1000 PCs being manufactured by various large computer makers in the US, Europe, and Asia."&lt;br /&gt;—Too long. Details that can be discussed in the interview are presented here. The statement about computer makers is irrelevant.&lt;br /&gt;&lt;br /&gt;4. USE ACTION AND POWER WORDS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It is important that you use action words that convey activity. In the previous examples, the sentence could just as easily have begun with "Worked on a motherboard..." However, beginning the sentence with "Designed a motherboard..." eliminates ambiguity and conveys action.&lt;br /&gt;&lt;br /&gt;A conscious effort must be made to use action and power words in your résumé. The types of words you can use depend on the job function. If you are applying for a management position, then use words like "Managed, supervised, led," etc. If you are applying for an engineering position, then incorporate words such as "Designed, developed, debugged," etc. A list of action words can be available through online thesauruses, reference books on résumé writing, and even paper manufacturing companies. Remember, it is also important to communicate teamwork and leadership qualities, especially if you are applying for a managerial position.&lt;br /&gt;&lt;br /&gt;I've noticed that many Indians do not use action and power words when writing résumés. This is probably a cultural trait, since we're taught to understate our achievements and write in passive tense. Eliminate this habit when writing résumés.&lt;br /&gt;&lt;br /&gt;5. BE FAMILIAR WITH THE INFORMATION&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;An interviewer does not want to hear "Well, I worked on that project a long time ago and so I cannot answer your question." This is unacceptable and you have just shot yourself in the foot. If you are not familiar with the material, it conveys that either you did not do the work, or that you forget easily and cannot leverage off past experience, or that you have prepared poorly for the interview. Bottom line, either exclude such information from your résumé, or familiarize yourself with it.&lt;br /&gt;&lt;br /&gt;6. BE CONSISTENT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It's fine to be creative, but consistency plays a far more important role. It conveys a logical and organized thought process and leaves a positive impression in the engineering-centric high-tech world. Here's an example of consistency: When providing a summary of your accomplishments, begin each line item with an action word, as shown below by the underlined text.&lt;br /&gt;&lt;br /&gt;    * Created and executed strategy to triple product line revenues in two years.&lt;br /&gt;    * Defined and developed four product families encompassing over 30 devices to meet revenue goals.&lt;br /&gt;    * Wrote all product data sheets and collateral for these 30 products.&lt;br /&gt;&lt;br /&gt;Another example is to consistently stay in third person rather than shifting between first and third person in the document. Please refrain from using "I" in your résumé.&lt;br /&gt;&lt;br /&gt;A general rule of the thumb is that each section of the résumé should have subsections that look very similar. For example, if your "Work Experience" section contains a paragraph on responsibilities, followed by subsections on major projects and accomplishments, it should be the same for every employer.&lt;br /&gt;&lt;br /&gt;Different sections should resemble each other in terms of formatting, to ensure that information can be located easily.&lt;br /&gt;&lt;br /&gt;7. DON'T LIE&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You will be caught. Enough said.&lt;br /&gt;&lt;br /&gt;8. BE BUZZWORD COMPLIANT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Since screening is routinely performed by software, you must use buzzwords on your résumé. Don't enumerate everything in your repertoire, but do list basic skills that are necessary for the job, or are currently in demand. Obviously, include these abilities only if you possess them.&lt;br /&gt;&lt;br /&gt;9. PERFORM SPELLING AND GRAMMAR CHECKS&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Most good interviewers do not accept more than three minor mistakes in a résumé, since it indicates your inability to perform high-quality work. Hence, after you have completed your résumé, check for spelling and grammar errors. All word processing packages include tools to do the same, so that's going to be your first level check. Additionally, have someone proof read the document to catch errors missed by the software.&lt;br /&gt;&lt;br /&gt;Some common errors that I have see on résumés are: random double spaces between words, two periods at the end of a sentence, misspelling your University or company name, missing prepositions in a sentence, and a lack of commas in a long sentence.&lt;br /&gt;&lt;br /&gt;10. CUSTOMIZE YOUR RESUME&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One résumé does not fit all. It's okay to customize the résumé based on the job requirements. Customization sells your skills more effectively and results in more job interviews for you.&lt;br /&gt;&lt;br /&gt;When applying for the job, don't forget the cover letter. The purpose of this document is to augment your résumé's critical sections (i.e. those that are applicable to the target job). The maximum length of a cover letter is one-half of a page, ideally separated into three paragraphs. The first tells the reader how you heard of the job, the second discusses your relevant skills, and the third tells the reader why you are a great fit. It goes without saying that a cover letter must be concise.&lt;br /&gt;&lt;br /&gt;Since email is now very popular, a short cover letter can be written in the text of the email. However, email does raise the question of how to submit your résumé. In this case, the fundamental rules always apply: follow the company directions, and if they don't specify, ask. If you get no response, use the default, which is a text email with a Word attachment.&lt;br /&gt;&lt;br /&gt;If you feel the need to work with a résumé professional, there are many online providers of résumé writing and reviewing services. Select one that has experience in your field of work, and understands your requirements well. But remember, only you are responsible for the contents, look, and feel of your résumé, and you should treat it with the utmost importance. This article has provided you with some basic tips on how to write better résumés, and for those of you who need more information, "additional information is available upon request."&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-2206095917096329304?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/2206095917096329304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=2206095917096329304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2206095917096329304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/2206095917096329304'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/ten-tips-for-writing-better-resumes.html' title='Ten Tips for Writing Better Resumes'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8190734340155360499</id><published>2008-07-24T07:42:00.000-07:00</published><updated>2008-07-24T07:43:51.436-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>Frequently Asked Questions - Object oriented Concepts</title><content type='html'>&lt;a href=""&gt; * How do you write a program which produces its own source code as its output?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I find the day of the week given the date?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Why doesn't C have nested functions?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the most efficient way to count the number of bits which are set in a value?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I convert integers to binary or hexadecimal?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I call a function, given its name as a string?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How do I access command-line arguments?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I return multiple values from a function?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I invoke another program from within a C program?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I access memory located at a certain address?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I allocate arrays or structures bigger than 64K?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I find out how much memory is available?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I read a directory in a C program?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I increase the allowable number of simultaneously open files?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What's wrong with the call "fopen("c:\newdir\file.dat", "r")"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the output of printf("%d")&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What will happen if I say delete this&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference between "C structure" and "C++ structure".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Diffrence between a "assignment operator" and a "copy constructor"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between "overloading" and "overridding"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Explain the need for "Virtual Destructor".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Can we have "Virtual Constructors"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the different types of polymorphism?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are Virtual Functions? How to implement virtual functions in "C"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the different types of Storage classes?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is Namespace?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the types of STL containers?.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference between "vector" and "array"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How to write a program such that it will delete itself after exectution?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Can we generate a C++ source code from the binary file?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are inline functions?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Talk sometiming about profiling?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How many lines of code you have written for a single program?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is "strstream" ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How to write Multithreaded applications using C++?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Explain "passing by value", "passing by pointer" and "passing by reference"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write any small program that will compile in "C" but not in "C++"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Have you heard of "mutable" keyword?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a "RTTI"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Is there something that I can do in C and not in C++?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Why preincrement operator is faster than postincrement?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between "calloc" and "malloc"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is Memory Alignment?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Explain working of printf.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference between "printf" and "sprintf".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is "map" in STL?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* When shall I use Multiple Inheritance?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the techniques you use for debugging?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How to reduce a final size of executable?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Give 2 examples of a code optimization.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is inheritance?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference between Composition and Aggregation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference: Sequence Diagrams, Collaboration Diagrams.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference: 'uses', 'extends', 'includes'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What shall I go for Package Diagram?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is Polymorphism?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Is class an Object? Is object a class?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Comment: C++ "includes" behavior and java "imports"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What do you mean by "Realization"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a Presistent, Transient Object?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the use of Operator Overloading?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Does UML guarantee project success?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference: Activity Diagram and Sequence Diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is association?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How to resolve many to many relationship?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How do you represent static members and abstract classes in Class Diagram?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What does static variable mean?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a pointer?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a structure?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the differences between structures and arrays?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* In header files whether functions are declared or defined?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the differences between malloc() and calloc()?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are macros? what are its advantages and disadvantages?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference between pass by reference and pass by value?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is static identifier?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Where are the auto variables stored?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Where does global, static, local, register variables, free memory and C Program instructions get stored?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference between arrays and linked list?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are enumerations?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Describe about storage allocation and scope of global, extern, static, local and register variables?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are register variables? What are the advantage of using register variables?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the use of typedef?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Can we specify variable field width in a scanf() format string? If possible how?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Out of fgets() and gets() which function is safe to use and why?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference between strdup and strcpy?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is recursion?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Differentiate between a for loop and a while loop? What are it uses?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the different storage classes in C?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is difference between Structure and Unions?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What the advantages of using Unions?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the advantages of using pointers in a program?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between Strings and Arrays?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* In a header file whether functions are declared or defined?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a far pointer? where we use it?&lt;br /&gt;&lt;br /&gt;&lt;br /&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;br /&gt;&lt;br /&gt;* what is a NULL Pointer? Whether it is same as an uninitialized pointer?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What does the error 'Null Pointer Assignment' mean and what causes this error?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is near, far and huge pointers? How many bytes are occupied by them?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would you obtain segment and offset addresses from a far address of a memory location?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Are the expressions arr and &amp;arr same for an array of integers?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Does mentioning the array name gives the base address in all the contexts?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Explain one method to process an entire string as one unit?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the similarity between a Structure, Union and enumeration?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Can a Structure contain a Pointer to itself?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can we check whether the contents of two structure variables are same or not?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How are Structure passing and returning implemented by the complier?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can we read/write Structures from/to data files?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between an enumeration and a set of pre-processor # defines?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* what do the 'c' and 'v' in argc and argv stand for?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Are the variables argc and argv are local to main?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the maximum combined length of command line arguments including the space between adjacent arguments?&lt;br /&gt;&lt;br /&gt;&lt;br /&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;br /&gt;&lt;br /&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;br /&gt;&lt;br /&gt;* What are bit fields? What is the use of bit fields in a Structure declaration?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* To which numbering system can the binary number 1101100100111100 be easily converted to?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Which bit wise operator is suitable for checking whether a particular bit is on or off?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Which bit wise operator is suitable for turning off a particular bit in a number?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Which bit wise operator is suitable for putting on a particular bit in a number?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Which bit wise operator is suitable for checking whether a particular bit is on or off?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* which one is equivalent to multiplying by 2:Left shifting a number by 1 or Left shifting an unsigned int or char by 1?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write a program to compare two strings without using the strcmp() function.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write a program to concatenate two strings.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write a program to interchange 2 variables without using the third one.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write programs for String Reversal &amp; Palindrome check&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write a program to find the Factorial of a number&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write a program to generate the Fibinocci Series&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write a program which employs Recursion&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write a program which uses Command Line Arguments&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write a program which uses functions like strcmp(), strcpy()? etc&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the advantages of using typedef in a program?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would you dynamically allocate a one-dimensional and two-dimensional array of integers?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can you increase the size of a dynamically allocated array?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can you increase the size of a statically allocated array?&lt;br /&gt;&lt;br /&gt;&lt;br /&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;br /&gt;&lt;br /&gt;* Which function should be used to free the memory allocated by calloc()?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How much maximum can you allocate in a single call to malloc()?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Can you dynamically allocate arrays in expanded memory?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is object file? How can you access object file?&lt;br /&gt;&lt;br /&gt;&lt;br /&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;br /&gt;&lt;br /&gt;* Can you write a function similar to printf()?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can a called function determine the number of arguments that have been passed to it?&lt;br /&gt;&lt;br /&gt;&lt;br /&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;br /&gt;&lt;br /&gt;* How do you declare the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* An array of three pointers to chars&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* An array of three char pointers&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* A pointer to array of three chars&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* A pointer to function which receives an int pointer and returns a float pointer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* A pointer to a function which receives nothing and returns nothing&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What do the functions atoi(), itoa() and gcvt() do?&lt;br /&gt;&lt;br /&gt;&lt;br /&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;br /&gt;&lt;br /&gt;* How would you use qsort() function to sort an array of structures?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would you use qsort() function to sort the name stored in an array of pointers to string?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would you use bsearch() function to search a name stored in array of pointers to string?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would you use the functions sin(), pow(), sqrt()?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would you use the functions memcpy(), memset(), memmove()?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would you use the functions fseek(), freed(), fwrite() and ftell()?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would you obtain the current time and difference between two times?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would you use the functions randomize() and random()?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would you implement a substr() function that extracts a sub string from a given string?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between the functions rand(), random(), srand() and randomize()?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between the functions memmove() and memcpy()?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How do you print a string on the printer?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Can you use the function fprintf() to display the output on the screen?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is an object?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between an object and a class?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between class and structure?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is public, protected, private?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are virtual functions?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is friend function?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a scope resolution operator?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What do you mean by inheritance?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is abstraction?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is polymorphism? Explain with an example.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is encapsulation?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What do you mean by binding of data and functions?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is function overloading and operator overloading?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is virtual class and friend class?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What do you mean by inline function?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What do you mean by public, private, protected and friendly?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* When is an object created and what is its lifetime?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What do you mean by multiple inheritance and multilevel inheritance? Differentiate between them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference between realloc() and free?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a template?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the main differences between procedure oriented languages and object oriented languages?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is R T T I ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are generic functions and generic classes?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is namespace?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between pass by reference and pass by value?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Why do we use virtual functions?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What do you mean by pure virtual functions?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are virtual classes?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Does c++ support multilevel and multiple inheritance?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the advantages of inheritance?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* When is a memory allocated to a class?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between declaration and definition?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is virtual constructors/destructors?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* In c++ there is only virtual destructors, no constructors. Why?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is late bound function call and early bound function call? Differentiate.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How is exception handling carried out in c++?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* When will a constructor executed?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is Dynamic Polymorphism?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Write a macro for swapping integers.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8190734340155360499?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8190734340155360499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8190734340155360499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8190734340155360499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8190734340155360499'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/frequently-asked-questions-object.html' title='Frequently Asked Questions - Object oriented Concepts'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-8572702710780268113</id><published>2008-07-24T07:41:00.000-07:00</published><updated>2008-07-24T07:42:32.626-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>Frequently Asked Questions - Operating System Concepts</title><content type='html'>&lt;a href=""&gt; * What is MUTEX ?&lt;br /&gt;&lt;br /&gt;* What isthe difference between a 'thread' and a 'process'?&lt;br /&gt;&lt;br /&gt;* What is INODE?&lt;br /&gt;&lt;br /&gt;* Explain the working of Virtual Memory.&lt;br /&gt;&lt;br /&gt;* How does Windows NT supports Multitasking?&lt;br /&gt;&lt;br /&gt;* Explain the Unix Kernel.&lt;br /&gt;&lt;br /&gt;* What is Concurrency? Expain with example Deadlock and Starvation.&lt;br /&gt;&lt;br /&gt;* What are your solution strategies for "Dining Philosophers Problem" ?&lt;br /&gt;&lt;br /&gt;* Explain Memory Partitioning, Paging, Segmentation.&lt;br /&gt;&lt;br /&gt;* Explain Scheduling.&lt;br /&gt;&lt;br /&gt;* Operating System Security.&lt;br /&gt;&lt;br /&gt;* What is Semaphore?&lt;br /&gt;&lt;br /&gt;* Explain the following file systems : NTFS, Macintosh(HPFS), FAT .&lt;br /&gt;&lt;br /&gt;* What are the different process states?&lt;br /&gt;&lt;br /&gt;* What is Marshalling?&lt;br /&gt;&lt;br /&gt;* Define and explain COM?&lt;br /&gt;&lt;br /&gt;* What is Marshalling?&lt;br /&gt;&lt;br /&gt;* Difference - Loading and Linking ?&lt;br /&gt;&lt;br /&gt;* What are the basic functions of an operating system?&lt;br /&gt;&lt;br /&gt;* Explain briefly about, processor, assembler, compiler, loader, linker and the functions executed by them.&lt;br /&gt;&lt;br /&gt;* What are the difference phases of software development? Explain briefly?&lt;br /&gt;&lt;br /&gt;* Differentiate between RAM and ROM?&lt;br /&gt;&lt;br /&gt;* What is DRAM? In which form does it store data?&lt;br /&gt;&lt;br /&gt;* What is cache memory?&lt;br /&gt;&lt;br /&gt;* What is hard disk and what is its purpose?&lt;br /&gt;&lt;br /&gt;* Differentiate between Complier and Interpreter?&lt;br /&gt;&lt;br /&gt;* What are the different tasks of Lexical analysis?&lt;br /&gt;&lt;br /&gt;* What are the different functions of Syntax phase, Sheduler?&lt;br /&gt;&lt;br /&gt;* What are the main difference between Micro-Controller and Micro-Processor?&lt;br /&gt;&lt;br /&gt;* Describe different job scheduling in operating systems.&lt;br /&gt;&lt;br /&gt;* What is a Real-Time System ?&lt;br /&gt;&lt;br /&gt;* What is the difference between Hard and Soft real-time systems ?&lt;br /&gt;&lt;br /&gt;* What is a mission critical system ?&lt;br /&gt;&lt;br /&gt;* What is the important aspect of a real-time system ?&lt;br /&gt;&lt;br /&gt;* If two processes which shares same system memory and system clock in a distributed system, What is it called?&lt;br /&gt;&lt;br /&gt;* What is the state of the processor, when a process is waiting for some event to occur?&lt;br /&gt;&lt;br /&gt;* What do you mean by deadlock?&lt;br /&gt;&lt;br /&gt;* Explain the difference between microkernel and macro kernel.&lt;br /&gt;&lt;br /&gt;* Give an example of microkernel.&lt;br /&gt;&lt;br /&gt;* When would you choose bottom up methodology?&lt;br /&gt;&lt;br /&gt;* When would you choose top down methodology?&lt;br /&gt;&lt;br /&gt;* Write a small dc shell script to find number of FF in the design.&lt;br /&gt;&lt;br /&gt;* Why paging is used ?&lt;br /&gt;&lt;br /&gt;* Which is the best page replacement algorithm and Why? How much time is spent usually in each phases and why?&lt;br /&gt;&lt;br /&gt;* Difference between Primary storage and secondary storage?&lt;br /&gt;&lt;br /&gt;* What is multi tasking, multi programming, multi threading?&lt;br /&gt;&lt;br /&gt;* Difference between multi threading and multi tasking?&lt;br /&gt;&lt;br /&gt;* What is software life cycle?&lt;br /&gt;&lt;br /&gt;* Demand paging, page faults, replacement algorithms, thrashing, etc.&lt;br /&gt;&lt;br /&gt;* Explain about paged segmentation and segment paging&lt;br /&gt;&lt;br /&gt;* While running DOS on a PC, which command would be used to duplicate the entire diskette?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-8572702710780268113?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/8572702710780268113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=8572702710780268113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8572702710780268113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/8572702710780268113'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/frequently-asked-questions-operating.html' title='Frequently Asked Questions - Operating System Concepts'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-4544961398676764240</id><published>2008-07-24T07:40:00.000-07:00</published><updated>2008-07-24T07:41:31.806-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>Frequently Asked Questions - Database</title><content type='html'>&lt;a href=""&gt; * What are the different types of joins?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Explain normalization with examples.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What cursor type do you use to retrieve multiple recordsets?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Diffrence between a "where" clause and a "having" clause&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between "procedure" and "function"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How will you copy the structure of a table without copying the data?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How to find out the database name from SQL*PLUS command prompt?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Tadeoffs with having indexes&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Talk about "Exception Handling" in PL/SQL?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the diference between "NULL in C" and "NULL in Oracle?"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is Pro*C? What is OCI?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Give some examples of Analytical functions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between "translate" and "replace"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is DYNAMIC SQL method 4?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How to remove duplicate records from a table?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the use of ANALYZing the tables?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How to run SQL script from a Unix Shell?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a "transaction"? Why are they necessary?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Explain Normalizationa dn Denormalization with examples.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* When do you get contraint violtaion? What are the types of constraints?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How to convert RAW datatype into TEXT?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference - Primary Key and Aggregate Key&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How functional dependency is related to database table design?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a "trigger"?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Why can a "group by" or "order by" clause be expensive to process?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are "HINTS"? What is "index covering" of a query?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a VIEW? How to get script for a view?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are the Large object types suported by Oracle?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is SQL*Loader?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference between "VARCHAR" and "VARCHAR2" datatypes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference among "dropping a table", "truncating a table" and "deleting all records" from a table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Difference between "ORACLE" and "MICROSOFT ACCESS" databases.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How to create a database link&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-4544961398676764240?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/4544961398676764240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=4544961398676764240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4544961398676764240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/4544961398676764240'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/frequently-asked-questions-database.html' title='Frequently Asked Questions - Database'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-6848689481650365186</id><published>2008-07-24T07:25:00.000-07:00</published><updated>2008-07-24T07:28:50.914-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>Frequently Asked Questions - Networking</title><content type='html'>&lt;a href=""&gt; * User(s) are complaining of delays when using the network. What would you do?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are some of the problems associated with operating a switched LAN?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Name some of the ways of combining TCP/IP traffic and SNA traffic over the same link.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What sort of cabling is suitable for Fast Ethernet protocols?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a Class D IP address?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Why do I sometimes lose a server's address when using more than one server?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is Firewall?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How do I monitor the activity of sockets?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How would I put my socket in non-blocking mode?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What are RAW sockets?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the role of TCP protocol and IP protocol.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is UDP?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I make my server a daemon?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How should I choose a port number for my server?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Layers in TCP/IP&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How can I be sure that a UDP message is received?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How to get IP header of a UDP message&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Writing UDP/SOCK_DGRAM applications&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How many bytes in an IPX network address?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the difference between MUTEX and Semaphore?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is priority inversion?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Different Solutions to dining philosophers problem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is a message queue?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Questions on Shared Memory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is DHCP?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Working of ping, telnet, gopher.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Can I connect two computers to internet using same line ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Why networks are layered ? What is the advantage of that ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* How many layers are there in OSI ? Why is it called OSI model ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* network topologies ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Which are the different network toplogies ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* an example of bus type network.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the Bandwidth of ethernet ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Explain the advantage and disadvantage of ethernet ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Which is the protocol used in ethernet. (CSMA/CD) Why is it called so ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* What is the advantage of Ring network ?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Compare it with ethernet.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3578123614327069913-6848689481650365186?l=interviewsea.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewsea.blogspot.com/feeds/6848689481650365186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3578123614327069913&amp;postID=6848689481650365186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6848689481650365186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3578123614327069913/posts/default/6848689481650365186'/><link rel='alternate' type='text/html' href='http://interviewsea.blogspot.com/2008/07/frequently-asked-questions-networking.html' title='Frequently Asked Questions - Networking'/><author><name>piot</name><uri>http://www.blogger.com/profile/16596071336482756319</uri><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-3578123614327069913.post-734845532547169374</id><published>2008-07-24T07:23:00.000-07:00</published><updated>2008-07-24T07:25:15.216-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Resources'/><title type='text'>UNIX Concepts</title><content type='html'>&lt;a href=""&gt;SECTION - I&lt;br /&gt;&lt;br /&gt;FILE MANAGEMENT IN UNIX&lt;br /&gt;&lt;br /&gt;How are devices represented in UNIX?&lt;br /&gt;&lt;br /&gt;All devices are represented by files called special files that are located in/dev directory. Thus, device files and other files are named and accessed in the same way. A 'regular file' is just an ordinary data file in the disk. A 'block special file' represents a device with characteristics similar to a disk (data transfer in terms of blocks). A 'character special file' represents a device with characteristics similar to a keyboard (data transfer is by stream of bits in sequential order).&lt;br /&gt;&lt;br /&gt;2.What is 'inode'?&lt;br /&gt;&lt;br /&gt;All UNIX files have its description stored in a structure called 'inode'. The inode contains info about the file-size, its location, time of last access, time of last modification, permission and so on. Directories are also represented as files and have an associated inode. In addition to descriptions about the file, the inode contains pointers to the data blocks of the file. If the file is large, inode has indirect pointer to a block of pointers to additional data blocks (this further aggregates for larger files). A block is typically 8k.&lt;br /&gt;&lt;br /&gt;Inode consists of the following fields:&lt;br /&gt;&lt;br /&gt;File owner identifier&lt;br /&gt;File type&lt;br /&gt;File access permissions&lt;br /&gt;File access times&lt;br /&gt;Number of links&lt;br /&gt;File size&lt;br /&gt;Location of the file data&lt;br /&gt;&lt;br /&gt;3 .Brief about the directory representation in UNIX&lt;br /&gt;&lt;br /&gt;A Unix directory is a file containing a correspondence between filenames and inodes. A directory is a special file that the kernel maintains. Only kernel modifies directories, but processes can read directories. The contents of a directory are a list of filename and inode number pairs. When new directories are created, kernel makes two entries named '.' (refers to the directory itself) and '..' (refers to parent directory).&lt;br /&gt;System call for creating directory is mkdir (pathname, mode).&lt;br /&gt;&lt;br /&gt;4. What are the Unix system calls for I/O?&lt;br /&gt;&lt;br /&gt;open(pathname,flag,mode) - open file&lt;br /&gt;creat(pathname,mode) - create file&lt;br /&gt;close(filedes) - close an open file&lt;br /&gt;read(filedes,buffer,bytes) - read data from an open file&lt;br /&gt;write(filedes,buffer,bytes) - write data to an open file&lt;br /&gt;lseek(filedes,offset,from) - position an open file&lt;br /&gt;dup(filedes) - duplicate an existing file descriptor&lt;br /&gt;dup2(oldfd,newfd) - duplicate to a desired file descriptor&lt;br /&gt;fcntl(filedes,cmd,arg) - change properties of an open file&lt;br /&gt;ioctl(filedes,request,arg) - change the behaviour of an open file&lt;br /&gt;The difference between fcntl anf ioctl is that the former is intended for any open file, while the latter is for device-specific operations.&lt;br /&gt;&lt;br /&gt;5.How do you change File Access Permissions?&lt;br /&gt;&lt;br /&gt;Every file has following attributes:&lt;br /&gt;owner's user ID ( 16 bit integer )&lt;br /&gt;owner's group ID ( 16 bit integer )&lt;br /&gt;File access mode word&lt;br /&gt;'r w x -r w x- r w x'&lt;br /&gt;(user permission-group permission-others permission)&lt;br /&gt;r-read, w-write, x-execute&lt;br /&gt;To change the access mode, we use chmod(filename,mode).&lt;br /&gt;Example 1:&lt;br /&gt;To change mode of myfile to 'rw-rw-r--' (ie. read, write permission for user - read,write permission for group - only read permission for others) we give the args as:&lt;br /&gt;chmod(myfile,0664) .&lt;br /&gt;Each operation is represented by discrete values&lt;br /&gt;'r' is 4&lt;br /&gt;'w' is 2&lt;br /&gt;'x' is 1&lt;br /&gt;Therefore, for 'rw' the value is 6(4+2).&lt;br /&gt;Example 2:&lt;br /&gt;To change mode of myfile to 'rwxr--r--' we give the args as:&lt;br /&gt;chmod(myfile,0744).&lt;br /&gt;&lt;br /&gt;What are links and symbolic links in UNIX file system?&lt;br /&gt;&lt;br /&gt;A link is a second name (not a file) for a file. Links can be used to assign more than one name to a file, but cannot be used to assign a directory more than one name or link filenames on different computers.&lt;br /&gt;Symbolic link 'is' a file that only contains the name of another file.Operation on the symbolic link is directed to the file pointed by the it.Both the limitations of links are eliminated in symbolic links.&lt;br /&gt;Commands for linking files are:&lt;br /&gt;Link ln filename1 filename2&lt;br /&gt;Symbolic link ln -s filename1 filename2&lt;br /&gt;&lt;br /&gt;What is a FIFO?&lt;br /&gt;&lt;br /&gt;FIFO are otherwise called as 'named pipes'. FIFO (first-in-first-out) is a special file which is said to be data transient. Once data is read from named pipe, it cannot be read again. Also, data can be read only in the order written. It is used in interprocess communication where a process writes to one end of the pipe (producer) and the other reads from the other end (consumer).&lt;br /&gt;&lt;br /&gt;How do you create special files like named pipes and device files?&lt;br /&gt;&lt;br /&gt;The system call mknod creates special files in the following sequence.&lt;br /&gt;kernel assigns new inode,&lt;br /&gt;sets the file type to indicate that the file is a pipe, directory or special file,&lt;br /&gt;If it is a device file, it makes the other entries like major, minor device numbers.&lt;br /&gt;For example:&lt;br /&gt;If the device is a disk, major device number refers to the disk controller and minor device number is the disk.&lt;br /&gt;&lt;br /&gt;Discuss the mount and unmount system calls&lt;br /&gt;&lt;br /&gt;The privileged mount system call is used to attach a file system to a directory of another file system; the unmount system call detaches a file system. When you mount another file system on to your directory, you are essentially splicing one directory tree onto a branch in another directory tree. The first argument to mount call is the mount point, that is , a directory in the current file naming system. The second argument is the file system to mount to that point. When you insert a cdrom to your unix system's drive, the file system in the cdrom automatically mounts to /dev/cdrom in your system.&lt;br /&gt;&lt;br /&gt;How does the inode map to data block of a file?&lt;br /&gt;&lt;br /&gt;Inode has 13 block addresses. The first 10 are direct block addresses of the first 10 data blocks in the file. The 11th address points to a one-level index block. The 12th address points to a two-level (double in-direction) index block. The 13th address points to a three-level(triple in-direction)index block. This provides a very large maximum file size with efficient access to large files, but also small files are accessed directly in one disk read.&lt;br /&gt;&lt;br /&gt;What is a shell?&lt;br /&gt;&lt;br /&gt;A shell is an interactive user interface to an operating system services that allows an user to enter commands as character strings or through a graphical user interface. The shell converts them to system calls to the OS or forks off a process to execute the command. System call results and other information from the OS are presented to the user through an interactive interface. Commonly used shells are sh,csh,ks etc.&lt;br /&gt;&lt;br /&gt;SECTION - II&lt;br /&gt;PROCESS MODEL and IPC&lt;br /&gt;&lt;br /&gt;1. Brief about the initial process sequence while the system boots up.&lt;br /&gt;&lt;br /&gt;While booting, special process called the 'swapper' or 'scheduler' is created with Process-ID 0. The swapper manages memory allocation for processes and influences CPU allocation. The swapper inturn creates 3 children:&lt;br /&gt;the process dispatcher,&lt;br /&gt;vhand and&lt;br /&gt;dbflush&lt;br /&gt;with IDs 1,2 and 3 respectively.&lt;br /&gt;This is done by executing the file /etc/init. Process dispatcher gives birth to the shell. Unix keeps track of all the processes in an internal data structure called the Process Table (listing command is ps -el).&lt;br /&gt;&lt;br /&gt;2. What are various IDs associated with a process?&lt;br /&gt;&lt;br /&gt;Unix identifies each process with a unique integer called ProcessID. The process that executes the request for creation of a process is called the 'parent process' whose PID is 'Parent Process ID'. Every process is associated with a particular user called the 'owner' who has privileges over the process. The identification for the user is 'UserID'. Owner is the user who executes the process. Process also has 'Effective User ID' which determines the access privileges for accessing resources like files.&lt;br /&gt;getpid() -process id&lt;br /&gt;getppid() -parent process id&lt;br /&gt;getuid() -user id&lt;br /&gt;geteuid() -effective user id&lt;br /&gt;&lt;br /&gt;3. Explain fork() system call.&lt;br /&gt;&lt;br /&gt;The `fork()' used to create a new process from an existing process. The new process is called the child process, and the existing process is called the parent. We can tell which is which by checking the return value from `fork()'. The parent gets the child's pid returned to him, but the child gets 0 returned to him.&lt;br /&gt;&lt;br /&gt;4. Predict the output of the following program code&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;fork();&lt;br /&gt;printf("Hello World!");&lt;br /&gt;}&lt;br /&gt;Answer:&lt;br /&gt;Hello World!Hello World!&lt;br /&gt;Explanation:&lt;br /&gt;The fork creates a child that is a duplicate of the parent process. The child begins from the fork().All the statements after the call to fork() will be executed twice.(once by the parent process and other by child). The statement before fork() is executed only by the parent process.&lt;br /&gt;&lt;br /&gt;5. Predict the output of the following program code&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;fork(); fork(); fork();&lt;br /&gt;printf("Hello World!");&lt;br /&gt;}&lt;br /&gt;Answer:&lt;br /&gt;"Hello World" will be printed 8 times.&lt;br /&gt;Explanation:&lt;br /&gt;2^n times where n is the number of calls to fork()&lt;br /&gt;&lt;br /&gt;6. List the system calls used for process management:&lt;br /&gt;&lt;br /&gt;System calls Description&lt;br /&gt;fork() To create a new process&lt;br /&gt;exec() To execute a new program in a process&lt;br /&gt;wait() To wait until a created process completes its execution&lt;br /&gt;exit() To exit from a process execution&lt;br /&gt;getpid() To get a process identifier of the current process&lt;br /&gt;getppid() To get parent process identifier&lt;br /&gt;nice() To bias the existing priority of a process&lt;br /&gt;brk() To increase/decrease the data segment size of a process&lt;br /&gt;&lt;br /&gt;7. How can you get/set an environment variable from a program?&lt;br /&gt;&lt;br /&gt;Getting the value of an environment variable is done by using `getenv()'.&lt;br /&gt;Setting the value of an environment variable is done by using `putenv()'.&lt;br /&gt;&lt;br /&gt;8. How can a parent and child process communicate?&lt;br /&gt;&lt;br /&gt;A parent and child can communicate through any of the normal in
