<?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-9088987006789845123</id><updated>2012-02-17T07:53:18.948+05:30</updated><category term='VBScript'/><category term='.Net Platform'/><category term='FMS Mock Test'/><category term='Teradata'/><category term='disco file'/><category term='hcl placement papers'/><category term='permission set'/><category term='college students'/><category term='Microprocessor Interview Questions'/><category term='ADO.NET Dataset'/><category term='Basic shell scripting questions and answers'/><category term='Report Generation'/><category term='Interview Questions'/><category term='Jagged Arrays'/><category term='Resume Preparation Guidelines'/><category term='MCSD'/><category term='Assembly manifest'/><category term='portable executable (PE)'/><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='Page Loading Process'/><category term='EnableViewState'/><category term='Top .Net class'/><category term='XSL'/><category term='webfarm'/><category term='OOPs'/><category term='Object Oriented system design'/><category term='reasoning verbal questions'/><category term='Exams'/><category term='Linux command line Q A interview questions'/><category term='ABAP reporting'/><category term='SAP BDC'/><category term='management schools'/><category term='Load Runner Interview Questions'/><category term='VBA'/><category term='Application_Start'/><category term='Runtime Callable Wrappers(RCW)'/><category term='ASP.net Application and Session Events'/><category term='constructor Interview Questions'/><category term='cts interview questions'/><category term='Dataset'/><category term='Bank Probationary Officers’ Aptitude Test'/><category term='Web user controls'/><category term='DB'/><category term='Tutor interview questions'/><category term='Test Director interview questions'/><category term='Quick Test Professional questions'/><category term='sealed classes'/><category term='CAT'/><category term='Garbage Collection'/><category term='IBM interview questions'/><category term='Interview helper'/><category term='fresher'/><category term='USA visa'/><category term='Enginerring test'/><category term='OSI'/><category term='Wipro Interview Questions'/><category term='.NET Languages'/><category term='Operating system Job  Interview Questions'/><category term='IT interview Question Papers'/><category term='Namespaces'/><category term='Postback'/><category term='C language'/><category term='Teacher Interview Questions'/><category term='JSP interview questions'/><category term='Career Advice'/><category term='.Net'/><category term='wipro placement papers'/><category term='MessageBox'/><category term='GATE entrance exam questions'/><category term='.Net CONST vs READONLY'/><category term='ASP.NET WebService'/><category term='serialization'/><category term='job interview questions and answers'/><category term='Interview'/><category term='ASP.NET Role-Based security'/><category term='group discussion iim'/><category term='C++ interview questions'/><category term='C interview Questions'/><category term='Features of .Net Framework'/><category term='c++ source code'/><category term='OOPS concepts'/><category term='ASP.NET Webservice and Remoting'/><category term='c++ example programs'/><category term='Interviews'/><category term='Finance Interview Questions'/><category term='Resume creator'/><category term='SSL'/><category term='SAP Basis'/><category term='Shares'/><category term='OOAD'/><category term='Costing'/><category term='Manual testing Interview Questions'/><category term='.net framework'/><category term='Sharepoint Portal Interview Questions'/><category term='virtual method'/><category term='Delegate'/><category term='.net Interview Questions'/><category term='Unix Interview Questions'/><category term='Informatica'/><category term='1st Normal Form'/><category term='SAP ADM325'/><category term='Jobs'/><category term='common c++ interview questions'/><category term='UDDI'/><category term='Open Source'/><category term='Technical Question'/><category term='Managed'/><category term='cat questions'/><category term='PHP'/><category term='C# constructor'/><category term='Hotel Management Questions'/><category term='Software process'/><category term='namespace'/><category term='SQL Optimization Interview Questions'/><category term='Visual Basic Interview Questions'/><category term='CTS'/><category term='Job Interview Questions'/><category term='Global Assembly Cache'/><category term='JAVA  Interview Questions'/><category term='Memory Allocation'/><category term='Oracle Questions'/><category term='com+ services'/><category term='FMS'/><category term='.NET Assembly'/><category term='DWH'/><category term='Full Duplex'/><category term='Mainframes'/><category term='Pinvoke'/><category term='ASP Session and ASP.NET Session'/><category term='Interview Concepts'/><category term='B.Ed GK Questions'/><category term='singleton and singlecall'/><category term='C'/><category term='PL/SQL'/><category term='ADSL'/><category term='iim'/><category term='wsdl tool'/><category term='SBI BANK PO Questions'/><category term='Tata Consultancy Services'/><category term='Cobol Interview Questions'/><category term='HR Interview Questions'/><category term='SAP R/3 Release 4 - BA4x'/><category term='infosys interview questions'/><category term='Data Reader'/><category term='Resume Helper'/><category term='.NET Basic Terminology'/><category term='Lease of Object'/><category term='Bank PO Important Dates in history'/><category term='ABAP interview Questions'/><category term='indexers'/><category term='IP'/><category term='Interop Services'/><category term='ACID'/><category term='smart navigation'/><category term='IBM GLOBAL SERVICES'/><category term='C++ programming Interview Questions on UNIX'/><category term='WindowsDefaultLocation'/><category term='IGRP'/><category term='.Net SWindows Process'/><category term='formula list CAT'/><category term='Accounting'/><category term='asax'/><category term='XML'/><category term='CLS'/><category term='Hub'/><category term='managed and unmanaged code'/><category term='basic c++ interview questions'/><category term='remotable objects'/><category term='Visa Stamping'/><category term='Unboxing'/><category term='Testing Interview questions'/><category term='Ping'/><category term='DB2'/><category term='data island'/><category term='solaris interviews'/><category term='asp net interview questions'/><category term='gd'/><category term='SAP Reporting'/><category term='C++ Algorithm Interview Questions and Answers'/><category term='role of HTTP'/><category term='Data Providers'/><category term='COM Job Interview Questions'/><category term='Networking Interview Questions'/><category term='Advantages in IIS'/><category term='SAP ADM100'/><category term='Technical Interview Questions'/><category term='AS/400 Interview Questions'/><category term='COM/DCOM'/><category term='excel VBA Interview Questions'/><category term='Job interview Question'/><category term='nmake tool'/><category term='ContextUtil'/><category term='Engineering entrance test'/><category term='CCW (COM Callable Wrapper)'/><category term='IIS authentication modes'/><category term='Method Overriding'/><category term='TCP/IP'/><category term='authentication modes'/><category term='Competition exam'/><category term='assembly'/><category term='internship'/><category term='types of assemblies'/><category term='overriding'/><category term='Oracle9i'/><category term='SBI BANK PO Numerical Ability Questions'/><category term='Microsoft Interview Questions'/><category term='XmlSerializer'/><category term='Routers'/><category term='070-316'/><category term='Component Services'/><category term='Boxing'/><category term='engineering students'/><category term='cat papers'/><category term='secure a web service'/><category term='TCS'/><category term='SAP Transactions'/><category term='IIS Interview Questions'/><category term='COM+'/><category term='System.String vs System.StringBuilder classes'/><category term='cisco questions'/><category term='GATE'/><category term='Hash Table'/><category term='.Net Move and LocationChanged'/><category term='method overloading'/><category term='Asp interview questions'/><category term='ADO'/><category term='DataReader and DataAdapter'/><category term='LoadRunner Interview Questions'/><category term='assert'/><category term='WindowsDefaultBounds'/><category term='Deterministic Destruction'/><category term='LAMP'/><category term='OLEDB Provider and SqlClient'/><category term='Webservices Interview Questions'/><category term='common entrance test'/><category term='cts placement papers'/><category term='VB Interview questions'/><category term='c#  Parameters'/><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='IBM Test 000-285'/><category term='view state'/><category term='Portal server'/><category term='javascript interview questions'/><category term='switch statements'/><category term='VB'/><category term='Quantitative Interview Questions'/><category term='ASP.NET Garbage Collection'/><category term='Inline Code'/><category term='SOAP'/><category term='ADO Recordset'/><category term='Interview Questions and Answers'/><category term='Win Runner QA Part 1'/><category term='Project Management Interview Questions'/><category term='Value type Vs reference types'/><category term='H1B Visa'/><category term='Portfolio Management'/><category term='AutoEventWireup attribute'/><category term='Finalize and Dispose'/><category term='intervew questions'/><category term='C++ Object-Oriented Interview Questions And Answers'/><category term='WildCard Character'/><category term='Array and Arraylist'/><category term='b.ed questions'/><category term='Class and Constructor'/><category term='Accounting Interview Questions'/><category term='Bank PO Important Abbreviations'/><category term='Application Domain'/><category term='Host'/><category term='object pooling and connection pooling'/><category term='VB.net Interview Questions'/><category term='Risk Management'/><category term='Debug Class Vs Trace Class'/><category term='SQL Injection'/><category term='SQL Indexes'/><category term='ADO.Net. Database Connectivity'/><category term='override method'/><category term='interview questions java'/><category term='Java Interview Questions'/><category term='interview preparation'/><category term='CAO and SAO'/><category term='Managed Execution Process'/><category term='threading'/><category term='Satellite Assemblies'/><category term='System Engineers'/><category term='pie chart in asp.net'/><category term='IPV4'/><category term='DataInstance'/><category term='database interview questions'/><category term='Flex'/><category term='MSIL'/><category term='Finalize'/><category term='Class Sorted List'/><category term='Tree View Control'/><category term='solaris'/><category term='diffgram'/><category term='Struct Vs Class'/><category term='Bank PO General Knowledge Questions'/><category term='C++ Networking Interview Questions and Answers'/><category term='C# Unit Testing'/><category term='Common Law Admission Test'/><category term='Resume'/><category term='directive vs using statement'/><category term='authentication'/><category term='BANK PO NUMERICAL ABILITY Questions'/><category term='python interview questions'/><category term='Server-side and Client-side code'/><category term='PHP Job interview Questions'/><category term='.Net Remoting'/><category term='satellite assembly'/><category term='Destructor and finalize'/><category term='Six Sigma'/><category term='Oracle Interview Questions'/><category term='.Net Windows Forms'/><category term='webservice'/><category term='VB.net'/><category term='ADO.net Interview Questions'/><category term='IIS log files'/><category term='multiple inheritance'/><category term='COM .Net'/><category term='Polymorphism'/><category term='H1 B Visa Interview Questions'/><category term='c++ programming interview questions'/><category term='3rd Normal Form'/><category term='SQL Server Stored Procedures'/><category term='Class Hierarchy'/><category term='RCW'/><category term='Mainframe Interview Questions'/><category term='infosys placement papers'/><category term='C# access-specifiers'/><category term='Cisco Interview Questions'/><category term='Unix'/><category term='Datareader'/><category term='Salary Negotiation'/><category term='WinRunner Interview Questions'/><category term='Custom attribute'/><category term='WAN'/><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='Mock'/><category term='Bank PO Reasoning verbal'/><category term='Oracle'/><category term='cookie less session'/><category term='C# Commnets'/><category term='Shared and Static variables'/><category term='LAN'/><category term='interface'/><category term='Interface Vs Abstract Class'/><category term='MTU'/><category term='Protected and protected internal access-specifier'/><category term='JIT'/><category term='ca'/><category term='Bioinformatics Interview Questions'/><category term='SQL Server interview questions'/><category term='Basic .net Framework'/><category term='Negotiation'/><category term='Trade Offs'/><category term='CIDR'/><category term='static constructor'/><category term='learning'/><category term='Menu Designer'/><category term='teaching questions'/><category term='Event - Delegate'/><category term='Investment Banking'/><category term='Code Access Security (CAS)'/><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='.net remoting and channels'/><category term='name collisions'/><category term='constructors'/><category term='iim questions'/><category term='JDBC'/><category term='Class level variables'/><category term='Reflection'/><category term='IL'/><category term='Software Testing interview questions'/><category term='TCS Interview Papers'/><category term='Technical and Quantitative Interview Questions'/><category term='SAP TADM12'/><category term='Database'/><category term='Active Directory'/><category term='Linux'/><category term='ABAP'/><category term='Namespace for webservice'/><category term='Campus interview'/><category term='Data Warehousing'/><category term='Encapsulation'/><category term='SQL Views'/><category term='CMMI'/><category term='CCNA Certification Dumps'/><category term='Interview Help'/><category term='java job interview questions'/><category term='gk questions'/><category term='C Questions'/><category term='ASP.NET 3.0 Interview Questions'/><category term='Oracle8'/><category term='DNS'/><category term='JSP'/><category term='SQL'/><category term='Broadcast'/><category term='xaml interview questions'/><category term='Dispose Method'/><category term='CMC Interview Questions'/><category term='CCNA Interview Questions'/><category term='non-rectangular window'/><category term='Switch'/><category term='Protected internal'/><category term='SAP R/3 Interactive Reporting'/><category term='XAT'/><category term='c#'/><category term='OS interview Questions'/><category term='How to prepare for an interview'/><category term='Try Catch Finally'/><category term='Points to remmeber'/><category term='assembly versioning'/><category term='DOM'/><category term='formatter'/><category term='ActiveX'/><category term='DSL'/><category term='infosys test paper'/><category term='PO Questions'/><category term='Asset Management Interview Questions'/><category term='B.Ed Abbreviation Questions'/><category term='cognizant'/><category term='ContextUtil class'/><category term='garbage collection algorithm'/><category term='Interview tips'/><category term='Examination'/><category term='Trace Switcher'/><category term='web.config'/><category term='abstract class Vs interface'/><category term='C# Interview Questions'/><category term='hcl interview questions'/><category term='CDMA'/><category term='SQL Triggers'/><category term='dataset.clone and dataset.copy'/><category term='Behavioral  Interview Questions'/><category term='goto statement'/><category term='SAP Windows NT'/><category term='c programming interview questions'/><category term='salary'/><category term='Solaris interview questions and answers'/><category term='SAX'/><category term='.Net COM'/><category term='management questions'/><category term='interface class'/><category term='freshers'/><category term='CET'/><category term='subnet'/><category term='c++ faq'/><category term='SQL Transactions'/><category term='QA interview questions'/><category term='trace utility'/><category term='DBA'/><category term='CCW'/><category term='SAP Logical Database'/><category term='ASP.net'/><category term='Money market'/><category term='windows authentication'/><category term='2nd Normal Form'/><category term='HR Questions'/><category term='SAP R/3 ARCHITECTURE Interview Questions'/><category term='GSM'/><category term='proxy'/><category term='connizant'/><category term='State Management'/><category term='JAVA'/><category term='asynchronous'/><category term='law interview questions'/><category term='ASP.NET Last Error Occurred'/><category term='IIS Isolation Levels'/><category term='J2ME interview questions'/><category term='ASP.net interview questions'/><category term='Strong Name'/><category term='validator'/><category term='3G'/><category term='Garbage Collector'/><category term='SQL Admin Interview Questions'/><category term='C++'/><category term='law questions'/><category term='WSDL'/><category term='Semester'/><category term='exception handling'/><category term='Business Objects'/><category term='Visual Basic'/><category term='Server.Transfer and Response.Redirect'/><category term='Basics of project management'/><category term='assembly manifest and metadata'/><category term='SQL Trigger Interview Questions'/><category term='DataAdapter'/><category term='point-to-point'/><category term='first version of .NET . .NET Tools'/><category term='Bank PO General Knowledge Test'/><category term='bluetooth interview questions'/><category term='current affair questions'/><category term='instance constructor'/><category term='ajax'/><category term='Win Runner QA'/><category term='QTP interview questions'/><category term='.Net DLL'/><category term='CAT mocks'/><category term='SQL View Interview Questions'/><category term='LAMP interview questions'/><category term='Caching'/><category term='Global ASA(X)'/><category term='Delegates'/><category term='Single Call'/><category term='BO'/><category term='bubble event'/><category term='clr'/><category term='Anchoring and Docking'/><category term='Viewstate'/><category term='Technical Interview'/><category term='private assembly and a shared assembly'/><category term='employer interview questions'/><category term='C interview Question'/><category term='J2EE  Interview Questions'/><category term='SAP4 Basis'/><category term='control and component'/><category term='abstract classes'/><title type='text'>Job Interview Questions - www.interviewhelper.org</title><subtitle type='html'>www.interviewhelper.org is a hope for all the Job seekers. Users can find unlimited here. These range from technical to HR, from functional to behavioral. www.interviewhelper.org contains in the fields like Ajax,VB,Networking,Sharepoint,JEE,Perl,Javascript,Bioinformatics,Classic ASP,Unix,Linux,Accounting,Oracle DBA,Microprocessor,Bluetooth,jms,jme,.net framework,ABAP,ASP,ASP.net,Basic .net Framework,Interview Questions,C language,C++,database,Oracle,Java,PHP,LAMP,SAP etc.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default?start-index=101&amp;max-results=100'/><author><name>Gaurav Nanda</name><uri>http://www.blogger.com/profile/12749165288430220644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-khyRnS2mxTM/ThobrakPsPI/AAAAAAAAI4M/3JvTEZ9X5X4/s220/gn.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1289</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9088987006789845123.post-8830166363840080622</id><published>2010-05-07T00:32:00.003+05:30</published><updated>2010-05-07T00:50:11.786+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='xaml interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 3.0 Interview Questions'/><title type='text'>ASP.NET 3.0 Interview Questions</title><content type='html'>&lt;span style="color: rgb(102, 255, 255);"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;ASP.NET 3.0 Interview Questions&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;What is the Windows Presentation Foundation? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Windows Presentation Foundation is the unified presentation subsystem for Windows. It consists of a display engine and a managed-code framework. The Windows Presentation Foundation unifies how Windows creates, displays, and manipulates documents, media, and user interface, which enables developers and designers to create visually-stunning, differentiated user experiences that improve customer connection. When it ships, scheduled for 2006, the Windows Presentation Foundation will be available on Windows XP, Windows Server 2003 and all future releases of the Windows operating system. When delivered, the Windows Presentation Foundation will become Microsoft’s strategic user interface technology.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What is the Windows Communication Foundation?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Windows Communication Foundation is a set of technologies for building and running connected systems.&lt;br /&gt;The Windows Communication Foundation is a new breed of communications infrastructure built around the Web services architecture. Advanced Web services support in the Windows Communication Foundation provides secure, reliable, and transacted messaging along with interoperability. The Windows Communication Foundation’s service-oriented programming model is built on the .NET Framework and simplifies development of connected systems. The Windows Communication Foundation unifies a broad array of distributed systems capabilities in an extensible architecture, spanning transports, security systems, messaging patterns, encodings, network topologies and hosting models. The Windows Communication Foundation will be an integral capability of Windows Vista and will also be supported on Windows XP and Windows Server 2003.&lt;br /&gt;Microsoft has also done significant work to integrate the Windows Communication Foundation with existing Microsoft technologies for building distributed systems including COM+, MSMQ, and ASP.NET Web services. Applications built with those existing technologies can now be exposed as services without modification to the application. This infrastructure-level solution greatly assists developers in exposing existing applications as services. The Windows Communication Foundation also provides simple and mechanical mechanisms to migrate applications that use .NET remoting, ASP.NET Web services, and .NET Enterprise Services to natively use the Windows Communication Foundation programming model.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Is C# used for any core features of Windows Vista?&lt;/span&gt;&lt;br /&gt;Yes, for example, much of the Windows Presentation Foundation is written using C#&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Why do we need XAML as a new way to create applications in .NET Framework 3.0 (formerly WinFX)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The new application model in Windows Vista separates out declarative code (XAML) from procedural code (C#, VB.NET, J#, etc.). One major reason for using XAML is to bridge the gap between developing an application for Microsoft Windows and developing an application for the Web.&lt;br /&gt;XAML does not give you new functionality; it is just a declarative way to instantiate and initialize Microsoft .NET objects. XAML does, however, provide you with a way to solve problems such as:&lt;br /&gt;When you write procedural code (C#, etc.) to create a number of controls, and compare that to the equivalent XAML, the XAML is more compact, less redundant, and less error-prone. Writing a designer for XAML will be a lot easier than writing a forms designer for C# or VB.NET, since the designer won’t have to do all that code parsing to figure out where to insert or change the setting of a property.&lt;br /&gt;In the real world, many customers find requests coming in at the very last minute asking for changes to the user interface—a button needs to be moved or removed or the company logo needs to appear on every window. It is especially at the end of the development process, when you think your code is “frozen” and tested, that you’d rather not have to dive into the source code and start changing things. Who knows what subtle interaction you might break? With XAML, most—if not all—of the presentation layer is in its own file, thus providing a high degree of certainty that making a user interface change in the XAML will not break business logic code.&lt;br /&gt;XAML enables professional graphic designers or user interface specialists to add beauty, style and grace to an application without modifying source files directly. Partitioning the user interface and the logic that drives it means each of us can get our job done without getting in each other’s way or having to understand the myriad details of one another’s tools.&lt;br /&gt;XAML is considerably smaller than the equivalent C# code. Since there is less code, there are fewer opportunities for errors&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt; XAML only used for quick UI prototyping?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;XAML will be used for production work, not just for prototyping. Specifically, localizing your application or ensuring that it is accessible—common for most applications today—will be a lot more work if you build your own user interface from code instead of using XAML&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Can XAML replace other programming languages like C# and VB?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No. XAML complements procedural languages, much the same way HTML complements ECMAScript. You can very quickly declare how you want your user interface to look with XAML, then use a language like C# to define the business logic behind that user interface&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Can XAML be used to develop both Web and client-server applications?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;XAML is used as part of Windows Presentation Foundation to write smart client applications that take advantage of the power of the PC and benefit from all of the power of the CLR. For Windows Presentation Foundation applications, the logic runs on the client, unlike ASP.NET, which processes on the server. ASP.NET continues to be the answer to producing powerful Web applications that take advantage of the benefits of the CLR on the server&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What is NET Framework 3.0 ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;NET Framework 3.0 is the managed-code programming model for Windows, starting with Windows Vista. NET Framework 3.0 is a superset of the .NET Framework, designed to expose the new functionality in Windows Vista to the developer through managed classes. If you know how to write managed code on the .NET Framework today, NET Framework 3.0 will be familiar to you. Put another way, at PDC 2000, Microsoft debuted the .NET Framework, which introduced a new managed programming model on top of our existing Windows operating systems. With Windows Vista and NET Framework 3.0, we’re keeping that managed programming model while building new core parts of the operating system, such as moving the Windows Presentation Foundation subsystem next to GDI and User.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What is the difference between Windows Vista and .NET Framework 3.0 ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A: The .NET Framework 3.0 is a managed-code programming model, including APIs for the Windows Presentation Foundation and the Windows Communication Foundation.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Where is the new functionality in the .NET Framework 3.0 (such as WCF, WF, WPF, and CardSpace) installed to? Is that different from where the .NET Framework 2.0 is installed to?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Components shared with the .NET Framework 2.0 are installed at %windir%\Microsoft.NET\Framework\V2.0.50727. Components that are new to the .NET Framework 3.0 are installed to %windir%\Microsoft.NET\Framework\V3.0. Check out the .NET 3.0 Deployment whitepaper for more information on installation and deployment.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How large is the .NET Framework 3.0? Does this change make the release larger? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There’s no change to the size of the .NET Framework 3.0 as a result of the name change from WinFX. It is about 49Mb, and that includes the .NET Framework 2.0, which is about 22Mb.&lt;br /&gt;12.  Q: How does servicing work for the .NET Framework 3.0? If I install the .NET Framework 3.0, can I get service updates for the .NET Framework 2.0?&lt;br /&gt;Servicing will be available for the .NET Framework 2.0 components as long both it and the operating system it is installed on are still in service. Any service updates for the .NET Framework 2.0 will work for the 2.0 components installed as a part of the .NET Framework 3.0 as well.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What operating systems will the .NET Framework 3.0 be available for? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The .NET Framework 3.0 will be available for and supported on Windows Vista, Windows Server 2003 (SP1), Windows Server 2003 SP2, and Windows XP (SP2).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;When will the .NET Framework 3.0 be released?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The .NET Framework 3.0 is included as part of Windows Vista, and customers who get Windows Vista will receive the .NET Framework 3.0. The first release of Windows Vista to business customers is currently planned for November 2006, although the final date will depend on customer feedback.&lt;br /&gt;At the same time, we will make the .NET Framework 3.0 broadly available for download to all customers using Windows XP and Windows Server 2003.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does the .NET Framework 3.0 relate to Windows Vista?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The .NET Framework 3.0 is a core component of the Windows Vista operating system, and is installed by default on Windows Vista. It will also be available for Windows XP and Windows Server 2003.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Are there any parts of the .NET Framework 3.0 that only work on Windows Vista?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Though there are some optimizations in the .NET Framework 3.0 that take advantage of new functionality in Windows Vista, we’ve striven to provide a consistent experience for the .NET Framework 3.0 across Windows Vista, Windows Server 2003, and Windows XP.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Why is the .NET Framework 3.0 a major version number of the .NET Framework if it uses the .NET Framework 2.0 runtime and compiler? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The new technologies delivered in the .NET Framework 3.0, including WCF, WF, WPF, and CardSpace, offer tremendous functionality and innovation, and we wanted to signal that with a major release number.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does “Side by Side” work for the .NET Framework 3.0? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since the .NET Framework 3.0 includes only new components that are added to the .NET Framework 2.0 and there is no overlap between the assemblies of the .NET Framework 2.0 and the .NET Framework 3.0, there’s no real “Side by Side” scenario. You can run applications based on the .NET Framework 2.0 and applications based on the .NET Framework 3.0 on the same machine.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;I’m running an application built on WinFX today. Do I need to do anything different to make it run on the .NET Framework 3.0? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No, applications running on WinFX will now run on the .NET Framework 3.0 without any changes. Of course, since the .NET Framework 3.0 is still under development, there may be changes to the framework in the future.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Can I remove particular .NET Framework 3.0 components? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No, the .NET Framework 3.0 components (WPF, WCF, WF, and CardSpace) are part of a single package, and are installed together.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Will C# 3.0, VB.NET 9.0, Atlas, or Linq be included in the .NET Framework 3.0? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No, these features are planned for future releases of the .NET Framework. The .NET Framework 3.0 includes only the technology formerly described as WinFX.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Will there be a .NET Compact Framework 3.0 release with release of .NET Framework 3.0? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No. We are currently working on developing a version of the .NET Framework 3.0 functionality that will be supported on the Compact Framework, but shipping plans and included functionality have not been announced.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What happens when I install the .NET Framework 3.0? How can I upgrade if I already have the .NET Framework 2.0 installed?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you install the .NET Framework 3.0, the installer will check to see whether you already have the .NET Framework 2.0 (released version) installed. If not, the .NET Framework 3.0 installer will install the .NET Framework 2.0 for you, and then install the new .NET Framework 3.0 components. If you do have the .NET Framework 2.0 installed, the .NET Framework 3.0&lt;br /&gt;installer will only install the new components of the .NET Framework 3.0.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;My organization went through the approval process of supporting the .NET Framework 2.0 in production. Do we need to go through the same process all over again for the .NET Framework 3.0? Do I need to do any application compatibility testing for my .NET Framework 2.0 applications?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Because the .NET Framework 3.0 only adds new components to the .NET Framework 2.0 without changing any of the components released in the .NET Framework 2.0, the applications you’ve built on the .NET Framework 2.0 will not be affected. You don’t need to do any additional testing for your .NET Framework 2.0 applications when you install the .NET Framework 3.0.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Will the name change be reflected in any of the existing .NET Framework 2.0 APIs, assemblies, or namespaces? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There will be no changes to any of the existing .NET Framework 2.0 APIs, assemblies, or namespaces. The applications that you’ve built on .NET Framework 2.0 will continue to run on the .NET Framework 3.0 just as they have before.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Which version of the Common Language Runtime (CLR) does the .NET Framework 3.0 use?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The .NET Framework 3.0 uses the 2.0 version of the CLR. With this release, the overall developer platform version has been decoupled from the core CLR engine version. We expect the lower level components of the .NET Framework such as the engine to change less than higher level APIs, and this decoupling helps retain customers’ investments in the technology.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What is the .NET Framework 3.0 (formerly WinFX)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The .NET Framework 3.0 is Microsoft’s managed code programming model. It is a superset of the .NET Framework 2.0, combining .NET Framework 2.0 components with new technologies for building applications that have visually stunning user experiences, seamless and secure communication, and the ability to model a range of business processes. In addition to the .NET Framework 2.0, it includes Windows Presentation Foundation (WPF), Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), and Windows CardSpace.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What happens to the WinFX technologies?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The WinFX technologies will now be released under the name .NET Framework 3.0. There are no changes to the WinFX technologies or ship schedule  the same technologies you’re familiar with now simply have a new name.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does the .NET Framework 3.0 relate to the .NET Framework 2.0? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The .NET Framework 3.0 is an additive release to the .NET Framework 2.0. The .NET Framework 3.0 adds four new technologies to the .NET Framework 2.0: Windows Presentation Foundation (WPF), Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), and Windows CardSpace. There are no changes to the version of the .NET Framework 2.0 components included in the .NET Framework 3.0. This means that the millions of developers who use .NET today can use the skills they already have to start building .NET Framework 3.0 applications. It also means that applications that run on the .NET Framework 2.0 today will continue to run on the .NET Framework 3.0.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt; XAML only used for quick UI prototyping?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;XAML will be used for production work, not just for prototyping. Specifically, localizing your application or ensuring that it is accessible—common for most applications today—will be a lot more work if you build your own user interface from code instead of using XAML&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt; XAML replace other programming languages like C# and VB?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No. XAML complements procedural languages, much the same way HTML complements ECMAScript. You can very quickly declare how you want your user interface to look with XAML, then use a language like C# to define the business logic behind that user interface&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Can XAML be used to develop both Web and client-server applications?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;XAML is used as part of Windows Presentation Foundation to write smart client applications that take advantage of the power of the PC and benefit from all of the power of the CLR. For Windows Presentation Foundation applications, the logic runs on the client, unlike ASP.NET, which processes on the server. ASP.NET continues to be the answer to producing powerful Web applications that take advantage of the benefits of the CLR on the server&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Why do we need XAML as a new way to create applications in .NET Framework 3.0 (formerly WinFX)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The new application model in Windows Vista separates out declarative code (XAML) from procedural code (C#, VB.NET, J#, etc.). One major reason for using XAML is to bridge the gap between developing an application for Microsoft Windows and developing an application for the Web.XAML does not give you new functionality; it is just a declarative way to instantiate and initialize Microsoft .NET objects. XAML does, however, provide you with a way to solve problems such as:&lt;br /&gt;When you write procedural code (C#, etc.) to create a number of controls, and compare that to the equivalent XAML, the XAML is more compact, less redundant, and less error-prone. Writing a designer for XAML will be a lot easier than writing a forms designer for C# or VB.NET, since the designer won’t have to do all that code parsing to figure out where to insert or change the setting of a property.&lt;br /&gt;In the real world, many customers find requests coming in at the very last minute asking for changes to the user interface—a button needs to be moved or removed or the company logo needs to appear on every window. It is especially at the end of the development process, when you think your code is “frozen” and tested, that you’d rather not have to dive into the source code and start changing things. Who knows what subtle interaction you might break? With XAML, most—if not all—of the presentation layer is in its own file, thus providing a high degree of certainty that making a user interface change in the XAML will not break business logic code.&lt;br /&gt;XAML enables professional graphic designers or user interface specialists to add beauty, style and grace to an application without modifying source files directly. Partitioning the user interface and the logic that drives it means each of us can get our job done without getting in each other’s way or having to understand the myriad details of one another’s tools.&lt;br /&gt;XAML is considerably smaller than the equivalent C# code. Since there is less code, there are fewer opportunities for errors&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Why is XAML important for the delivery of e-commerce solutions? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As plug-and-play e-commerce emerges, businesses are mixing and matching web services from multiple partners to create sophisticated business web services. Because these “business webs” are comprised of aggregated calls to loosely coupled web services distributed across the web, and provided by multiple businesses, coordination among these web services is imperative, in order to carry out business-level transactions. There needs to be the notion of a transaction at the web service level, as well as a means by which software systems can coordinate the processing of calls to multiple web services to provide higher-level business transactions.&lt;br /&gt;XAML will provide the standard mechanism to enable XML web services to participate in business transactions spanning multiple parties across the Web. Web services provide unprecedented business interoperability by enabling businesses to share processes and competencies on the web, creating a new era of business connectivity and dynamic, “plug-and-play” e-commerce.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What kind of applications will XAML enable?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As plug-and-play e-commerce emerges, businesses are mixing and matching web services from multiple partners to create sophisticated e-business applications. Because these “business webs” consist of loosely coupled web services distributed across the web from multiple businesses, coordination among these web services is imperative, in order to carry out business-level transactions. There needs to be the notion of a transaction at the web service level, as well as a means by which software systems can coordinate the processing of calls to multiple web services to provide higher-level business transactions.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Who is supporting XAML? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Bowstreet, Hewlett-Packard, IBM, Oracle and Sun are leading the XAML initiative to ensure distributed e-business transactions across the Internet. However, XAML is not owned by any one vendor. Instead, the standards proposal will be submitted to an appropriate open standards body to ensure that it remains an open industry standard in which any company and organization can participate.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does XAML relate to other Web Service standards?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order to understand how XAML relates to many of the existing standards, it is first necessary to understand what function each of these standards performs.When a web service is built, described, discovered and used, there are many elements that will be required. The combination of these many different elements is called a web services architecture. Some categories of these elements are: registries, business process modeling, negotiation, service description and web service transport protocols.&lt;br /&gt;In order to use a web service, the existence of the service must be discovered. This discovery usually takes place in a “phone book” of web services known as a registry. Registries, such as UDDI and the ebXML registry/repository, contain human readable information that can be browsed and searched to find companies and their services.&lt;br /&gt;Once a desired service is located, the terms of use can be reviewed and/or negotiated. The e-speak framework provides an elaborate negotiation mechanism. ebXML addresses the same issue through TPAML (Trading Partner Agreement Markup Language.)&lt;br /&gt;Now that you know which service you need, you still have to know some additional things before you can use the web service; where is it located, what type of input it expects, what type of output it produces, which web service protocols it uses, etc. Service description languages, such as WSDL, provide a standard mechanism to outline all these details about a web service. Typically, for publicly available web services, their service descriptions are also made publicly available. The URI of the service description can be registered with a web service in a registry.&lt;br /&gt;Once you know those details, you can start formulating a message to send to the service. However, some web services will require special packaging wrapped around the message, letting the web service know what to do with the message.&lt;br /&gt;In this situation, an underlying web service transport protocol may need to be used, which can provide: an envelope which defines what is in a message and what program should deal with it2. specific information about how to exchange instances of application-defined data-types in a serialized format (You can think of this as how the programs agree on the format of a text-based XML file to send across the internet which contains information about a relational database or other complicated data structure within an application)3. a definition of a convention that can be used to represent remote procedure calls and responses.&lt;br /&gt;XML-based web service transport protocols include: SOAP, XP (W3C XML Protocol) and ebXML Transport. Most of these web service transport protocols make use of existing protocols, such as: HTTP, SMTP, TCP, etc., to carry web service requests and responses across the internet.Another layer in the web services architecture is business process modeling. These languages define the business level descriptions of what needs to be accomplished. For example, they can describe a business scenario such as, “if a purchase order is received by my purchasing web service, the steps that need to be completed are: check inventory; if the inventory is available, ship product; if product ships, let accounting know, etc.” Business process modeling languages determine what needs to be completed and the necessary order of completion. However, they do not control nor monitor the underlying transactions themselves, where XAML is used to initiate, monitor, commit, cancel, retry, or initiate a compensating transaction.Consider this web services architecture example: A distributor of groceries needs to process an order from ACME grocery store. Included in the order is an order for 100lbs of fresh tomatoes. The grocery distributor needs to process this order. In order to fulfill this order the web services architecture will be used in a variety of ways.&lt;br /&gt;The first requirement (even before the distributor gets the order) is to discover that Johnny’s Tomato Farm and Jimmy’s Refrigerated Transport provide the necessary business services. Both services are discovered via a registry; in this case, the distributor searched several different registries.&lt;br /&gt;The second action is to make sure the distributor’s business web understands how to talk with each of these web services. This is done by downloading a service description for each of the two services. The registry entry indicated that Jimmy’s Refrigerated Transport is described as an e-speak service; whereas, Johnny’s Tomato Farm services are based solely on SOAP. An XML description is retrieved for the e-speak service and a WSDL document is retrieved for the SOAP service. Links to the service description documents were found in the registry entries.&lt;br /&gt;An additional action must also happen before the order is placed. The business process model of a purchase order must be executed. 1)check to make sure that the person ordering is authorized to order; 2)check to make sure the ordering company has paid their last invoice; and 3)proceed to order the merchandise by ensuring that both services get managed using XAML. This entire business process is defined by an ebXML business process model. Some additional models may need to be set up…. If the item is perishable, then verify the transport availability, etc.&lt;br /&gt;Now, the grocery distributor is ready for action and can accept a tomato order from ACME grocery store.&lt;br /&gt;The order from ACME grocery store is taken via the distributor’s business web, and according to the business process model, the person is authorized and the finance department gives the approval. The transaction is begun on a business level. Because Tomatoes are marked as perishable, the “perishable food” model is initiated.&lt;br /&gt;This model determines the business logic which states that transport must be arranged before tomatoes can be officially ordered. This logic is then used by the software that coordinates the calling of the relevant web services. The calling system prepares a message directed to a web service at Johnny’s Tomato Farm using SOAP, along with XAML to specify initiation of the transaction. In like manner, the system requests a web service at Jimmy’s Refrigerated Transport to supply the truck and driver, again using XAML to stage the request. Once both web services have responded confirming availability, the calling system interacts with the web services using XAML to facilitate the completion of the business process.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does XAML relate to registries (UDDI)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;UDDI defines a registry for companies and their services. In a typical scenario using UDDI, a user/program would browse through categories (like in a yellow pages) for a particular service. Once the desired XML service is found, the ’service description’ for that service can be used to retrieve the details of calling that service (see service description languages section.) The ‘service description’ (WSDL, etc), defines the semantics of calling a specific service.&lt;br /&gt;As with any other type of service, XAML services will be able to be registered and located within UDDI registries. UDDI can register XAML services.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does XAML relate to service description languages (WSDL, XMI)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Services description languages define the details that are needed to use a web service. Typically that includes: schema for the input, schema for the output, URI of the service, type of transport used (SOAP, XP, HTTP GET, …) The XAML group will consider providing binding information to service description languages.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does XAML relate to business process modeling languages (ebXML business process, BPML)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;BPML covers dimensions of business process modeling that are specific to processes internal to the enterprise, including business rules, security roles, distributed transactions, and exception handling. XAML is targeted at coordinating business transactions that span web services crossing corporate boundaries.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does XAML relate to XML-based web service transport protocols (XP, SOAP, ebXML Transport)?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;XAML is designed for the coordination of transactional web services, not XML transportation and packaging issues. XAML will work with standard XML-based service transport protocols, including W3C XML Protocol (XP), SOAP and ebXML transport protocol.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does XAML relate to ebXML?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ebXML is an OASIS/UN initiative to define all the layers in the web services stack. That includes categories such as registries, business process modeling, service descriptions, and transport/packaging/messaging. Please refer to the above explanation for details on how XAML relates to each of these categories.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does XAML relate to e-speak?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;E-speak is an open software platform designed for supporting the description, registration, and discovery of e-services, the ability to compose multiple e-services into higher-level e-services, the ability to negotiate among e-services, and the ability to manage e-service interactions. XAML will enhance the e-speak platform for the coordination and processing of online business transactions involving e-services. XAML provides e-speak with a standard set of XML message formats and interaction models for e-services to use to provide business level transactions that span across companies over the Internet.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does XAML relate to BizTalk/.NET?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;BizTalk/.Net is a Microsoft initiative to define all the layers in the web services stack. That includes four categories, registries(UDDI), business modeling languages (X-Lang), service descriptions (WSDL), and transport/packaging/messaging(SOAP). Please refer to the above explanation for details on how XAML relates to each of these categories.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What standards body will XAML be submitted to?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At this time, the XAML group has not determined which standards body is the most appropriate for XAML. However, as the specification evolves, the group will vote on an appropriate organization and submit a draft of the specification.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;How does XAML support/extend existing transaction monitors? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;XAML will enable web services to expose transactional semantics of the resources providing the services. Given that TP monitors commonly provide some of the management and coordination functions of these resources ‘behind the firewall” today, one of the goals of XAML is to enable TP monitors to participate and support the transactional semantics offered by web services. This includes passing of transaction ID’s through web service messages, and supporting the XAML web service operations of commit and cancel. At the level above individual web services, there is a new layer of software providing business-level transactions. This software makes calls to multiple web services, often spanning business boundaries. Given that XAML enables individual web services to support transactional semantics, there is also an opportunity for XAML to specify standard means for coordinating business-level transactions across collections of web services. To this end, one of the goals of XAML is to define message interfaces and interaction models that help software systems providing the business-level transactions to coordinate the interactions among web services. There is an opportunity to define XML interfaces and interaction models for a new breed of web services that would help software systems at the business transaction level. These services would provide brokering capabilities for managing the interactions among web services, for both web services supporting XAML, as well as web services that do not support XAML. This new breed of web services requires XML interfaces and interaction models that defines how software systems at the business transaction level would interact, to request assistance in shepharding a set of web services towards completion.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What is the relationship between XAML and other transaction protocols? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Classical online transaction management (OLTP) is the process of making simultaneous changes in several places “atomically” - that is, all the changes related to a transaction are made or none of the changes are made.&lt;br /&gt;For example, within a single database connection, the DBMS provides some means of demarcating the beginning and end of a transaction. This demarcation ensures that changes to the database are made atomically.  Sometimes, changes must be made atomically across multiple databases. For example, an insurance company might have to change both its claims information and its audit information at the same time, even though the audit information is in a separate database from the claims information. This multiple-database change would ensure that, during a later audit, the company would know which agent took the first report of the loss.  In this case, the existing XA (Transaction Authority) protocol is useful. XA provides a standard mechanism for coordinating changes to multiple databases (called resource managers or RMs) as an atomic unit of work. Basically, the XA protocol asks each RM to vote on whether a commit will be successful. Once an RM has voted “yes,” it must be able to commit the open unit of work without failure. The commit occurs only if all RMs vote “yes.” This process of obtaining a vote, and then performing a commit, is called a “two-phase commit.”&lt;br /&gt;Resource managers are most frequently databases, but they can also be message-oriented middleware. XA allows completely heterogeneous collections of RMs within a single transaction; for example a transaction can commit across DB/2 and Oracle at the same time. All major database vendors support XA.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What is the relationship between XAML and JTS/JTA? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;J2EE includes support for distributed transactions through two specifications, Java Transaction API (JTA) and Java Transaction Service (JTS). JTA is a high level, implementation independent, protocol independent API that allows applications to access transactions. JTS specifies the implementation of a Transaction Manager which supports JTA and implements the Java mapping of the OMG Object Transaction Service (OTS) 1.1 specification using the IIOP protocol. The JTA API allows you to demarcate transactions in a manner that is independent of the transaction manager service or JTS.&lt;br /&gt;While JTA provides an API for demarcating transactions in Java-based application logic, XAML provides an agreed upon protocol or a coordinated process of interaction among transactionally-aware web services over a defined transport. Given this, a web service internally implementing JTA could expose these transactional capabilities using XAML.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-8830166363840080622?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/8830166363840080622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=8830166363840080622&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/8830166363840080622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/8830166363840080622'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2010/05/aspnet-30-interview-questions.html' title='ASP.NET 3.0 Interview Questions'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9088987006789845123.post-3430957310126079914</id><published>2010-05-06T23:32:00.002+05:30</published><updated>2010-05-06T23:40:46.598+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++ Object-Oriented Interview Questions And Answers'/><title type='text'>C++ Object-Oriented Interview Questions And Answers</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link rel="File-List" href="file:///C:%5CUsers%5Cshivlee%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="themeData" href="file:///C:%5CUsers%5Cshivlee%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cshivlee%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-GB&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="&amp;#45;-"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:1; 	mso-generic-font-family:roman; 	mso-font-format:other; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0cm; 	margin-right:0cm; 	margin-bottom:10.0pt; 	margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} p 	{mso-style-noshow:yes; 	mso-style-priority:99; 	mso-margin-top-alt:auto; 	margin-right:0cm; 	mso-margin-bottom-alt:auto; 	margin-left:0cm; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman","serif"; 	mso-fareast-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} span.style54 	{mso-style-name:style54; 	mso-style-unhide:no;} span.answers 	{mso-style-name:answers; 	mso-style-unhide:no;} span.forquestionsblue 	{mso-style-name:for_questions_blue; 	mso-style-unhide:no;} span.style53 	{mso-style-name:style53; 	mso-style-unhide:no;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin-top:0cm; 	mso-para-margin-right:0cm; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style="line-height: normal;"&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;&lt;span style="font-size: 18pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;" lang="EN-US"&gt;C++ Object-Oriented Interview Questions And Answers&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-size: 18pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;" lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: normal; font-weight: bold;"&gt;&lt;span style="color: rgb(102, 255, 255);"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;" lang="EN-US"&gt;What is a modifier? &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;" lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: normal;"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;" lang="EN-US"&gt; A modifier, also called a modifying function is a member function that changes the value of  at least one data member. In other words, an operation that modifies the state of an object. Modifiers are also known as ‘mutators’. Example: The function mod is a modifier in the following code snippet:&lt;br /&gt;&lt;br /&gt;class test&lt;br /&gt;{&lt;br /&gt;int x,y;&lt;br /&gt;public:&lt;br /&gt;test()&lt;br /&gt;{&lt;br /&gt;x=0; y=0;&lt;br /&gt;}&lt;br /&gt;void mod()&lt;br /&gt;{&lt;br /&gt;x=10;&lt;br /&gt;y=15;&lt;br /&gt;}&lt;br /&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: normal; color: rgb(102, 255, 255);"&gt;&lt;b&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;" lang="EN-US"&gt;What is an accessor?&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;" lang="EN-US"&gt; &lt;/span&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;" lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: normal;"&gt;&lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;" lang="EN-US"&gt;&lt;span style="color: rgb(102, 255, 255);"&gt; &lt;/span&gt;An accessor is a class operation that does not modify the state of an object. The accessor functions need to be declared as const operations&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(102, 255, 255);"&gt;&lt;span class="style53"&gt;&lt;b&gt;Differentiate between a template class and class template?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;span lang="EN-US"&gt;Template class: A generic definition or a parameterized class not instantiated until the client provides the needed information. It’s jargon for plain templates. Class template: A class template specifies how individual classes can be constructed much like the way a class specifies how individual objects can be constructed. It’s jargon for plain classes. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(102, 255, 255);"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;When does a name clash occur? &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;A name clash occurs when a name is defined in more than one place. For example., two different class libraries could give two different classes the same name. If you try to use many class libraries at the same time, there is a fair chance that you will be unable to compile or link the program because of name clashes. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;&lt;span lang="EN-US"&gt;Define namespace?&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;It is a feature in C++ to minimize name collisions in the global name space. This namespace keyword assigns a distinct name to a library that allows other libraries to use the same identifier names without creating any name collisions. Furthermore, the compiler uses the namespace signature for differentiating the definitions. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is the use of ‘using’ declaration ?&lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;A using declaration makes it possible to use a name from a namespace without the scope operator. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(102, 255, 255);"&gt;&lt;b&gt;What is an Iterator class ? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;A class that is used to traverse through the objects maintained by a container class. There are five categories of iterators: input iterators, output iterators, forward iterators, bidirectional iterators, random access. An iterator is an entity that gives access to the contents of a container object without violating encapsulation constraints. Access to the contents is granted on a one-at-a-time basis in order. The order can be storage order (as in lists and queues) or some arbitrary order (as in array indices) or according to some ordering relation (as in an ordered binary tree). The iterator is a construct, which provides an interface that, when called, yields either the next element in the container, or some value denoting the fact that there are no more elements to examine. Iterators hide the details of access to and update of the elements of a container class.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;The simplest and safest iterators are those that permit read-only access to the contents of a container class.&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is an incomplete type? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;Incomplete types refers to pointers in which there is non availability of the implementation of the referenced location or it points to some location whose value is not available for modification. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;int *i=0x400 // i points to address 400&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;*i=0; //set the value of memory location pointed by i. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Incomplete types are otherwise called uninitialized pointers.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(102, 255, 255);"&gt;&lt;b&gt;What is a dangling pointer? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;A dangling pointer arises when you use the address of an object after&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;its lifetime is over. This may occur in situations like returning&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;addresses of the automatic variables from a function or using the&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;address of the memory block after it is freed. The following&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;code snippet shows this:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;class Sample&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;public:&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;int *ptr;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Sample(int i)&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;ptr = new int(i);&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;~Sample()&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;delete ptr;&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span class="answers"&gt;void PrintVal()&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;cout &lt;&lt; "The value is " &lt;&lt; *ptr;&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span class="answers"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;void SomeFunc(Sample x)&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;cout &lt;&lt; "Say i am in someFunc " &lt;&lt;&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;int main()&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;Sample s1 = 10;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;SomeFunc(s1);&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;s1.PrintVal();&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;In the above example when PrintVal() function is&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;called it is called by the pointer that has been freed by the&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;destructor in SomeFunc.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="color: rgb(102, 255, 255);" class="style53"&gt;&lt;b&gt;Differentiate between the message and method?&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: red;" lang="EN-US"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="color: red;" lang="EN-US"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;&lt;span lang="EN-US"&gt;Message:&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;&lt;span class="answers"&gt;* Objects communicate by sending messages to each other.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* A message is sent to invoke a method.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Method&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* Provides response to a message.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* It is an implementation of an operation.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is an adaptor class or Wrapper class? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;A class that has no functionality of its own. Its member functions hide the use of a third party software component or an object with the non-compatible interface or a non-object-oriented implementation. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is a Null object? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;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;/span&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is class invariant? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;A class invariant is a condition that defines all valid states for an object. It is a logical condition to ensure the correct working of a class. Class invariants must hold when an object is created, and they must be preserved under all operations of the class. In particular all class invariants are both preconditions and post-conditions for all operations or member functions of the class. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What do you mean by Stack unwinding? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;It is a process during exception handling when the destructor is called for all local objects between the place where the exception was thrown and where it is caught. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;Define precondition and post-condition to a member function?&lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;Precondition: A precondition is a condition that must be true on entry to a member function. A class is used correctly if preconditions are never false. An operation is not responsible for doing anything sensible if its precondition fails to hold. For example, the interface invariants of stack class say nothing about pushing yet another element on a stack that is already full. We say that isful() is a precondition of the push operation. Post-condition: A post-condition is a condition that must be true on exit from a member function if the precondition was valid on entry to that function. A class is implemented correctly if post-conditions are never false. For example, after pushing an element on the stack, we know that isempty() must necessarily hold. This is a post-condition of the push operation. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What are the conditions that have to be met for a condition to be an invariant of the class? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;* The condition should hold at the end of every constructor.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* The condition should hold at the end of every mutator (non-const) operation. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What are proxy objects?&lt;/b&gt;&lt;span style="color: rgb(102, 255, 255);" lang="EN-US"&gt; &lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;Objects that stand for other objects are called proxy objects or surrogates. &lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;template &lt;class t=""&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;class Array2D&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;public:&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;class Array1D&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;public:&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;T&amp;amp; operator[] (int index);&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;const T&amp;amp; operator[] (int index)const;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Array1D operator[] (int index);&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;const Array1D operator[] (int index) const;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;};&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;The following then becomes legal:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Array2D&lt;float&gt;data(10,20);&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;cout&lt;&lt;data[3][6];&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Here data[3] yields an Array1D object and the operator [] invocation on that object yields the float in position(3,6) of the original two dimensional array. Clients of the Array2D class need not be aware of the presence of the Array1D class. Objects of this latter class stand for one-dimensional array objects that, conceptually, do not exist for clients of Array2D. Such clients program as if they were using real, live, two-dimensional arrays. Each Array1D object stands for a one-dimensional array that is absent from a conceptual model used by the clients of Array2D. In the above example, Array1D is a proxy class. Its instances stand for one-dimensional arrays that, conceptually, do not exist. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;Name some pure object oriented languages?&lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="answers"&gt;Smalltalk, Java, Eiffel, Sather.&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is an orthogonal base class? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;If two base classes have no overlapping methods or data they are said to be independent of, or orthogonal to each other. Orthogonal in the sense means that two classes operate in different dimensions and do not interfere with each other in any way. The same derived class may inherit such classes with no difficulty&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="color: rgb(102, 255, 255);" class="style54"&gt;&lt;b&gt;What is a node class?&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="color: blue;" lang="EN-US"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style="color: blue;" lang="EN-US"&gt; &lt;/span&gt;&lt;/b&gt;&lt;span class="answers"&gt;&lt;span lang="EN-US"&gt;A node class is a class that,&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;&lt;span class="answers"&gt;* relies on the base class for services and implementation,&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* provides a wider interface to the users than its base class,&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* relies primarily on virtual functions in its public interface&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* depends on all its direct and indirect base class&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* can be understood only in the context of the base class&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* can be used as base for further derivation&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* can be used to create objects.&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;A node class is a class that has added new services or functionality beyond the services inherited from its base class.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is a container class? What are the types of container classes? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;A container class is a class that is used to hold objects in memory or external storage. A container class acts as a generic holder. A container class has a predefined behavior and a well-known interface. A container class is a supporting class whose purpose is to hide the topology used for maintaining the list of objects in memory. When a container class contains a group of mixed objects, the container is called a heterogeneous container; when the container is holding a group of objects that are all the same, the container is called a homogeneous container. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;How do you write a function that can reverse a linked-list? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;Answer1:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;void reverselist(void)&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;if(head==0)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;return;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;if(head-&lt;next==0)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;return;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;if(head-&lt;next==tail)&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;head-&lt;next&gt;&lt;br /&gt;&lt;span class="answers"&gt;tail-&lt;next&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span class="answers"&gt;else&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;node* pre = head;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;node* cur = head-&lt;next;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;node* curnext = cur-&lt;next;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;head-&lt;next&gt;&lt;br /&gt;&lt;span class="answers"&gt;cur-&lt;next&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;for(; curnext!=0; )&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;cur-&lt;next&gt;&lt;br /&gt;&lt;span class="answers"&gt;pre = cur;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;cur = curnext;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;curnext = curnext-&lt;next;&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;curnext-&lt;next&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;Answer2:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;node* reverselist(node* head)&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;if(0==head || 0==head-&gt;next) &lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;//if head-&gt;next ==0 should return head instead of 0;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;return 0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;node* prev = head;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;node* curr = head-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;node* next = curr-&gt;next;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;for(; next!=0; )&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;curr-&gt;next = prev;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;prev = curr;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;curr = next;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;next = next-&gt;next;&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span class="answers"&gt;curr-&gt;next = prev;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;head-&gt;next = 0;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;head = curr;&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;return head;&lt;/span&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is polymorphism? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;Polymorphism is the idea that a base class can be inherited by several classes. A base class pointer can point to its child class and a base class array can store different child class objects.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;How do you find out if a linked-list has an end? (i.e. the list is not a cycle) &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;You can find out by using 2 pointers. One of them goes 2 nodes each time. The second one goes at 1 nodes each time. If there is a cycle, the one that goes 2 nodes each time will eventually meet the one that goes slower. If that is the case, then you will know the linked-list is a cycle.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="color: rgb(102, 255, 255);" class="style53"&gt;&lt;b&gt;How can you tell what shell you are running on UNIX system?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt; &lt;/b&gt;&lt;span class="answers"&gt;&lt;span lang="EN-US"&gt;You can do the Echo $RANDOM. It will return a undefined variable if you are from the C-Shell, just a return prompt if you are from the Bourne shell, and a 5 digit random numbers if you are from the Korn shell. You could also do a ps -l and look for the shell with the highest PID. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is Boyce Codd Normal form? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form a-&gt;b, where a and b is a subset of R, at least one of the following holds: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;* a-&gt;b is a trivial functional dependency (b is a subset of a)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;* a is a superkey for schema R &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is pure virtual function? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;A class is made abstract by declaring one or more of its virtual functions to be pure. A pure virtual function is one with an initializer of = 0 in its declaration&lt;/span&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="color: rgb(102, 255, 255);" class="forquestionsblue"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Write a Struct Time where integer m, h, s are its members &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt; &lt;span class="answers"&gt;struct Time&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;int m;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;int h;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;int s;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;&lt;span lang="EN-US"&gt;How do you traverse a Btree in Backward in-order? &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;Process the node in the right subtree&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Process the root&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Process the node in the left subtree &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;What is the two main roles of Operating System? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;As a resource manager&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;As a virtual machine &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;b style="color: rgb(102, 255, 255);"&gt;In the derived class, which data member of the base class are visible? &lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;In the public and protected sections.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-3430957310126079914?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/3430957310126079914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=3430957310126079914&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/3430957310126079914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/3430957310126079914'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2010/05/c-object-oriented-interview-questions.html' title='C++ Object-Oriented Interview Questions And Answers'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-4966149549251858937</id><published>2010-05-06T23:27:00.002+05:30</published><updated>2010-05-06T23:31:48.921+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++ programming Interview Questions on UNIX'/><title type='text'>C++ programming Interview Questions on UNIX</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;C++ programming Interview Questions on UNIX&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Could you tell something about the Unix System Kernel? &lt;/span&gt;&lt;br /&gt;The kernel is the heart of the UNIX operating system, it’s responsible for controlling the computer’s resources and scheduling user jobs so that each one gets its fair share of resources.&lt;br /&gt;What are each of the standard files and what are they normally associated with?&lt;br /&gt;They are the standard input file, the standard output file and the standard error file. The first is usually associated with the keyboard, the second and third are usually associated with the terminal screen.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Determine the code below, tell me exactly how many times is the operation sum++ performed ? &lt;/span&gt;&lt;br /&gt;for ( i = 0; i &lt; j =" 100;"&gt; 100 - i; j–)&lt;br /&gt;sum++;&lt;br /&gt;&lt;br /&gt;(99 * 100)/2 = 4950&lt;br /&gt;The sum++ is performed 4950 times.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Give 4 examples which belongs application layer in TCP/IP architecture? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;FTP, TELNET, HTTP and TFTP&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What’s the meaning of ARP in TCP/IP? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The "ARP" stands for Address Resolution Protocol. The ARP standard defines two basic message types: a request and a response. a request message contains an IP address and requests the corresponding hardware address; a replay contains both the IP address, sent in the request, and the hardware address.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What is a Makefile? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Makefile is a utility in Unix to help compile large programs. It helps by only compiling the portion of the program that has been changed.&lt;br /&gt;A Makefile is the file and make uses to determine what rules to apply. make is useful for far more than compiling programs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What is deadlock? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Deadlock is a situation when two or more processes prevent each other from running. Example: if T1 is holding x and waiting for y to be free and T2 holding y and waiting for x to be free deadlock happens.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;What is semaphore?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Semaphore is a special variable, it has two methods: up and down. Semaphore performs atomic operations, which means ones a semaphore is called it can not be inturrupted.&lt;br /&gt;&lt;br /&gt;The internal counter (= #ups - #downs) can never be negative. If you execute the “down” method when the internal counter is zero, it will block until some other thread calls the “up” method. Semaphores are use for thread synchronization.&lt;br /&gt;Is C an object-oriented language?&lt;br /&gt;C is not an object-oriented language, but limited object-oriented programming can be done in C.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 255, 255);"&gt;Name some major differences between C++ and Java?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;C++ has pointers; Java does not. Java is platform-independent; C++ is not. Java has garbage collection; C++ does not. Java does have pointers. In fact all variables in Java are pointers. The difference is that Java does not allow you to manipulate the addresses of the pointer&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-4966149549251858937?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/4966149549251858937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=4966149549251858937&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/4966149549251858937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/4966149549251858937'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2010/05/c-programming-interview-questions-on.html' title='C++ programming Interview Questions on UNIX'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9088987006789845123.post-1603618723284851959</id><published>2010-05-06T23:24:00.001+05:30</published><updated>2010-05-06T23:27:10.224+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++ Networking Interview Questions and Answers'/><title type='text'>C++ Networking Interview Questions and Answers</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link rel="File-List" href="file:///C:%5CUsers%5Cshivlee%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;link rel="themeData" href="file:///C:%5CUsers%5Cshivlee%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cshivlee%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-GB&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="&amp;#45;-"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:1; 	mso-generic-font-family:roman; 	mso-font-format:other; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0cm; 	margin-right:0cm; 	margin-bottom:10.0pt; 	margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} h2 	{mso-style-priority:9; 	mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-link:"Heading 2 Char"; 	mso-margin-top-alt:auto; 	margin-right:0cm; 	mso-margin-bottom-alt:auto; 	margin-left:0cm; 	mso-pagination:widow-orphan; 	mso-outline-level:2; 	font-size:18.0pt; 	font-family:"Times New Roman","serif"; 	mso-fareast-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US; 	font-weight:bold;} p 	{mso-style-noshow:yes; 	mso-style-priority:99; 	mso-margin-top-alt:auto; 	margin-right:0cm; 	mso-margin-bottom-alt:auto; 	margin-left:0cm; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman","serif"; 	mso-fareast-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} span.Heading2Char 	{mso-style-name:"Heading 2 Char"; 	mso-style-priority:9; 	mso-style-unhide:no; 	mso-style-locked:yes; 	mso-style-link:"Heading 2"; 	mso-ansi-font-size:18.0pt; 	mso-bidi-font-size:18.0pt; 	font-family:"Times New Roman","serif"; 	mso-ascii-font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-hansi-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman"; 	font-weight:bold;} span.answers 	{mso-style-name:answers; 	mso-style-unhide:no;} span.forquestionsblue 	{mso-style-name:for_questions_blue; 	mso-style-unhide:no;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin-top:0cm; 	mso-para-margin-right:0cm; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} &lt;/style&gt; &lt;![endif]--&gt;&lt;span style="color: rgb(102, 255, 255); font-weight: bold;"&gt;C++ Networking Interview Questions and Answers &lt;/span&gt;  &lt;p style="color: rgb(102, 255, 255);"&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;What is the difference between Stack and Queue? &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;Stack is a Last In First Out (LIFO) data structure. &lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;Queue is a First In First Out (FIFO) data structure &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="color: rgb(102, 255, 255);" class="forquestionsblue"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Write a fucntion that will reverse a string?&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span lang="EN-US"&gt; &lt;span class="answers"&gt;char *strrev(char *s)&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span class="answers"&gt;int i = 0, len = strlen(s);&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;char *str;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;if ((str = (char *)malloc(len+1)) == NULL)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;/*cannot allocate memory */&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;err_num = 2;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;return (str);&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span class="answers"&gt;while(len)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;str[i++]=s[–len];&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;str[i] = NULL;&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;return (str);&lt;/span&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span class="forquestionsblue"&gt;&lt;b&gt;&lt;span style="color: rgb(102, 255, 255);" lang="EN-US"&gt;What is the software Life-Cycle?&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="answers"&gt;The software Life-Cycle are&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;1) Analysis and specification of the task&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;2) Design of the algorithms and data structures&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;3) Implementation (coding)&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;4) Testing&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;5) Maintenance and evolution of the system&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;6) Obsolescence&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="color: rgb(102, 255, 255);" class="forquestionsblue"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;What is the difference between a Java application and a Java applet? &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="answers"&gt;The difference between a Java application and a Java applet is that a Java application is a program that can be executed using the Java interpeter, and a JAVA applet can be transfered to different networks and executed by using a web browser (transferable to the WWW). &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="color: rgb(102, 255, 255);" class="forquestionsblue"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Name 7 layers of the OSI Reference Model? &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="answers"&gt;-Application layer&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;-Presentation layer&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;-Session layer&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;-Transport layer&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;-Network layer&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;-Data Link layer&lt;/span&gt;&lt;br /&gt;&lt;span class="answers"&gt;-Physical layer&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-1603618723284851959?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/1603618723284851959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=1603618723284851959&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/1603618723284851959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/1603618723284851959'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2010/05/c-networking-interview-questions-and.html' title='C++ Networking Interview Questions and Answers'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-9203526551018816195</id><published>2010-05-06T23:21:00.000+05:30</published><updated>2010-05-06T23:24:08.911+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++ Algorithm Interview Questions and Answers'/><title type='text'>C++ Algorithm Interview Questions and Answers</title><content type='html'>C++ Algorithm Interview Questions and Answers&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 255, 255); font-weight: bold;"&gt;What are the advantages and disadvantages of B-star trees over Binary trees? &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Answer1&lt;br /&gt;B-star trees have better data structure and are faster in search than Binary trees, but it’s harder to write codes for B-start trees.&lt;br /&gt;&lt;br /&gt;Answer2&lt;br /&gt;The major difference between B-tree and binary tres is that B-tree is a external data structure and binary tree is a main memory data structure. The computational complexity of binary tree is counted by the number of comparison operations at each node, while the computational complexity of B-tree is determined by the disk I/O, that is, the number of node that will be loaded from disk to main memory. The comparision of the different values in one node is not counted.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255); font-weight: bold;"&gt;Write the psuedo code for the Depth first Search. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;dfs(G, v) //OUTLINE&lt;br /&gt;Mark v as "discovered"&lt;br /&gt;For each vertex w such that edge vw is in G:&lt;br /&gt;If w is undiscovered:&lt;br /&gt;dfs(G, w); that is, explore vw, visit w, explore from there as much as possible, and backtrack from w to v. Otherwise:&lt;br /&gt;"Check" vw without visiting w. Mark v as "finished".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255); font-weight: bold;"&gt;Describe one simple rehashing policy. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The simplest rehashing policy is linear probing. Suppose a key K hashes to location i. Suppose other key occupies H[i]. The following function is used to generate alternative locations:&lt;br /&gt;rehash(j) = (j + 1) mod h&lt;br /&gt;where j is the location most recently probed. Initially j = i, the hash code for K. Notice that this version of rehash does not depend on K.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 255, 255); font-weight: bold;"&gt;Describe Stacks and name a couple of places where stacks are useful. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A Stack is a linear structure in which insertions and deletions are always made at one end, called the top. This updating policy is called last in, first out (LIFO). It is useful when we need to check some syntex errors, such as missing parentheses.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Suppose a 3-bit sequence number is used in the selective-reject ARQ, what is the maximum number of frames that could be transmitted at a time?&lt;br /&gt;&lt;br /&gt;If a 3-bit sequence number is used, then it could distinguish 8 different frames. Since the number of frames that could be transmitted at a time is no greater half the numner of frames that could be distinguished by the sequence number, so at most 4 frames can be transmitted at a time.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-9203526551018816195?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/9203526551018816195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=9203526551018816195&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/9203526551018816195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/9203526551018816195'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2010/05/c-algorithm-interview-questions-and.html' title='C++ Algorithm Interview Questions and Answers'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9088987006789845123.post-6009211108341248145</id><published>2009-07-13T23:55:00.000+05:30</published><updated>2009-07-13T23:57:05.810+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JAVA  Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='java job interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='interview questions java'/><category scheme='http://www.blogger.com/atom/ns#' term='JAVA'/><title type='text'>Java Interview Questions</title><content type='html'>Describe what happens when an object is created in Java&lt;br /&gt;Several things happen in a particular order to ensure the object is constructed properly:&lt;br /&gt;1. Memory is allocated from heap to hold all instance variables and implementation-specific data of the object and its superclasses. Implemenation-specific data includes pointers to class and method data.&lt;br /&gt;2. The instance variables of the objects are initialized to their default values.&lt;br /&gt;3. The constructor for the most derived class is invoked. The first thing a constructor does is call the consctructor for its superclasses. This process continues until the constrcutor for java.lang.Object is called, as java.lang.Object is the base class for all objects in java.&lt;br /&gt;4. Before the body of the constructor is executed, all instance variable initializers and initialization blocks are executed. Then the body of the constructor is executed. Thus, the constructor for the base class completes first and constructor for the most derived class completes last.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;n Java, You can create a String object as below :&lt;br /&gt;String str = "abc"; &amp; String str = new String("abc");&lt;br /&gt;Why cant a button object be created as : Button bt = "abc" &lt;br /&gt;Why is it compulsory to create a button object as: Button bt = new Button("abc");&lt;br /&gt;Why this is not compulsory in String's case. &lt;br /&gt;&lt;br /&gt;Button bt1= "abc"; &lt;br /&gt;is because "abc" is a literal string (something slightly different than a String object, by-the-way) and bt1 is a Button object. That simple. The only object in Java that can be assigned a literal String is java.lang.String.&lt;br /&gt;Important to not that you are NOT calling a java.lang.String constuctor when you type String s = "abc"; &lt;br /&gt;For example &lt;br /&gt;String x = "abc";&lt;br /&gt;String y = "abc";&lt;br /&gt;refer to the same object.&lt;br /&gt;While &lt;br /&gt;String x1 = new String("abc");&lt;br /&gt;String x2 = new String("abc");&lt;br /&gt;refer to two different objects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the advantage of OOP? &lt;br /&gt;You will get varying answers to this question depending on whom you ask. Major advantages of OOP, IMHO, are: &lt;br /&gt;1. simplicity: software objects model real world objects, so the complexity is reduced and the program structure is very clear; &lt;br /&gt;2. modularity: each object forms a separate entity whose internal workings are decoupled from other parts of the system; &lt;br /&gt;3. modifiability: it is easy to make minor changes in the data representation or the procedures in an OO program. Changes inside a class do not affect any other part of a program, since the only public interface that the external world has to a class is through the use of methods; &lt;br /&gt;4. extensibility: adding new features or responding to changing operating environments can be solved by introducing a few new objects and modifying some existing ones; &lt;br /&gt;5. maintainability: objects can be maintained separately, making locating and fixing problems easier; &lt;br /&gt;6. re-usability: objects can be reused in different programs&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What are the main differences between Java and C++?&lt;br /&gt;Everything is an object in Java( Single root hierarchy as everything gets derived from java.lang.Object) &lt;br /&gt;Java does not have all the complicated aspects of C++ ( For ex: Pointers, templates, unions, operator overloading, structures etc..) &lt;br /&gt;The Java language promoters initially said "No pointers!", but when many programmers questioned how you can work without pointers, the promoters began saying "Restricted pointers." You can make up your mind whether it’s really a pointer or not. In any event, there’s no pointer arithmetic. &lt;br /&gt;There are no destructors in Java. (automatic garbage collection) &lt;br /&gt;Java does not support conditional compile (#ifdef/#ifndef type). &lt;br /&gt;Thread support is built into java but not in C++. &lt;br /&gt;Java does not support default arguments.&lt;br /&gt;There’s no scope resolution operator :: in Java. Java uses the dot for everything, but can get away with it since you can define elements only within a class. Even the method definitions must always occur within a class, so there is no need for scope resolution there either. &lt;br /&gt;There’s no "goto " statement in Java. &lt;br /&gt;Java doesn’t provide multiple inheritance (MI), at least not in the same sense that C++ does. &lt;br /&gt;Exception handling in Java is different because there are no destructors. &lt;br /&gt;Java has method overloading, but no operator overloading. The String class does use the + and += operators to concatenate strings and String expressions use automatic type conversion, but that’s a special built-in case. &lt;br /&gt;Java is interpreted for the most part and hence platform independent&lt;br /&gt;&lt;br /&gt;What are interfaces? &lt;br /&gt;Interfaces provide more sophisticated ways to organize and control the objects in your system. &lt;br /&gt;The interface keyword takes the abstract concept one step further. You could think of it as a “pure” abstract class. It allows the creator to establish the form for a class: method names, argument lists, and return&lt;br /&gt;types, but no method bodies. An interface can also contain fields, but The interface keyword takes the abstract concept one step further. You could think of it as a “pure” abstract class. It allows the creator to establish the form for a class: method names, argument lists, and return types, but no method bodies. An interface can also contain fields, but &lt;br /&gt;An interface says: “This is what all classes that implement this particular interface will look like.” Thus, any code that uses a particular interface knows what methods might be called for that interface, and that’s all. So the interface is used to establish a “protocol” between classes. (Some&lt;br /&gt;object-oriented programming languages have a keyword called protocolto do the same thing.) &lt;br /&gt;Typical example from "Thinking in Java": &lt;br /&gt;import java.util.*; &lt;br /&gt;interface Instrument {&lt;br /&gt;int i = 5; // static &amp; final&lt;br /&gt;// Cannot have method definitions:&lt;br /&gt;void play(); // Automatically public&lt;br /&gt;String what();&lt;br /&gt;void adjust();&lt;br /&gt;} &lt;br /&gt;class Wind implements Instrument {&lt;br /&gt;public void play() {&lt;br /&gt;System.out.println("Wind.play()");&lt;br /&gt;public String what() { return "Wind"; }&lt;br /&gt;public void adjust() {}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How can you achieve Multiple Inheritance in Java? &lt;br /&gt;Java's interface mechanism can be used to implement multiple inheritance, with one important difference from c++ way of doing MI: &lt;br /&gt;the inherited interfaces must be abstract. This obviates the need to choose between different implementations, as with interfaces there are no implementations. &lt;br /&gt;example: &lt;br /&gt;interface CanFight {&lt;br /&gt;void fight();&lt;br /&gt;interface CanSwim {&lt;br /&gt;void swim();&lt;br /&gt;interface CanFly {&lt;br /&gt;void fly();&lt;br /&gt;class ActionCharacter {&lt;br /&gt;public void fight() {}&lt;br /&gt;class Hero extends ActionCharacter implements CanFight, CanSwim, CanFly {&lt;br /&gt;public void swim() {}&lt;br /&gt;public void fly() {}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;You can even achieve a form of multiple inheritance where you can use the *functionality* of classes rather than just the interface: &lt;br /&gt;interface A {&lt;br /&gt;void methodA();&lt;br /&gt;} &lt;br /&gt;class AImpl implements A {&lt;br /&gt;void methodA() { //do stuff }&lt;br /&gt;} &lt;br /&gt;interface B {&lt;br /&gt;void methodB();&lt;br /&gt;} &lt;br /&gt;class BImpl implements B {&lt;br /&gt;void methodB() { //do stuff }&lt;br /&gt;} &lt;br /&gt;class Multiple implements A, B {&lt;br /&gt;private A a = new A();&lt;br /&gt;private B b = new B();&lt;br /&gt;void methodA() { a.methodA(); }&lt;br /&gt;void methodB() { b.methodB(); }&lt;br /&gt;} &lt;br /&gt;This completely solves the traditional problems of multiple inheritance in C++ where name clashes occur between multiple base classes. The coder of the derived class will have to explicitly resolve any clashes. &lt;br /&gt;&lt;br /&gt;Don't you hate people who point out minor typos? &lt;br /&gt;Everything in the previous example is correct, except you need to instantiate an AImpl and BImpl. So class Multiple would look like this: &lt;br /&gt;class Multiple implements A, B {&lt;br /&gt;private A a = new AImpl();&lt;br /&gt;private B b = new BImpl();&lt;br /&gt;void methodA() { a.methodA(); }&lt;br /&gt;void methodB() { b.methodB(); }&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; What is the difference between StringBuffer and String class? &lt;br /&gt;A string buffer implements a mutable sequence of characters. A string buffer is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls. &lt;br /&gt;The String class represents character strings. All string literals in Java programs, such as "abc" are constant and implemented as instances of this class; their values cannot be changed after they are created.&lt;br /&gt;Strings in Java are known to be immutable. What it means is that every time you need to make a change to a String variable, behind the scene, a "new" String is actually being created by the JVM. &lt;br /&gt;For an example:&lt;br /&gt;if you change your String variable 2 times, then you end up with 3 Strings: one current and 2 that are ready for garbage collection. &lt;br /&gt;The garbage collection cycle is quite unpredictable and these additional unwanted Strings will take up memory until that cycle occurs. &lt;br /&gt;For better performance, use StringBuffers for string-type data that will be reused or changed frequently. There is more overhead per class than using String, but you will end up with less overall classes and consequently consume less memory.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Describe, in general, how java's garbage collector works? &lt;br /&gt;The Java runtime environment deletes objects when it determines that they are no longer being used. This process is known as garbage collection. &lt;br /&gt;The Java runtime environment supports a garbage collector that periodically frees the memory used by objects that are no longer needed. The Java garbage collector is a mark-sweep garbage collector that scans Java's dynamic memory areas for objects, marking those that are referenced. After all possible paths to objects are investigated, those objects that are not marked (i.e. are not referenced) are known to be garbage and are collected. (A more complete description of our garbage collection algorithm might be "A compacting, mark-sweep collector with some conservative scanning".) &lt;br /&gt;The garbage collector runs synchronously when the system runs out of memory, or in response to a request from a Java program. Your Java program can ask the garbage collector to run at any time by calling System.gc(). The garbage collector requires about 20 milliseconds to complete its task so, your program should only run the garbage collector when there will be no performance impact and the program anticipates an idle period long enough for the garbage collector to finish its job.&lt;br /&gt;Note: Asking the garbage collection to run does not guarantee that your objects will be garbage collected. &lt;br /&gt;The Java garbage collector runs asynchronously when the system is idle on systems that allow the Java runtime to note when a thread has begun and to interrupt another thread (such as Windows 95). As soon as another thread becomes active, the garbage collector is asked to get to a consistent state and then terminate. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What's the difference between == and equals method? &lt;br /&gt;equals checks for the content of the string objects while == checks for the fact that the two String objects point to same memory location ie they are same references. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What are abstract classes, abstract methods? &lt;br /&gt;Simply speaking a class or a method qualified with "abstract" keyword is an abstract class or abstract method. &lt;br /&gt;You create an abstract class when you want to manipulate a set of classes through a common interface. All derived-class methods that match the signature of the base-class declaration will be called using the dynamic binding mechanism. &lt;br /&gt;If you have an abstract class, objects of that class almost always have no meaning. That is, abstract class is meant to express only the interface and sometimes some default method implementations, and not a particular implementation, so creating an abstract class object makes no sense and are not allowed ( compile will give you an error message if you try to create one). &lt;br /&gt;An abstract method is an incomplete method. It has only a declaration and no method body. Here is the syntax for an abstract method declaration: &lt;br /&gt;abstract void f(); &lt;br /&gt;If a class contains one or more abstract methods, the class must be qualified an abstract. (Otherwise, the compiler gives you an error message.). It’s possible to create a class as abstract without including any abstract methods. This is useful when you’ve got a class in which it doesn’t make sense to have any abstract methods, and yet you want to prevent any instances of that class. &lt;br /&gt;Abstract classes and methods are created because they make the abstractness of a class explicit, and tell both the user and the compiler how it was intended to be used. &lt;br /&gt;For example: &lt;br /&gt;abstract class Instrument {&lt;br /&gt;int i; // storage allocated for each&lt;br /&gt;public abstract void play();&lt;br /&gt;public String what() {&lt;br /&gt;return "Instrument";&lt;br /&gt;public abstract void adjust();&lt;br /&gt;} &lt;br /&gt;class Wind extends Instrument {&lt;br /&gt;public void play() {&lt;br /&gt;System.out.println("Wind.play()");&lt;br /&gt;} &lt;br /&gt;public String what() { return "Wind"; }&lt;br /&gt;public void adjust() {} &lt;br /&gt;Abstract classes are classes for which there can be no instances at run time. i.e. the implementation of the abstract classes are not complete. &lt;br /&gt;Abstract methods are methods which have no defintion. i.e. abstract methods have to be implemented in one of the sub classes or else that class will also become Abstract. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the difference between an Applet and an Application? &lt;br /&gt;A Java application is made up of a main() method declared as public static void that accepts a string array argument, along with any other classes that main() calls. It lives in the environment that the host OS provides. &lt;br /&gt;A Java applet is made up of at least one public class that has to be subclassed from java.awt.Applet. The applet is confined to living in the user's Web browser, and the browser's security rules, (or Sun's appletviewer, which has fewer restrictions). &lt;br /&gt;&lt;br /&gt;The differences between an applet and an application are as follows: &lt;br /&gt;1. Applets can be embedded in HTML pages and downloaded over the Internet whereas Applications have no special support in HTML for embedding or downloading. &lt;br /&gt;2. Applets can only be executed inside a java compatible container, such as a browser or appletviewer whereas Applications are executed at command line by java.exe or jview.exe. &lt;br /&gt;3. Applets execute under strict security limitations that disallow certain operations(sandbox model security) whereas Applications have no inherent security restrictions. &lt;br /&gt;4. Applets don't have the main() method as in applications. Instead they operate on an entirely different mechanism where they are initialized by init(),started by start(),stopped by stop() or destroyed by destroy(). &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Java says "write once, run anywhere". What are some ways this isn't quite true? &lt;br /&gt;As long as all implementaions of java are certified by sun as 100% pure java this promise of "Write once, Run everywhere" will hold true. But as soon as various java core implemenations start digressing from each other, this won't be true anymore. A recent example of a questionable business tactic is the surreptitious behavior and interface modification of some of Java's core classes in their own implementation of Java. Programmers who do not recognize these undocumented changes can build their applications expecting them to run anywhere that Java can be found, only to discover that their code works only on Microsoft's own Virtual Machine, which is only available on Microsoft's own operating systems. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the difference between a Vector and an Array. Discuss the advantages and disadvantages of both? &lt;br /&gt;Vector can contain objects of different types whereas array can contain objects only of a single type.&lt;br /&gt;- Vector can expand at run-time, while array length is fixed.&lt;br /&gt;- Vector methods are synchronized while Array methods are not&lt;br /&gt;&lt;br /&gt;What are java beans? &lt;br /&gt;JavaBeans is a portable, platform-independent component model written in the Java programming language, developed in collaboration with industry leaders. It enables developers to write reusable components once and run them anywhere -- benefiting from the platform-independent power of Java technology. JavaBeans acts as a Bridge between proprietary component models and provides a seamless and powerful means for developers to build components that run in ActiveX container applications. &lt;br /&gt;JavaBeans are usual Java classes which adhere to certain coding conventions:&lt;br /&gt;1. Implements java.io.Serializable interface &lt;br /&gt;2. Provides no argument constructor &lt;br /&gt;3. Provides getter and setter methods for accessing it's properties &lt;br /&gt;&lt;br /&gt;What is RMI? &lt;br /&gt;RMI stands for Remote Method Invocation. Traditional approaches to executing code on other machines across a network have been confusing as well as tedious and error-prone to implement. The nicest way to think about this problem is that some object happens to live on another machine, and that you can send a message to the remote object and get a result as if the object lived on your local&lt;br /&gt;machine. This simplification is exactly what Java Remote Method Invocation (RMI) allows you to do. &lt;br /&gt;Above excerpt is from "Thinking in java". For more information refer to any book on Java. &lt;br /&gt;&lt;br /&gt;What does the keyword "synchronize" mean in java. When do you use it? What are the disadvantages of synchronization? &lt;br /&gt;Synchronize is used when u want to make ur methods thread safe. The disadvantage of synchronise is it will end up in slowing down the program. Also if not handled properly it will end up in dead lock. &lt;br /&gt;Any more additions to this&lt;br /&gt;&lt;br /&gt;What gives java it's "write once and run anywhere" nature? &lt;br /&gt;Java is compiled to be a byte code which is the intermediate language between source code and machine code. This byte code is not platorm specific and hence can be fed to any platform. After being fed to the JVM, which is specific to a particular operating system, the code platform specific machine code is generated thus making java platform independent. &lt;br /&gt;&lt;br /&gt;What are native methods? How do you use them? &lt;br /&gt;Native methods are methods written in other languages like C, C++, or even assembly language. &lt;br /&gt;You can call native methods from Java using JNI. &lt;br /&gt;Native methods are used when the implementation of a particular method is present in language other than Java say C, C++.&lt;br /&gt;To use the native methods in java we use the keyword native&lt;br /&gt;public native method_a()&lt;br /&gt;This native keyword is signal to the java compiler that the implementation of this method is in a language other than java.&lt;br /&gt;Native methods are used when we realize that it would take up a lot of rework to write that piece of alerady existing code in other language to java. &lt;br /&gt;&lt;br /&gt;What is JDBC? Describe the steps needed to execute a SQL query using JDBC. &lt;br /&gt;We can connect to databases from java using JDBC. It stands for Java DataBase Connectivity. &lt;br /&gt;Here are the steps: &lt;br /&gt;1. Register the jdbc driver with the driver manager&lt;br /&gt;2. Establish jdbc connection&lt;br /&gt;3. Execute an sql statement&lt;br /&gt;4. Process the results&lt;br /&gt;5. Close the connection &lt;br /&gt;Before doing these do import java.sql.* &lt;br /&gt;&lt;br /&gt;JDBC is java based API for accessing data from the relational databases. JDBC provides a set of classes and interfaces for doing various database operations.&lt;br /&gt;The steps are:&lt;br /&gt;Register/load the jdbc driver with the driver manager.&lt;br /&gt;Establish the connection thru DriverManager.getConnection();&lt;br /&gt;Fire a SQL thru conn.executeStatement();&lt;br /&gt;Fetch the results in a result set&lt;br /&gt;Process the results&lt;br /&gt;Close statement/result set and connection object. &lt;br /&gt;&lt;br /&gt;How many different types of JDBC drivers are present? Discuss them. &lt;br /&gt;There are four JDBC driver types. &lt;br /&gt;Type 1: JDBC-ODBC Bridge plus ODBC Driver:&lt;br /&gt;The first type of JDBC driver is the JDBC-ODBC Bridge. It is a driver that provides JDBC access to databases through ODBC drivers. The ODBC driver must be configured on the client for the bridge to work. This driver type is commonly used for prototyping or when there is no JDBC driver available for a particular DBMS. &lt;br /&gt;Type 2: Native-API partly-Java Driver:&lt;br /&gt;The Native to API driver converts JDBC commands to DBMS-specific native calls. This is much like the restriction of Type 1 drivers. The client must have some binary code loaded on its machine. These drivers do have an advantage over Type 1 drivers because they interface directly with the database. &lt;br /&gt;Type 3: JDBC-Net Pure Java Driver:&lt;br /&gt;The JDBC-Net drivers are a three-tier solution. This type of driver translates JDBC calls into a database-independent network protocol that is sent to a middleware server. This server then translates this DBMS-independent protocol into a DBMS-specific protocol, which is sent&lt;br /&gt;to a particular database. The results are then routed back through the middleware server and sent back to the client. This type of solution makes it possible to implement a pure Java client. It also makes it possible to swap databases without affecting the client. &lt;br /&gt;Type 4: Native-Protocol Pur Java Driver&lt;br /&gt;These are pure Java drivers that communicate directly with the vendor's database. They do this by converting JDBC commands directly into the database engine's native protocol. This driver has no additional translation or middleware layer, which improves performance tremendously.&lt;br /&gt;&lt;br /&gt;What does the "static" keyword mean in front of a variable? A method? A class? Curly braces {}? &lt;br /&gt;static variable &lt;br /&gt;- means a class level variable &lt;br /&gt;static method:&lt;br /&gt;-does not have "this". It is not allowed to access the not static members of the class.&lt;br /&gt;can be invoked enev before a single instance of a class is created.&lt;br /&gt;eg: main &lt;br /&gt;static class: &lt;br /&gt;no such thing. &lt;br /&gt;static free floating block:&lt;br /&gt;is executed at the time the class is loaded. There can be multiple such blocks. This may be useful to load native libraries when using native methods. &lt;br /&gt;eg: &lt;br /&gt;native void doThis(){ &lt;br /&gt;static{&lt;br /&gt;System.loadLibrary("myLibrary.lib");&lt;br /&gt;..... &lt;br /&gt;}&lt;br /&gt;Access specifiers: "public", "protected", "private", nothing? &lt;br /&gt;Unfortunately I believe that buturab is discussing Static vs. non-Static methods and variables. In the case of Public, Private and Protected, that is used to describe which programs can access that class or method: &lt;br /&gt;Public – any other class from any package can instantiate and execute the classes and methods&lt;br /&gt;Protected – only subclasses and classes inside of the package can access the classes and methods&lt;br /&gt;Private – the original class is the only class allowed to executed the methods.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What does the "final" keyword mean in front of a variable? A method? A class? &lt;br /&gt;FINAL for a variable : value is constant&lt;br /&gt;FINAL for a method : cannot be overridden&lt;br /&gt;FINAL for a class : cannot be derived &lt;br /&gt;A final variable cannot be reassigned,&lt;br /&gt;but it is not constant. For instance, &lt;br /&gt;final StringBuffer x = new StringBuffer()&lt;br /&gt;x.append("hello"); &lt;br /&gt;is valid. X cannot have a new value in it,but nothing stops operations on the object&lt;br /&gt;that it refers, including destructive operations. Also, a final method cannot be overridden&lt;br /&gt;or hidden by new access specifications.This means that the compiler can choose&lt;br /&gt;to in-line the invocation of such a method.(I don't know if any compiler actually does&lt;br /&gt;this, but it's true in theory.) The best example of a final class is&lt;br /&gt;String, which defines a class thatcannot be derived.&lt;br /&gt;&lt;br /&gt;Does Java have "goto"? &lt;br /&gt;No. &lt;br /&gt;&lt;br /&gt;Why "bytecode"? Can you reverse-engineer the code from bytecode? &lt;br /&gt;you can get the sourcecode from ur class file.&lt;br /&gt;u get a free JAD here&lt;br /&gt;&lt;br /&gt;What synchronization constructs does Java provide? How do they work? &lt;br /&gt;The two common features that are used are: &lt;br /&gt;1. Synchronized keyword - Used to synchronize a method or a block of code. When you synchronize a method, you are in effect synchronizing the code within the method using the monitor of the current object for the lock. &lt;br /&gt;The following have the same effect. &lt;br /&gt;synchronized void foo() {&lt;br /&gt;} &lt;br /&gt;and &lt;br /&gt;void foo() {&lt;br /&gt;synchronized(this) {&lt;br /&gt;} &lt;br /&gt;If you synchronize a static method, then you are synchronizing across all objects of the same class, i.e. the monitor you are using for the lock is one per class, not one per object. &lt;br /&gt;2. wait/notify. wait() needs to be called from within a synchronized block. It will first release the lock acquired from the synchronization and then wait for a signal. In Posix C, this part is equivalent to the pthread_cond_wait method, which waits for an OS signal to continue. When somebody calls notify() on the object, this will signal the code which has been waiting, and the code will continue from that point. If there are several sections of code that are in the wait state, you can call notifyAll() which will notify all threads that are waiting on the monitor for the current object. Remember that both wait() and notify() have to be called from blocks of code that are synchronized on the monitor for the current object. &lt;br /&gt;&lt;br /&gt;Does Java have multiple inheritance? &lt;br /&gt;JAva does not support multiple inheritence directly but it does thru the concept of interfaces.&lt;br /&gt;We can make a class implement a number of interfaces if we want to achieve multiple inheritence type of functionality of C++. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How does exception handling work in Java? &lt;br /&gt;1.It separates the working/functional code from the error-handling code by way of try-catch clauses. &lt;br /&gt;2.It allows a clean path for error propagation. If the called method encounters a situation it can't manage, it can throw an exception and let the calling method deal with it. &lt;br /&gt;3.By enlisting the compiler to ensure that "exceptional" situations are anticipated and accounted for, it enforces powerful coding. &lt;br /&gt;4.Exceptions are of two types: &lt;br /&gt;Compiler-enforced exceptions, or checked exceptions &lt;br /&gt;Runtime exceptions, or unchecked exceptions &lt;br /&gt;Compiler-enforced (checked) exceptions are instances of the Exception class or one of its subclasses -- excluding the RuntimeException branch. The compiler expects all checked exceptions to be appropriately handled. Checked exceptions must be declared in the throws clause of the method throwing them -- assuming, of course, they're not being caught within that same method. The calling method must take care of these exceptions by either catching or declaring them in its throws clause. Thus, making an exception checked forces the us to pay heed to the possibility of it being thrown. An example of a checked exception is java.io.IOException. As the name suggests, it throws whenever an input/output operation is abnormally terminated.&lt;br /&gt;&lt;br /&gt;Does Java have destructors? &lt;br /&gt;garbage collector does the job working in the background &lt;br /&gt;Jva does not have destructors; but it has finalizers that does a similar job. &lt;br /&gt;the syntax is &lt;br /&gt;public void finalize(){ &lt;br /&gt;} &lt;br /&gt;if an object has a finalizer, the method is invoked before the system garbage collects the object &lt;br /&gt;&lt;br /&gt;What does the "abstract" keyword mean in front of a method? A class? &lt;br /&gt;Abstract keyword declares either a method or a class.&lt;br /&gt;If a method has a abstract keyword in front of it,it is called abstract method.Abstract method hs no body.It has only arguments and return type.Abstract methods act as placeholder methods that are implemented in the subclasses. &lt;br /&gt;Abstract classes can't be instantiated.If a class is declared as abstract,no objects of that class can be created.If a class contains any abstract method it must be declared as abstract &lt;br /&gt;&lt;br /&gt;Are java constructors inherited ? if not, why not? &lt;br /&gt;You cannot inherit a constructor. That is, you cannot create a instance of a subclass using a constructor of one of it's superclasses. One of the main reasons is because you probably don't want to overide the superclasses constructor, which would be possible if they were inherited. By giving the developer the ability to override a superclasses constructor you would erode the encapsulation abilities of the language. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL:&lt;br /&gt;&lt;br /&gt;What are two methods of retrieving SQL? &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;What is the difference between a "where" clause and a "having" clause? &lt;br /&gt;"Where" is a kind of restiriction statement. You use where clause to restirict all the data from DB.Where clause is using before result retrieving. But Having clause is using after retrieving the data.Having clause is a kind of filtering command. &lt;br /&gt;&lt;br /&gt;What is the basic form of a SQL statement to read data out of a table? &lt;br /&gt;The basic form to read data out of table is &lt;br /&gt;SELECT * FROM table_name; &lt;br /&gt;An answer:&lt;br /&gt;SELECT * &lt;br /&gt;FROM table_name &lt;br /&gt;WHERE xyz= 'whatever';&lt;br /&gt;cannot be called basic form because of WHERE clause.&lt;br /&gt;What structure can you have the database make to speed up table reads? &lt;br /&gt;The question is not correct.&lt;br /&gt;"What structure can you have the database make to speed up table reads ?"&lt;br /&gt;It is not cleare what exectly the term &lt;br /&gt;"structure" means in this case.&lt;br /&gt;Follow the rules of DB tuning we have to:&lt;br /&gt;1] properly use indexes ( different types of indexes)&lt;br /&gt;2] properly locate different DB objects&lt;br /&gt;across different tablespaces, files and so on.&lt;br /&gt;3] create a special space (tablespace) to locate some of the data with special datatype&lt;br /&gt;( for example CLOB, LOB and ...)&lt;br /&gt;4&lt;br /&gt;What are the tradeoffs with having indexes? &lt;br /&gt;1. Faster selects, slower updates.&lt;br /&gt;2. Extra storage space to store indexes. &lt;br /&gt;updates are slower because in addition to updating the table you have to update the index. &lt;br /&gt;&lt;br /&gt;What is a "join"? &lt;br /&gt;'join' used to connect two or more tables logically with or without common field. &lt;br /&gt;&lt;br /&gt;What is "normalization"? "Denormalization"? Why do you sometimes want to denormalize? &lt;br /&gt;Normalizing data means eliminating redundant information from a table and oranizing the data so that future changes to the table are easier.&lt;br /&gt;Denormalization means allowing redundancy in a table.&lt;br /&gt;The main benefit of denormalization is improved performance with simplified data retrieval and manipulation. This is done by reduction in the number of joins needed for data processing. &lt;br /&gt;&lt;br /&gt;What is a "constraint"? &lt;br /&gt;A constraint allows you to apply simple referential integrity checks to a table. &lt;br /&gt;There are four primary types of constraints that are currently supported by SQL Server: &lt;br /&gt;PRIMARY/UNIQUE - enforces uniqueness of a particular table column.&lt;br /&gt;DEFAULT - specifies a default value for a column in case an insert operation does not provide one.&lt;br /&gt;FOREIGN KEY - validates that every value in a column exists in a column of another table.&lt;br /&gt;CHECK - checks that every value stored in a column is in some specified list &lt;br /&gt;Each type of constraint performs a specific type of action. &lt;br /&gt;Default is not a constraint.&lt;br /&gt;NOT NULL is one more constraint which does not allow values in the specific column to be null. And also it the only constraint which is not a table level constraint. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What types of index data structures can you have? &lt;br /&gt;An index helps to faster search values in tables. The three most commonly used index-types are:&lt;br /&gt;- B-Tree: builds a tree of possible values with a list of row IDs that have the leaf value. Needs a lot of space and is the default index type for most databases.&lt;br /&gt;- Bitmap: string of bits for each possible value of the column. Each bit string has one bit for each row. Needs only few space and is very fast.(however, domain of value cannot be large, e.g. SEX(m,f); degree(BS,MS,PHD)&lt;br /&gt;- Hash: A hashing algorithm is used to assign a set of characters to represent a text strig such as a composite of keys or partial keys, and compresses the underlying data. Takes longer to build and is supported by relatively few databases.&lt;br /&gt;&lt;br /&gt;What is a "primary key"? &lt;br /&gt;A PRIMARY INDEX or PRIMARY KEY is something which comes mainly from&lt;br /&gt;database theory. From its behaviour is almost the same as an UNIQUE&lt;br /&gt;INDEX, i.e. there may only be one of each value in this column. If you&lt;br /&gt;call such an INDEX PRIMARY instead of UNIQUE, you say something about&lt;br /&gt;your table design, which I am not able to explain in few words.&lt;br /&gt;Primary Key is a type of a constraint enforcing uniqueness and data integrity for each row of a table. All columns participating in a primary key constraint must possess the NOT NULL property. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is a "functional dependency"? How does it relate to database table design? &lt;br /&gt;Functional dependency relates to how one object depends upon the other in the database.&lt;br /&gt;for example, procedure/function sp2 may be called by procedure sp1. Then we say that sp1 has functional dependency on sp2. &lt;br /&gt;&lt;br /&gt;What is a "trigger"? &lt;br /&gt;Triggers are stored procedures created in order to enforce integrity rules in a database. A trigger is executed every time a data-modification operation occurs (i.e., insert, update or delete). Triggers are executed automatically on occurance of one of the data-modification operations. &lt;br /&gt;A trigger is a database object directly associated with a particular table. It fires whenever a specific statement/type of statement is issued against that table. The types of statements are insert,update,delete and query statements. Basically, trigger is a set of SQL statements &lt;br /&gt;2 of 3 people found this post useful. &lt;br /&gt;A trigger is a solution to the restrictions of a constraint.&lt;br /&gt;For instance :&lt;br /&gt;1.A database column cannot carry PSEUDO columns as criteria where a trigger can.&lt;br /&gt;2.A database constraint cannot refer old and new values for a row where a trigger can.&lt;br /&gt;Why can a "group by" or "order by" clause be expensive to process? &lt;br /&gt;Processing of "group by" or "order by" clause often requires creation of Temporary tables to process the results of the query.&lt;br /&gt;Which depending of the result set can be very expensive. &lt;br /&gt;&lt;br /&gt;What is "index covering" of a query? &lt;br /&gt;Index covering means that "Data can be found only using indexes, without touching the tables" &lt;br /&gt;Bottom of Form 1&lt;br /&gt;Top of Form 3&lt;br /&gt;Bottom of Form 3&lt;br /&gt;&lt;br /&gt;What types of join algorithms can you have? &lt;br /&gt;Nested loop, indexes and hash. &lt;br /&gt;Top of Form 1&lt;br /&gt;4 of 5 people found this post useful. &lt;br /&gt;There are four type of joins&lt;br /&gt;(join conditions):&lt;br /&gt;1) equa join&lt;br /&gt;2) non-equa join&lt;br /&gt;3) self-join&lt;br /&gt;4) outer join.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;State some advantages AND disadvantages of indexing database tables. &lt;br /&gt;This is the answer to advantage and disadvatage of Indexes: &lt;br /&gt;Adv:&lt;br /&gt;Faster querying of data &lt;br /&gt;Disad:&lt;br /&gt;1. Slower Insert&lt;br /&gt;2. Slower Updates if you are also pdating the primary key. &lt;br /&gt;What is a SQL view? &lt;br /&gt;An output of a query can be stored as a view. View acts like small table which meets our criterion. &lt;br /&gt;Top of Form 1&lt;br /&gt;6 of 6 people found this post useful. &lt;br /&gt;View is a precomplied SQL query which is used to select data from one or more tables. A view is like a table but it doens't physically take any space. Viw is a good way to present data in a particualr format if you use that query quite often.&lt;br /&gt;View can also be used to restrict users from accessing the tables directly.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-6009211108341248145?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/6009211108341248145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=6009211108341248145&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/6009211108341248145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/6009211108341248145'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/07/java-interview-questions.html' title='Java Interview Questions'/><author><name>Gaurav Nanda</name><uri>http://www.blogger.com/profile/12749165288430220644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://1.bp.blogspot.com/-khyRnS2mxTM/ThobrakPsPI/AAAAAAAAI4M/3JvTEZ9X5X4/s220/gn.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9088987006789845123.post-5779189185411507049</id><published>2009-06-08T00:16:00.004+05:30</published><updated>2009-06-13T13:10:57.369+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++ source code'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ example programs'/><category scheme='http://www.blogger.com/atom/ns#' term='C++ interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ faq'/><title type='text'>c++ source code Examples Part 6</title><content type='html'>101)     void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         void *v;&lt;br /&gt;&lt;br /&gt;         int integer=2;&lt;br /&gt;&lt;br /&gt;         int *i=&amp;integer;&lt;br /&gt;&lt;br /&gt;         v=i;&lt;br /&gt;&lt;br /&gt;         printf("%d",(int*)*v);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;Compiler Error. We cannot apply indirection on type void*.&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Void pointer is a generic pointer type. No pointer arithmetic can be done on it.&lt;br /&gt;Void pointers are normally used for,&lt;br /&gt;&lt;br /&gt;1.      Passing generic pointers to functions and returning such pointers.&lt;br /&gt;&lt;br /&gt;2.      As a intermediate pointer type.&lt;br /&gt;&lt;br /&gt;3.      Used when the exact pointer type will be known at a later point of time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;102)     void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         int i=i++,j=j++,k=k++;&lt;br /&gt;&lt;br /&gt;printf(“%d%d%d”,i,j,k);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;Garbage values.&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;An identifier is available to use in program code from the point of its declaration.&lt;br /&gt;&lt;br /&gt;So expressions such as  i = i++ are valid statements. The i, j and k are automatic&lt;br /&gt;variables and so they contain some garbage value. Garbage in is garbage out (GIGO).&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-8716701302248821"; /* 728x15, created 6/12/09 */ google_ad_slot = "9087350094"; google_ad_width = 728; google_ad_height = 15; //--&gt;&lt;/script&gt;&lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;103)     void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         static int i=i++, j=j++, k=k++;&lt;br /&gt;&lt;br /&gt;printf(“i = %d j = %d k = %d”, i, j, k);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;i = 1 j = 1 k = 1&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Since static variables are initialized to zero by default.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;104)     void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         while(1){&lt;br /&gt;&lt;br /&gt;                     if(printf("%d",printf("%d")))&lt;br /&gt;&lt;br /&gt;                                 break;&lt;br /&gt;&lt;br /&gt;                     else&lt;br /&gt;&lt;br /&gt;                                 continue;&lt;br /&gt;&lt;br /&gt;         }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;Garbage values&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The inner printf executes first to print some garbage value. The printf returns no&lt;br /&gt;of characters printed and this value also cannot be predicted. Still the outer&lt;br /&gt;printf  prints something and so returns a non-zero value. So it encounters the break&lt;br /&gt;statement and comes out of the while statement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;104)     main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         unsigned int i=10;&lt;br /&gt;&lt;br /&gt;         while(i--&gt;=0)&lt;br /&gt;&lt;br /&gt;                     printf("%u ",i);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;         10 9 8 7 6 5 4 3 2 1 0 65535 65534…..&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Since i is an unsigned integer it can never become negative. So the expression i--&lt;br /&gt;&gt;=0  will always be true, leading to an infinite loop.       &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;105)     #include&lt;conio.h&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         int x,y=2,z,a;&lt;br /&gt;&lt;br /&gt;         if(x=y%2) z=2;&lt;br /&gt;&lt;br /&gt;         a=2;&lt;br /&gt;&lt;br /&gt;         printf("%d %d ",z,x);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;Garbage-value 0&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The value of y%2 is 0. This value is assigned to x. The condition reduces to if (x)&lt;br /&gt;or in other words if(0) and so z goes uninitialized.&lt;br /&gt;&lt;br /&gt;Thumb Rule: Check all control paths to write bug free code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;106)     main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         int a[10];&lt;br /&gt;&lt;br /&gt;         printf("%d",*a+1-*a+3);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;4&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;         *a and -*a cancels out. The result is as simple as 1 + 3 = 4 !  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;107)     #define prod(a,b) a*b&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         int x=3,y=4;&lt;br /&gt;&lt;br /&gt;         printf("%d",prod(x+2,y-1));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;10&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;         The macro expands and evaluates to as:&lt;br /&gt;&lt;br /&gt;         x+2*y-1 =&gt; x+(2*y)-1 =&gt; 10&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-8716701302248821"; /* 728x15, created 6/12/09 */ google_ad_slot = "9087350094"; google_ad_width = 728; google_ad_height = 15; //--&gt;&lt;/script&gt;&lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;108)     main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         unsigned int i=65000;&lt;br /&gt;&lt;br /&gt;         while(i++!=0);&lt;br /&gt;&lt;br /&gt;         printf("%d",i);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;1&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Note the semicolon after the while statement. When the value of i becomes 0 it comes&lt;br /&gt;out of while loop. Due to post-increment on i the value of i while printing is 1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;109)     main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         int i=0;&lt;br /&gt;&lt;br /&gt;         while(+(+i--)!=0)&lt;br /&gt;&lt;br /&gt;                     i-=i++;&lt;br /&gt;&lt;br /&gt;         printf("%d",i);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;-1&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Unary + is the only dummy operator in C. So it has no effect on the expression and&lt;br /&gt;now the while loop is,         while(i--!=0) which is false and so breaks out of&lt;br /&gt;while loop. The value –1 is printed due to the post-decrement operator.&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;113)     main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;         float f=5,g=10;&lt;br /&gt;&lt;br /&gt;         enum{i=10,j=20,k=50};&lt;br /&gt;&lt;br /&gt;         printf("%d\n",++k);&lt;br /&gt;&lt;br /&gt;         printf("%f\n",f&lt;&lt;2); i="10;" i="10;" i="10;" i="0;"&gt;=0;i++) ;&lt;br /&gt;&lt;br /&gt;    printf("%d\n",i);&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Answer&lt;br /&gt;&lt;br /&gt;                     -128&lt;br /&gt;&lt;br /&gt;Explanation&lt;br /&gt;&lt;br /&gt;Notice the semicolon at the end of the for loop. THe initial value of the i is set&lt;br /&gt;to 0. The inner loop executes to increment the value from 0 to 127 (the positive&lt;br /&gt;range of char) and then it rotates to the negative value of -128. The condition in&lt;br /&gt;the for loop fails and so comes out of the for loop. It prints the current value of&lt;br /&gt;i that is -128.&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;113) main()&lt;br /&gt;&lt;br /&gt; {&lt;br /&gt;&lt;br /&gt;    unsigned char i=0;&lt;br /&gt;&lt;br /&gt;    for(;i&gt;=0;i++) ;&lt;br /&gt;&lt;br /&gt;    printf("%d\n",i);&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Answer&lt;br /&gt;&lt;br /&gt;         infinite loop&lt;br /&gt;&lt;br /&gt;Explanation&lt;br /&gt;&lt;br /&gt;The difference between the previous question and this one is that the char is&lt;br /&gt;declared to be unsigned. So the i++ can never yield negative value and i&gt;=0 never&lt;br /&gt;becomes false so that it can come out of the for loop.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;114) main()&lt;br /&gt;&lt;br /&gt;         {&lt;br /&gt;&lt;br /&gt;    char i=0;&lt;br /&gt;&lt;br /&gt;    for(;i&gt;=0;i++) ;&lt;br /&gt;&lt;br /&gt;    printf("%d\n",i);&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;                     Behavior is implementation dependent.&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The detail if the char is signed/unsigned by default is implementation dependent. If&lt;br /&gt;the implementation treats the char to be signed by default the program will print&lt;br /&gt;–128 and terminate. On the other hand if it considers char to be unsigned by&lt;br /&gt;default, it goes to infinite loop.&lt;br /&gt;&lt;br /&gt;Rule:&lt;br /&gt;&lt;br /&gt;You can write programs that have implementation dependent behavior. But dont write&lt;br /&gt;programs that depend on such behavior.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;115) Is the following statement a declaration/definition. Find what does it mean?&lt;br /&gt;&lt;br /&gt;int (*x)[10];&lt;br /&gt;&lt;br /&gt;Answer&lt;br /&gt;&lt;br /&gt;                     Definition.&lt;br /&gt;&lt;br /&gt;         x is a pointer to array of(size 10) integers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                     Apply clock-wise rule to find the meaning of this definition.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-8716701302248821"; /* 728x15, created 6/12/09 */ google_ad_slot = "9087350094"; google_ad_width = 728; google_ad_height = 15; //--&gt;&lt;/script&gt;&lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;116). What is the output for the program given below&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  typedef enum errorType{warning, error, exception,}error;&lt;br /&gt;&lt;br /&gt;  main()&lt;br /&gt;&lt;br /&gt; {&lt;br /&gt;&lt;br /&gt;     error g1;&lt;br /&gt;&lt;br /&gt;     g1=1;&lt;br /&gt;&lt;br /&gt;     printf("%d",g1);&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;Answer&lt;br /&gt;&lt;br /&gt;                     Compiler error: Multiple declaration for error&lt;br /&gt;&lt;br /&gt;Explanation&lt;br /&gt;&lt;br /&gt;The name error is used in the two meanings. One means that it is a enumerator&lt;br /&gt;constant with value 1. The another use is that it is a type name (due to typedef)&lt;br /&gt;for enum errorType. Given a situation the compiler cannot distinguish the meaning of&lt;br /&gt;error to know in what sense the error is used:&lt;br /&gt;&lt;br /&gt;         error g1;&lt;br /&gt;&lt;br /&gt;g1=error;&lt;br /&gt;&lt;br /&gt;         // which error it refers in each case?&lt;br /&gt;&lt;br /&gt;When the compiler can distinguish between usages then it will not issue error (in&lt;br /&gt;pure technical terms, names can only be overloaded in different namespaces).&lt;br /&gt;&lt;br /&gt;Note: the extra comma in the declaration,&lt;br /&gt;&lt;br /&gt;enum errorType{warning, error, exception,}&lt;br /&gt;&lt;br /&gt;is not an error. An extra comma is valid and is provided just for programmer’s&lt;br /&gt;convenience.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;117)         typedef struct error{int warning, error, exception;}error;&lt;br /&gt;&lt;br /&gt;  main()&lt;br /&gt;&lt;br /&gt; {&lt;br /&gt;&lt;br /&gt;     error g1;&lt;br /&gt;&lt;br /&gt;     g1.error =1;&lt;br /&gt;&lt;br /&gt;     printf("%d",g1.error);&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answer&lt;br /&gt;&lt;br /&gt;                     1&lt;br /&gt;&lt;br /&gt;Explanation&lt;br /&gt;&lt;br /&gt;The three usages of name errors can be distinguishable by the compiler at any&lt;br /&gt;instance, so valid (they are in different namespaces).&lt;br /&gt;&lt;br /&gt;Typedef struct error{int warning, error, exception;}error;&lt;br /&gt;&lt;br /&gt;This error can be used only by preceding the error by struct kayword as in:&lt;br /&gt;&lt;br /&gt;struct error someError;&lt;br /&gt;&lt;br /&gt;typedef struct error{int warning, error, exception;}error;&lt;br /&gt;&lt;br /&gt;This can be used only after . (dot) or -&gt; (arrow) operator preceded by the variable&lt;br /&gt;name as in :&lt;br /&gt;&lt;br /&gt;g1.error =1;&lt;br /&gt;&lt;br /&gt;         printf("%d",g1.error);&lt;br /&gt;&lt;br /&gt;                     typedef struct error{int warning, error, exception;}error;&lt;br /&gt;&lt;br /&gt;This can be used to define variables without using the preceding struct keyword as in:&lt;br /&gt;&lt;br /&gt;error g1;&lt;br /&gt;&lt;br /&gt;Since the compiler can perfectly distinguish between these three usages, it is&lt;br /&gt;perfectly legal and valid.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note&lt;br /&gt;&lt;br /&gt;This code is given here to just explain the concept behind. In real programming&lt;br /&gt;don’t use such overloading of names. It reduces the readability of the code.&lt;br /&gt;Possible doesn’t mean that we should use it!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;118)     #ifdef something&lt;br /&gt;&lt;br /&gt;int some=0;&lt;br /&gt;&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;int thing = 0;&lt;br /&gt;&lt;br /&gt;printf("%d %d\n", some ,thing);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;                     Compiler error : undefined symbol some&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;This is a very simple example for conditional compilation. The name something is not&lt;br /&gt;already known to the compiler making the declaration&lt;br /&gt;&lt;br /&gt;int some = 0;&lt;br /&gt;&lt;br /&gt;effectively removed from the source code.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;119)     #if something == 0&lt;br /&gt;&lt;br /&gt;int some=0;&lt;br /&gt;&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;int thing = 0;&lt;br /&gt;&lt;br /&gt;printf("%d %d\n", some ,thing);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answer&lt;br /&gt;&lt;br /&gt;                     0 0&lt;br /&gt;&lt;br /&gt;Explanation&lt;br /&gt;&lt;br /&gt;This code is to show that preprocessor expressions are not the same as the ordinary&lt;br /&gt;expressions. If a name is not known the preprocessor treats it to be equal to zero.&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-8716701302248821"; /* 728x15, created 6/12/09 */ google_ad_slot = "9087350094"; google_ad_width = 728; google_ad_height = 15; //--&gt;&lt;/script&gt;&lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;120). What is the output for the following program&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;         main()&lt;br /&gt;&lt;br /&gt;                         {&lt;br /&gt;&lt;br /&gt;   int arr2D[3][3];&lt;br /&gt;&lt;br /&gt;    printf("%d\n", ((arr2D==* arr2D)&amp;amp;&amp;amp;(* arr2D == arr2D[0])) );&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;Answer&lt;br /&gt;&lt;br /&gt;1&lt;br /&gt;&lt;br /&gt;Explanation&lt;br /&gt;&lt;br /&gt;This is due to the close relation between the arrays and pointers. N dimensional&lt;br /&gt;arrays are made up of (N-1) dimensional arrays.  &lt;br /&gt;&lt;br /&gt;arr2D is made up of a 3 single arrays that contains 3 integers each .&lt;br /&gt;&lt;br /&gt;arr2D&lt;br /&gt;&lt;br /&gt;arr2D[1]&lt;br /&gt;     &lt;br /&gt;arr2D[2]&lt;br /&gt;&lt;br /&gt;arr2D[3]&lt;br /&gt;&lt;br /&gt;The name arr2D refers to the beginning of all the 3 arrays. *arr2D refers to the&lt;br /&gt;start of the first 1D array (of 3 integers) that is the same address as arr2D. So&lt;br /&gt;the expression (arr2D == *arr2D) is true (1).&lt;br /&gt;&lt;br /&gt;Similarly, *arr2D is nothing but *(arr2D + 0), adding a zero doesn’t change the&lt;br /&gt;value/meaning. Again arr2D[0] is the another way of telling *(arr2D + 0). So the&lt;br /&gt;expression (*(arr2D + 0) == arr2D[0]) is true (1).&lt;br /&gt;&lt;br /&gt;Since both parts of the expression evaluates to true the result is true(1) and the&lt;br /&gt;same is printed.&lt;/conio.h&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-5779189185411507049?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/5779189185411507049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=5779189185411507049&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/5779189185411507049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/5779189185411507049'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/06/c-source-code-examples-part-6.html' title='c++ source code Examples Part 6'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9088987006789845123.post-3197172575815659117</id><published>2009-06-08T00:13:00.001+05:30</published><updated>2009-06-08T00:14:22.427+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++ source code'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ example programs'/><category scheme='http://www.blogger.com/atom/ns#' term='C++ interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ faq'/><title type='text'>c++ source code Examples Part 5</title><content type='html'>81)main(int argc, char **argv)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; printf("enter the character");&lt;br /&gt;&lt;br /&gt; getchar();&lt;br /&gt;&lt;br /&gt; sum(argv[1],argv[2]);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sum(num1,num2)&lt;br /&gt;&lt;br /&gt;int num1,num2;&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; return num1+num2;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;Compiler error.&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;argv[1] &amp; argv[2] are strings. They are passed to the function sum without&lt;br /&gt;converting it to integer values.  &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;82)       # include &lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;int one_d[]={1,2,3};&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; int *ptr; &lt;br /&gt;&lt;br /&gt; ptr=one_d;&lt;br /&gt;&lt;br /&gt; ptr+=3;&lt;br /&gt;&lt;br /&gt; printf("%d",*ptr);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;garbage value&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;ptr pointer is pointing to out of the array range of one_d.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;83)       # include&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;aaa() {&lt;br /&gt;&lt;br /&gt;  printf("hi");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;bbb(){&lt;br /&gt;&lt;br /&gt; printf("hello");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;ccc(){&lt;br /&gt;&lt;br /&gt; printf("bye");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;  int (*ptr[3])();&lt;br /&gt;&lt;br /&gt;  ptr[0]=aaa;&lt;br /&gt;&lt;br /&gt;  ptr[1]=bbb;&lt;br /&gt;&lt;br /&gt;  ptr[2]=ccc;&lt;br /&gt;&lt;br /&gt;  ptr[2]();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;bye &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;ptr is array of pointers to functions of return type int.ptr[0] is assigned to&lt;br /&gt;address of the function aaa. Similarly ptr[1] and ptr[2] for bbb and ccc&lt;br /&gt;respectively. ptr[2]() is in effect of writing ccc(), since ptr[2] points to ccc.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;85)       #include&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;FILE *ptr;&lt;br /&gt;&lt;br /&gt;char i;&lt;br /&gt;&lt;br /&gt;ptr=fopen("zzz.c","r");&lt;br /&gt;&lt;br /&gt;while((i=fgetch(ptr))!=EOF)&lt;br /&gt;&lt;br /&gt;printf("%c",i);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;contents of zzz.c followed by an infinite loop  &lt;br /&gt;&lt;br /&gt;            Explanation:&lt;br /&gt;&lt;br /&gt;The condition is checked against EOF, it should be checked against NULL.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;86)       main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; int i =0;j=0;&lt;br /&gt;&lt;br /&gt; if(i &amp;&amp; j++)&lt;br /&gt;&lt;br /&gt;            printf("%d..%d",i++,j);&lt;br /&gt;&lt;br /&gt;printf("%d..%d,i,j);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;0..0 &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The value of i is 0. Since this information is enough to determine the truth value&lt;br /&gt;of the boolean expression. So the statement following the if statement is not&lt;br /&gt;executed.  The values of i and j remain unchanged and get printed.&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;87)       main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; int i;&lt;br /&gt;&lt;br /&gt; i = abc();&lt;br /&gt;&lt;br /&gt; printf("%d",i);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;abc()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; _AX = 1000;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;1000&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Normally the return value from the function is through the information from the&lt;br /&gt;accumulator. Here _AH is the pseudo global variable denoting the accumulator. Hence,&lt;br /&gt;the value of the accumulator is set 1000 so the function returns value 1000. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;88)       int i;&lt;br /&gt;&lt;br /&gt;            main(){&lt;br /&gt;&lt;br /&gt;int t;&lt;br /&gt;&lt;br /&gt;for ( t=4;scanf("%d",&amp;i)-t;printf("%d\n",i))&lt;br /&gt;&lt;br /&gt;                        printf("%d--",t--);&lt;br /&gt;&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;            // If the inputs are 0,1,2,3 find the o/p&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;            4--0&lt;br /&gt;&lt;br /&gt;                        3--1&lt;br /&gt;&lt;br /&gt;                        2--2     &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Let us assume some x= scanf("%d",&amp;i)-t the values during execution &lt;br /&gt;&lt;br /&gt;                        will be,&lt;br /&gt;&lt;br /&gt;          t        i       x&lt;br /&gt;&lt;br /&gt;          4       0      -4&lt;br /&gt;&lt;br /&gt;          3       1      -2&lt;br /&gt;&lt;br /&gt;          2       2       0&lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;br /&gt;89)       main(){&lt;br /&gt;&lt;br /&gt;  int a= 0;int b = 20;char x =1;char y =10;&lt;br /&gt;&lt;br /&gt;  if(a,b,x,y)&lt;br /&gt;&lt;br /&gt;        printf("hello");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;hello &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The comma operator has associativity from left to right. Only the rightmost value is&lt;br /&gt;returned and the other values are evaluated and ignored. Thus the value of last&lt;br /&gt;variable y is returned to check in if. Since it is a non zero value if becomes true&lt;br /&gt;so, "hello" will be printed.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;90)       main(){&lt;br /&gt;&lt;br /&gt; unsigned int i;&lt;br /&gt;&lt;br /&gt; for(i=1;i&gt;-2;i--)&lt;br /&gt;&lt;br /&gt;                        printf("c aptitude");&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;i is an unsigned integer. It is compared with a signed value. Since the both types&lt;br /&gt;doesn't match, signed is promoted to unsigned value. The unsigned equivalent of -2&lt;br /&gt;is a huge value so condition becomes false and control comes out of the loop. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;91)       In the following pgm add a  stmt in the function  fun such that the&lt;br /&gt;address of &lt;br /&gt;&lt;br /&gt;'a' gets stored in 'j'.&lt;br /&gt;&lt;br /&gt;main(){&lt;br /&gt;&lt;br /&gt;  int * j;&lt;br /&gt;&lt;br /&gt;  void fun(int **);&lt;br /&gt;&lt;br /&gt;  fun(&amp;j);&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; void fun(int **k) {&lt;br /&gt;&lt;br /&gt;  int a =0;&lt;br /&gt;&lt;br /&gt;  /* add a stmt here*/&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;                        *k = &amp;a&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;                        The argument of the function is a pointer to a pointer.&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;92)       What are the following notations of defining functions known as?&lt;br /&gt;&lt;br /&gt;i.      int abc(int a,float b)&lt;br /&gt;&lt;br /&gt;                        {&lt;br /&gt;&lt;br /&gt;                        /* some code */&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;ii.    int abc(a,b)&lt;br /&gt;&lt;br /&gt;        int a; float b;&lt;br /&gt;&lt;br /&gt;                        {&lt;br /&gt;&lt;br /&gt;                        /* some code*/&lt;br /&gt;&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;i.  ANSI C notation&lt;br /&gt;&lt;br /&gt;ii. Kernighan &amp; Ritche notation &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;93)       main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;char *p;&lt;br /&gt;&lt;br /&gt;p="%d\n";&lt;br /&gt;&lt;br /&gt;           p++;&lt;br /&gt;&lt;br /&gt;           p++;&lt;br /&gt;&lt;br /&gt;           printf(p-2,300);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;            300&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The pointer points to % since it is incremented twice and again decremented by 2, it&lt;br /&gt;points to '%d\n' and 300 is printed.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;94)       main(){&lt;br /&gt;&lt;br /&gt; char a[100];&lt;br /&gt;&lt;br /&gt; a[0]='a';a[1]]='b';a[2]='c';a[4]='d';&lt;br /&gt;&lt;br /&gt; abc(a);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;abc(char a[]){&lt;br /&gt;&lt;br /&gt; a++; &lt;br /&gt;&lt;br /&gt;             printf("%c",*a);&lt;br /&gt;&lt;br /&gt; a++;&lt;br /&gt;&lt;br /&gt; printf("%c",*a);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The base address is modified only in function and as a result a points to 'b' then&lt;br /&gt;after incrementing to 'c' so bc will be printed.&lt;br /&gt;&lt;br /&gt;                &lt;br /&gt;&lt;br /&gt;95)       func(a,b)&lt;br /&gt;&lt;br /&gt;int a,b;&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; return( a= (a==b) );&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;int process(),func();&lt;br /&gt;&lt;br /&gt;printf("The value of process is %d !\n ",process(func,3,6));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;process(pf,val1,val2)&lt;br /&gt;&lt;br /&gt;int (*pf) ();&lt;br /&gt;&lt;br /&gt;int val1,val2;&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;return((*pf) (val1,val2));&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;The value if process is 0 !&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The function 'process' has 3 parameters - 1, a pointer to another function  2 and 3,&lt;br /&gt;integers. When this function is invoked from main, the following substitutions for&lt;br /&gt;formal parameters take place: func for pf, 3 for val1 and 6 for val2. This function&lt;br /&gt;returns the result of the operation performed by the function 'func'. The function&lt;br /&gt;func has two integer parameters. The formal parameters are substituted as 3 for a&lt;br /&gt;and 6 for b. since 3 is not equal to 6, a==b returns 0. therefore the function&lt;br /&gt;returns 0 which in turn is returned by the function 'process'.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;96)       void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            static int i=5;&lt;br /&gt;&lt;br /&gt;            if(--i){&lt;br /&gt;&lt;br /&gt;                        main();&lt;br /&gt;&lt;br /&gt;                        printf("%d ",i);&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt; 0 0 0 0&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;            The variable "I" is declared as static, hence memory for I will be&lt;br /&gt;allocated for only once, as it encounters the statement. The function&lt;br /&gt;main() will be called recursively unless I becomes equal to 0, and since&lt;br /&gt;main() is recursively called, so the value of static I ie., 0 will be&lt;br /&gt;printed every time the control is returned.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;97)       void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            int k=ret(sizeof(float));&lt;br /&gt;&lt;br /&gt;            printf("\n here value is %d",++k);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int ret(int ret)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            ret += 2.5;&lt;br /&gt;&lt;br /&gt;            return(ret);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt; Here value is 7&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;            The int ret(int ret), ie., the function name and the argument name can&lt;br /&gt;be the same.&lt;br /&gt;&lt;br /&gt;            Firstly, the function ret() is called in which the sizeof(float) ie., 4&lt;br /&gt;is passed,  after the first expression the value in ret will be 6, as&lt;br /&gt;ret is integer hence the value stored in ret will have implicit type&lt;br /&gt;conversion from float to int. The ret is returned in main() it is&lt;br /&gt;printed after and preincrement.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;98)       void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            char a[]="12345\0";&lt;br /&gt;&lt;br /&gt;            int i=strlen(a);&lt;br /&gt;&lt;br /&gt;            printf("here in 3 %d\n",++i);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer: &lt;br /&gt;&lt;br /&gt;here in 3 6&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;            The char array 'a' will hold the initialized string, whose length will&lt;br /&gt;be counted from 0 till the null character. Hence the 'I' will hold the&lt;br /&gt;value equal to 5, after the pre-increment in the printf statement, the 6&lt;br /&gt;will be printed.&lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&lt;br /&gt;99)       void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            unsigned giveit=-1;&lt;br /&gt;&lt;br /&gt;            int gotit;&lt;br /&gt;&lt;br /&gt;            printf("%u ",++giveit);&lt;br /&gt;&lt;br /&gt;            printf("%u \n",gotit=--giveit);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt; 0 65535&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&lt;br /&gt;100)     void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            int i;&lt;br /&gt;&lt;br /&gt;            char a[]="\0";&lt;br /&gt;&lt;br /&gt;            if(printf("%s\n",a))&lt;br /&gt;&lt;br /&gt;                        printf("Ok here \n");&lt;br /&gt;&lt;br /&gt;            else&lt;br /&gt;&lt;br /&gt;                        printf("Forget it\n");&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt; Ok here &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Printf will return how many characters does it print. Hence printing a null&lt;br /&gt;character returns 1 which makes the if statement true, thus "Ok here" is printed.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-3197172575815659117?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/3197172575815659117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=3197172575815659117&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/3197172575815659117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/3197172575815659117'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/06/c-source-code-examples-part-5_08.html' title='c++ source code Examples Part 5'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-1066176075146198873</id><published>2009-06-08T00:13:00.000+05:30</published><updated>2009-06-08T00:14:20.127+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++ source code'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ example programs'/><category scheme='http://www.blogger.com/atom/ns#' term='C++ interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ faq'/><title type='text'>c++ source code Examples Part 5</title><content type='html'>81)main(int argc, char **argv)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; printf("enter the character");&lt;br /&gt;&lt;br /&gt; getchar();&lt;br /&gt;&lt;br /&gt; sum(argv[1],argv[2]);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sum(num1,num2)&lt;br /&gt;&lt;br /&gt;int num1,num2;&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; return num1+num2;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;Compiler error.&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;argv[1] &amp; argv[2] are strings. They are passed to the function sum without&lt;br /&gt;converting it to integer values.  &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;82)       # include &lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;int one_d[]={1,2,3};&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; int *ptr; &lt;br /&gt;&lt;br /&gt; ptr=one_d;&lt;br /&gt;&lt;br /&gt; ptr+=3;&lt;br /&gt;&lt;br /&gt; printf("%d",*ptr);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;garbage value&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;ptr pointer is pointing to out of the array range of one_d.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;83)       # include&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;aaa() {&lt;br /&gt;&lt;br /&gt;  printf("hi");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;bbb(){&lt;br /&gt;&lt;br /&gt; printf("hello");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;ccc(){&lt;br /&gt;&lt;br /&gt; printf("bye");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;  int (*ptr[3])();&lt;br /&gt;&lt;br /&gt;  ptr[0]=aaa;&lt;br /&gt;&lt;br /&gt;  ptr[1]=bbb;&lt;br /&gt;&lt;br /&gt;  ptr[2]=ccc;&lt;br /&gt;&lt;br /&gt;  ptr[2]();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;bye &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;ptr is array of pointers to functions of return type int.ptr[0] is assigned to&lt;br /&gt;address of the function aaa. Similarly ptr[1] and ptr[2] for bbb and ccc&lt;br /&gt;respectively. ptr[2]() is in effect of writing ccc(), since ptr[2] points to ccc.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;85)       #include&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;FILE *ptr;&lt;br /&gt;&lt;br /&gt;char i;&lt;br /&gt;&lt;br /&gt;ptr=fopen("zzz.c","r");&lt;br /&gt;&lt;br /&gt;while((i=fgetch(ptr))!=EOF)&lt;br /&gt;&lt;br /&gt;printf("%c",i);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;contents of zzz.c followed by an infinite loop  &lt;br /&gt;&lt;br /&gt;            Explanation:&lt;br /&gt;&lt;br /&gt;The condition is checked against EOF, it should be checked against NULL.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;86)       main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; int i =0;j=0;&lt;br /&gt;&lt;br /&gt; if(i &amp;&amp; j++)&lt;br /&gt;&lt;br /&gt;            printf("%d..%d",i++,j);&lt;br /&gt;&lt;br /&gt;printf("%d..%d,i,j);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;0..0 &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The value of i is 0. Since this information is enough to determine the truth value&lt;br /&gt;of the boolean expression. So the statement following the if statement is not&lt;br /&gt;executed.  The values of i and j remain unchanged and get printed.&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;87)       main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; int i;&lt;br /&gt;&lt;br /&gt; i = abc();&lt;br /&gt;&lt;br /&gt; printf("%d",i);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;abc()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; _AX = 1000;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;1000&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Normally the return value from the function is through the information from the&lt;br /&gt;accumulator. Here _AH is the pseudo global variable denoting the accumulator. Hence,&lt;br /&gt;the value of the accumulator is set 1000 so the function returns value 1000. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;88)       int i;&lt;br /&gt;&lt;br /&gt;            main(){&lt;br /&gt;&lt;br /&gt;int t;&lt;br /&gt;&lt;br /&gt;for ( t=4;scanf("%d",&amp;i)-t;printf("%d\n",i))&lt;br /&gt;&lt;br /&gt;                        printf("%d--",t--);&lt;br /&gt;&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;            // If the inputs are 0,1,2,3 find the o/p&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;            4--0&lt;br /&gt;&lt;br /&gt;                        3--1&lt;br /&gt;&lt;br /&gt;                        2--2     &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Let us assume some x= scanf("%d",&amp;i)-t the values during execution &lt;br /&gt;&lt;br /&gt;                        will be,&lt;br /&gt;&lt;br /&gt;          t        i       x&lt;br /&gt;&lt;br /&gt;          4       0      -4&lt;br /&gt;&lt;br /&gt;          3       1      -2&lt;br /&gt;&lt;br /&gt;          2       2       0&lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;br /&gt;89)       main(){&lt;br /&gt;&lt;br /&gt;  int a= 0;int b = 20;char x =1;char y =10;&lt;br /&gt;&lt;br /&gt;  if(a,b,x,y)&lt;br /&gt;&lt;br /&gt;        printf("hello");&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;hello &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The comma operator has associativity from left to right. Only the rightmost value is&lt;br /&gt;returned and the other values are evaluated and ignored. Thus the value of last&lt;br /&gt;variable y is returned to check in if. Since it is a non zero value if becomes true&lt;br /&gt;so, "hello" will be printed.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;90)       main(){&lt;br /&gt;&lt;br /&gt; unsigned int i;&lt;br /&gt;&lt;br /&gt; for(i=1;i&gt;-2;i--)&lt;br /&gt;&lt;br /&gt;                        printf("c aptitude");&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;i is an unsigned integer. It is compared with a signed value. Since the both types&lt;br /&gt;doesn't match, signed is promoted to unsigned value. The unsigned equivalent of -2&lt;br /&gt;is a huge value so condition becomes false and control comes out of the loop. &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;91)       In the following pgm add a  stmt in the function  fun such that the&lt;br /&gt;address of &lt;br /&gt;&lt;br /&gt;'a' gets stored in 'j'.&lt;br /&gt;&lt;br /&gt;main(){&lt;br /&gt;&lt;br /&gt;  int * j;&lt;br /&gt;&lt;br /&gt;  void fun(int **);&lt;br /&gt;&lt;br /&gt;  fun(&amp;j);&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; void fun(int **k) {&lt;br /&gt;&lt;br /&gt;  int a =0;&lt;br /&gt;&lt;br /&gt;  /* add a stmt here*/&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;                        *k = &amp;a&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;                        The argument of the function is a pointer to a pointer.&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;92)       What are the following notations of defining functions known as?&lt;br /&gt;&lt;br /&gt;i.      int abc(int a,float b)&lt;br /&gt;&lt;br /&gt;                        {&lt;br /&gt;&lt;br /&gt;                        /* some code */&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;ii.    int abc(a,b)&lt;br /&gt;&lt;br /&gt;        int a; float b;&lt;br /&gt;&lt;br /&gt;                        {&lt;br /&gt;&lt;br /&gt;                        /* some code*/&lt;br /&gt;&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;i.  ANSI C notation&lt;br /&gt;&lt;br /&gt;ii. Kernighan &amp; Ritche notation &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;93)       main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;char *p;&lt;br /&gt;&lt;br /&gt;p="%d\n";&lt;br /&gt;&lt;br /&gt;           p++;&lt;br /&gt;&lt;br /&gt;           p++;&lt;br /&gt;&lt;br /&gt;           printf(p-2,300);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;            300&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The pointer points to % since it is incremented twice and again decremented by 2, it&lt;br /&gt;points to '%d\n' and 300 is printed.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;94)       main(){&lt;br /&gt;&lt;br /&gt; char a[100];&lt;br /&gt;&lt;br /&gt; a[0]='a';a[1]]='b';a[2]='c';a[4]='d';&lt;br /&gt;&lt;br /&gt; abc(a);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;abc(char a[]){&lt;br /&gt;&lt;br /&gt; a++; &lt;br /&gt;&lt;br /&gt;             printf("%c",*a);&lt;br /&gt;&lt;br /&gt; a++;&lt;br /&gt;&lt;br /&gt; printf("%c",*a);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The base address is modified only in function and as a result a points to 'b' then&lt;br /&gt;after incrementing to 'c' so bc will be printed.&lt;br /&gt;&lt;br /&gt;                &lt;br /&gt;&lt;br /&gt;95)       func(a,b)&lt;br /&gt;&lt;br /&gt;int a,b;&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt; return( a= (a==b) );&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;int process(),func();&lt;br /&gt;&lt;br /&gt;printf("The value of process is %d !\n ",process(func,3,6));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;process(pf,val1,val2)&lt;br /&gt;&lt;br /&gt;int (*pf) ();&lt;br /&gt;&lt;br /&gt;int val1,val2;&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;return((*pf) (val1,val2));&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;The value if process is 0 !&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;The function 'process' has 3 parameters - 1, a pointer to another function  2 and 3,&lt;br /&gt;integers. When this function is invoked from main, the following substitutions for&lt;br /&gt;formal parameters take place: func for pf, 3 for val1 and 6 for val2. This function&lt;br /&gt;returns the result of the operation performed by the function 'func'. The function&lt;br /&gt;func has two integer parameters. The formal parameters are substituted as 3 for a&lt;br /&gt;and 6 for b. since 3 is not equal to 6, a==b returns 0. therefore the function&lt;br /&gt;returns 0 which in turn is returned by the function 'process'.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;96)       void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            static int i=5;&lt;br /&gt;&lt;br /&gt;            if(--i){&lt;br /&gt;&lt;br /&gt;                        main();&lt;br /&gt;&lt;br /&gt;                        printf("%d ",i);&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt; 0 0 0 0&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;            The variable "I" is declared as static, hence memory for I will be&lt;br /&gt;allocated for only once, as it encounters the statement. The function&lt;br /&gt;main() will be called recursively unless I becomes equal to 0, and since&lt;br /&gt;main() is recursively called, so the value of static I ie., 0 will be&lt;br /&gt;printed every time the control is returned.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;97)       void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            int k=ret(sizeof(float));&lt;br /&gt;&lt;br /&gt;            printf("\n here value is %d",++k);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int ret(int ret)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            ret += 2.5;&lt;br /&gt;&lt;br /&gt;            return(ret);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt; Here value is 7&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;            The int ret(int ret), ie., the function name and the argument name can&lt;br /&gt;be the same.&lt;br /&gt;&lt;br /&gt;            Firstly, the function ret() is called in which the sizeof(float) ie., 4&lt;br /&gt;is passed,  after the first expression the value in ret will be 6, as&lt;br /&gt;ret is integer hence the value stored in ret will have implicit type&lt;br /&gt;conversion from float to int. The ret is returned in main() it is&lt;br /&gt;printed after and preincrement.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;98)       void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            char a[]="12345\0";&lt;br /&gt;&lt;br /&gt;            int i=strlen(a);&lt;br /&gt;&lt;br /&gt;            printf("here in 3 %d\n",++i);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer: &lt;br /&gt;&lt;br /&gt;here in 3 6&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;            The char array 'a' will hold the initialized string, whose length will&lt;br /&gt;be counted from 0 till the null character. Hence the 'I' will hold the&lt;br /&gt;value equal to 5, after the pre-increment in the printf statement, the 6&lt;br /&gt;will be printed.&lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&lt;br /&gt;99)       void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            unsigned giveit=-1;&lt;br /&gt;&lt;br /&gt;            int gotit;&lt;br /&gt;&lt;br /&gt;            printf("%u ",++giveit);&lt;br /&gt;&lt;br /&gt;            printf("%u \n",gotit=--giveit);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt; 0 65535&lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;            &lt;br /&gt;&lt;br /&gt;100)     void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;            int i;&lt;br /&gt;&lt;br /&gt;            char a[]="\0";&lt;br /&gt;&lt;br /&gt;            if(printf("%s\n",a))&lt;br /&gt;&lt;br /&gt;                        printf("Ok here \n");&lt;br /&gt;&lt;br /&gt;            else&lt;br /&gt;&lt;br /&gt;                        printf("Forget it\n");&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt; Ok here &lt;br /&gt;&lt;br /&gt;Explanation:&lt;br /&gt;&lt;br /&gt;Printf will return how many characters does it print. Hence printing a null&lt;br /&gt;character returns 1 which makes the if statement true, thus "Ok here" is printed.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-1066176075146198873?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/1066176075146198873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=1066176075146198873&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/1066176075146198873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/1066176075146198873'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/06/c-source-code-examples-part-5.html' title='c++ source code Examples Part 5'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-7057174419964703603</id><published>2009-06-08T00:07:00.000+05:30</published><updated>2009-06-08T00:10:03.503+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++ source code'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ example programs'/><category scheme='http://www.blogger.com/atom/ns#' term='C++ interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ faq'/><title type='text'>c++ source code Examples Part 4</title><content type='html'>61)       main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            char *cptr,c;&lt;br /&gt; &lt;br /&gt;            void *vptr,v;&lt;br /&gt; &lt;br /&gt;            c=10;  v=0;&lt;br /&gt; &lt;br /&gt;            cptr=&amp;c; vptr=&amp;v;&lt;br /&gt; &lt;br /&gt;            printf("%c%v",c,v);&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler error (at line number 4): size of v is Unknown.&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;You can create a variable of type void * but not of type void, since void is an&lt;br /&gt;empty type. In the second line you are creating variable vptr of type void * and v&lt;br /&gt;of type void hence an error.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;62)       main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            char *str1="abcd";&lt;br /&gt; &lt;br /&gt;            char str2[]="abcd";&lt;br /&gt; &lt;br /&gt;            printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd"));&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;2 5 5&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;In first sizeof, str1 is a character pointer so it gives you the size of the pointer&lt;br /&gt;variable. In second sizeof the name str2 indicates the name of the array whose size&lt;br /&gt;is 5 (including the '\0' termination character). The third sizeof is similar to the&lt;br /&gt;second one.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;63)       main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            char not;&lt;br /&gt; &lt;br /&gt;            not=!2;&lt;br /&gt; &lt;br /&gt;            printf("%d",not);&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;0&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;! is a logical operator. In C the value 0 is considered to be the boolean value&lt;br /&gt;FALSE, and any non-zero value is considered to be the boolean value TRUE. Here 2 is&lt;br /&gt;a non-zero value so TRUE. !TRUE is FALSE (0) so it prints 0.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;64)       #define FALSE -1&lt;br /&gt; &lt;br /&gt;            #define TRUE   1&lt;br /&gt; &lt;br /&gt;            #define NULL   0&lt;br /&gt; &lt;br /&gt;            main() {&lt;br /&gt; &lt;br /&gt;               if(NULL)&lt;br /&gt; &lt;br /&gt;                        puts("NULL");&lt;br /&gt; &lt;br /&gt;               else if(FALSE)&lt;br /&gt; &lt;br /&gt;                        puts("TRUE");&lt;br /&gt; &lt;br /&gt;               else&lt;br /&gt; &lt;br /&gt;                        puts("FALSE");&lt;br /&gt; &lt;br /&gt;               }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;TRUE&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;The input program to the compiler after processing by the preprocessor is,&lt;br /&gt; &lt;br /&gt;            main(){&lt;br /&gt; &lt;br /&gt;                        if(0)&lt;br /&gt; &lt;br /&gt;                                    puts("NULL");&lt;br /&gt; &lt;br /&gt;            else if(-1)&lt;br /&gt; &lt;br /&gt;                                    puts("TRUE");&lt;br /&gt; &lt;br /&gt;            else&lt;br /&gt; &lt;br /&gt;                                    puts("FALSE");&lt;br /&gt; &lt;br /&gt;                        }&lt;br /&gt; &lt;br /&gt;Preprocessor doesn't replace the values given inside the double quotes. The check by&lt;br /&gt;if condition is boolean value false so it goes to else. In second if -1 is boolean&lt;br /&gt;value true hence "TRUE" is printed.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;65)       main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            int k=1;&lt;br /&gt; &lt;br /&gt;            printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE");&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;1==1 is TRUE&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;When two strings are placed together (or separated by white-space) they are&lt;br /&gt;concatenated (this is called as "stringization" operation). So the string is as if&lt;br /&gt;it is given as "%d==1 is %s". The conditional operator( ?: ) evaluates to "TRUE".&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;66)       main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            int y;&lt;br /&gt; &lt;br /&gt;            scanf("%d",&amp;y); // input given is 2000&lt;br /&gt; &lt;br /&gt;            if( (y%4==0 &amp;&amp; y%100 != 0) || y%100 == 0 )&lt;br /&gt; &lt;br /&gt;                 printf("%d is a leap year");&lt;br /&gt; &lt;br /&gt;            else&lt;br /&gt; &lt;br /&gt;                 printf("%d is not a leap year");&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;2000 is a leap year&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;An ordinary program to check if leap year or not.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;67)       #define max 5&lt;br /&gt; &lt;br /&gt;            #define int arr1[max]&lt;br /&gt; &lt;br /&gt;            main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            typedef char arr2[max];&lt;br /&gt; &lt;br /&gt;            arr1 list={0,1,2,3,4};&lt;br /&gt; &lt;br /&gt;            arr2 name="name";&lt;br /&gt; &lt;br /&gt;            printf("%d %s",list[0],name);&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler error (in the line arr1 list = {0,1,2,3,4})&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;arr2 is declared of type array of size 5 of characters. So it can be used to declare&lt;br /&gt;the variable name of the type arr2. But it is not the case of arr1. Hence an error.&lt;br /&gt; &lt;br /&gt;Rule of Thumb: &lt;br /&gt; &lt;br /&gt;#defines are used for textual replacement whereas typedefs are used for declaring&lt;br /&gt;new types.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;68)       int i=10;&lt;br /&gt; &lt;br /&gt;            main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;             extern int i;&lt;br /&gt; &lt;br /&gt;              {&lt;br /&gt; &lt;br /&gt;                 int i=20;&lt;br /&gt; &lt;br /&gt;                        {&lt;br /&gt; &lt;br /&gt;                         const volatile unsigned i=30;&lt;br /&gt; &lt;br /&gt;                         printf("%d",i);&lt;br /&gt; &lt;br /&gt;                        }&lt;br /&gt; &lt;br /&gt;                  printf("%d",i);&lt;br /&gt; &lt;br /&gt;               }&lt;br /&gt; &lt;br /&gt;            printf("%d",i);&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;30,20,10&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;'{' introduces new block and thus new scope. In the innermost block i is declared as, &lt;br /&gt; &lt;br /&gt;            const volatile unsigned&lt;br /&gt; &lt;br /&gt;which is a valid declaration. i is assumed of type int. So printf prints 30. In the&lt;br /&gt;next block, i has value 20 and so printf prints 20. In the outermost block, i is&lt;br /&gt;declared as extern, so no storage space is allocated for it. After compilation is&lt;br /&gt;over the linker resolves it to global variable i (since it is the only variable&lt;br /&gt;visible there). So it prints i's value as 10.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;69)       main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;                int *j;&lt;br /&gt; &lt;br /&gt;                {&lt;br /&gt; &lt;br /&gt;                 int i=10;&lt;br /&gt; &lt;br /&gt;                 j=&amp;i;&lt;br /&gt; &lt;br /&gt;                 }&lt;br /&gt; &lt;br /&gt;                 printf("%d",*j);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;10&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;The variable i is a block level variable and the visibility is inside that block&lt;br /&gt;only. But the lifetime of i is lifetime of the function so it lives upto the exit of&lt;br /&gt;main function. Since the i is still allocated space, *j prints the value stored in i&lt;br /&gt;since j points i.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;70)       main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            int i=-1;&lt;br /&gt; &lt;br /&gt;            -i;&lt;br /&gt; &lt;br /&gt;            printf("i = %d, -i = %d \n",i,-i);&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;i = -1, -i = 1&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;-i is executed and this execution doesn't affect the value of i. In printf first you&lt;br /&gt;just print the value of i. After that the value of the expression -i = -(-1) is&lt;br /&gt;printed.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;71)       #include&lt;stdio.h&gt;&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt; {&lt;br /&gt; &lt;br /&gt;   const int i=4;&lt;br /&gt; &lt;br /&gt;   float j;&lt;br /&gt; &lt;br /&gt;   j = ++i;&lt;br /&gt; &lt;br /&gt;   printf("%d  %f", i,++j);&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler error &lt;br /&gt; &lt;br /&gt;            Explanation:&lt;br /&gt; &lt;br /&gt;i is a constant. you cannot change the value of constant &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;72)       #include&lt;stdio.h&gt;&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;  int a[2][2][2] = { {10,2,3,4}, {5,6,7,8}  };&lt;br /&gt; &lt;br /&gt;  int *p,*q;&lt;br /&gt; &lt;br /&gt;  p=&amp;a[2][2][2];&lt;br /&gt; &lt;br /&gt;  *q=***a;&lt;br /&gt; &lt;br /&gt;  printf("%d..%d",*p,*q);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;garbagevalue..1&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;p=&amp;a[2][2][2]  you declare only two 2D arrays. but you are trying to access the&lt;br /&gt;third 2D(which you are not declared) it will print garbage values. *q=***a starting&lt;br /&gt;address of a is assigned integer pointer. now q is pointing to starting address of&lt;br /&gt;a.if you print *q meAnswer:it will print first element of 3D array.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;73)       #include&lt;stdio.h&gt;&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;  {&lt;br /&gt; &lt;br /&gt;    register i=5;&lt;br /&gt; &lt;br /&gt;    char j[]= "hello";                     &lt;br /&gt; &lt;br /&gt;     printf("%s  %d",j,i);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;hello 5&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;if you declare i as register  compiler will treat it as ordinary integer and it will&lt;br /&gt;take integer value. i value may be  stored  either in register  or in memory.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;74)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;              int i=5,j=6,z;&lt;br /&gt; &lt;br /&gt;              printf("%d",i+++j);&lt;br /&gt; &lt;br /&gt;             }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;11&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;the expression i+++j is treated as (i++ + j)    &lt;br /&gt; &lt;br /&gt;              &lt;br /&gt; &lt;br /&gt;76)       struct aaa{&lt;br /&gt; &lt;br /&gt;struct aaa *prev;&lt;br /&gt; &lt;br /&gt;int i;&lt;br /&gt; &lt;br /&gt;struct aaa *next;&lt;br /&gt; &lt;br /&gt;};&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; struct aaa abc,def,ghi,jkl;&lt;br /&gt; &lt;br /&gt; int x=100;&lt;br /&gt; &lt;br /&gt; abc.i=0;abc.prev=&amp;jkl;&lt;br /&gt; &lt;br /&gt; abc.next=&amp;def;&lt;br /&gt; &lt;br /&gt; def.i=1;def.prev=&amp;abc;def.next=&amp;ghi;&lt;br /&gt; &lt;br /&gt; ghi.i=2;ghi.prev=&amp;def;&lt;br /&gt; &lt;br /&gt; ghi.next=&amp;jkl;&lt;br /&gt; &lt;br /&gt; jkl.i=3;jkl.prev=&amp;ghi;jkl.next=&amp;abc;&lt;br /&gt; &lt;br /&gt; x=abc.next-&gt;next-&gt;prev-&gt;next-&gt;i;&lt;br /&gt; &lt;br /&gt; printf("%d",x);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;2&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;                        above all statements form a double circular linked list;&lt;br /&gt; &lt;br /&gt;abc.next-&gt;next-&gt;prev-&gt;next-&gt;i &lt;br /&gt; &lt;br /&gt;this one points to "ghi" node the value of at particular node is 2.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;77)       struct point&lt;br /&gt; &lt;br /&gt; {&lt;br /&gt; &lt;br /&gt; int x;&lt;br /&gt; &lt;br /&gt; int y;&lt;br /&gt; &lt;br /&gt; };&lt;br /&gt; &lt;br /&gt;struct point origin,*pp;&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;pp=&amp;origin;&lt;br /&gt; &lt;br /&gt;printf("origin is(%d%d)\n",(*pp).x,(*pp).y);&lt;br /&gt; &lt;br /&gt;printf("origin is (%d%d)\n",pp-&gt;x,pp-&gt;y);&lt;br /&gt; &lt;br /&gt;} &lt;br /&gt; &lt;br /&gt;            &lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;origin is(0,0)&lt;br /&gt; &lt;br /&gt;origin is(0,0) &lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;pp is a pointer to structure. we can access the elements of the structure either&lt;br /&gt;with arrow mark or with indirection operator. &lt;br /&gt; &lt;br /&gt;Note: &lt;br /&gt; &lt;br /&gt;Since structure point  is globally declared x &amp; y are initialized as zeroes &lt;br /&gt; &lt;br /&gt;                        &lt;br /&gt; &lt;br /&gt;78)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; int i=_l_abc(10);&lt;br /&gt; &lt;br /&gt;             printf("%d\n",--i);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;int _l_abc(int i)&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; return(i++);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;9&lt;br /&gt; &lt;br /&gt;Explanation: &lt;br /&gt; &lt;br /&gt;return(i++) it will first return i and then increments. i.e. 10 will be returned.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;79)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; char *p;&lt;br /&gt; &lt;br /&gt; int *q;&lt;br /&gt; &lt;br /&gt; long *r;&lt;br /&gt; &lt;br /&gt; p=q=r=0;&lt;br /&gt; &lt;br /&gt; p++;&lt;br /&gt; &lt;br /&gt; q++;&lt;br /&gt; &lt;br /&gt; r++;&lt;br /&gt; &lt;br /&gt; printf("%p...%p...%p",p,q,r);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;0001...0002...0004&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;++ operator  when applied to pointers increments address according to their&lt;br /&gt;corresponding data-types.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; 80)      main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; char c=' ',x,convert(z);&lt;br /&gt; &lt;br /&gt; getc(c);&lt;br /&gt; &lt;br /&gt; if((c&gt;='a') &amp;&amp; (c&lt;='z'))&lt;br /&gt; &lt;br /&gt; x=convert(c);&lt;br /&gt; &lt;br /&gt; printf("%c",x);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;convert(z)&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;  return z-32;&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer: &lt;br /&gt; &lt;br /&gt;Compiler error&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;declaration of convert and format of getc() are wrong.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-7057174419964703603?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/7057174419964703603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=7057174419964703603&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/7057174419964703603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/7057174419964703603'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/06/c-source-code-examples-part-4.html' title='c++ source code Examples Part 4'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-5904384177088568058</id><published>2009-06-08T00:05:00.000+05:30</published><updated>2009-06-08T00:07:12.877+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++ source code'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ example programs'/><category scheme='http://www.blogger.com/atom/ns#' term='C++ interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ faq'/><title type='text'>C++ source code Examples Part 3</title><content type='html'>41)       #include&lt;stdio.h&gt;&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;  struct xx&lt;br /&gt; &lt;br /&gt;   {&lt;br /&gt; &lt;br /&gt;      int x=3;&lt;br /&gt; &lt;br /&gt;      char name[]="hello";&lt;br /&gt; &lt;br /&gt;   };&lt;br /&gt; &lt;br /&gt;struct xx *s=malloc(sizeof(struct xx));&lt;br /&gt; &lt;br /&gt;printf("%d",s-&gt;x);&lt;br /&gt; &lt;br /&gt;printf("%s",s-&gt;name);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler Error&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Initialization should not be done for structure members inside the structure&lt;br /&gt;declaration&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;42)       #include&lt;stdio.h&gt;&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;struct xx&lt;br /&gt; &lt;br /&gt; {&lt;br /&gt; &lt;br /&gt;              int x;&lt;br /&gt; &lt;br /&gt;              struct yy&lt;br /&gt; &lt;br /&gt;               {&lt;br /&gt; &lt;br /&gt;                 char s;&lt;br /&gt; &lt;br /&gt;                 struct xx *p;&lt;br /&gt; &lt;br /&gt;               };&lt;br /&gt; &lt;br /&gt;                         struct yy *q;&lt;br /&gt; &lt;br /&gt;            };&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler Error&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;in the end of nested structure yy a member have to be declared.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;43)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; extern int i;&lt;br /&gt; &lt;br /&gt; i=20;&lt;br /&gt; &lt;br /&gt; printf("%d",sizeof(i));&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Linker error: undefined symbol '_i'.&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;extern declaration specifies that the variable i is defined somewhere else. The&lt;br /&gt;compiler passes the external variable to be resolved by the linker. So compiler&lt;br /&gt;doesn't find an error. During linking the linker searches for the definition of i.&lt;br /&gt;Since it is not found the linker flags an error.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;44)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;printf("%d", out);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;int out=100;&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler error: undefined symbol out in function main.&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;The rule is that a variable is available for use from the point of declaration. Even&lt;br /&gt;though a is a global variable, it is not available for main. Hence an error.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;45)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; extern out;&lt;br /&gt; &lt;br /&gt; printf("%d", out);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt; int out=100;&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;100      &lt;br /&gt; &lt;br /&gt;            Explanation:  &lt;br /&gt; &lt;br /&gt;This is the correct way of writing the previous program.&lt;br /&gt; &lt;br /&gt;                  &lt;br /&gt; &lt;br /&gt;46)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; show();&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;void show()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; printf("I'm the greatest");&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compier error: Type mismatch in redeclaration of show.&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;When the compiler sees the function show it doesn't know anything about it. So the&lt;br /&gt;default return type (ie, int) is assumed. But when compiler sees the actual&lt;br /&gt;definition of show mismatch occurs since it is declared as void. Hence the error.&lt;br /&gt; &lt;br /&gt;The solutions are as follows:&lt;br /&gt; &lt;br /&gt;1. declare void show() in main() .&lt;br /&gt; &lt;br /&gt;2. define show() before main().&lt;br /&gt; &lt;br /&gt;3. declare extern void show() before the use of show().&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;47)       main( )&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;  int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}};&lt;br /&gt; &lt;br /&gt;  printf(“%u %u %u %d \n”,a,*a,**a,***a);&lt;br /&gt; &lt;br /&gt;        printf(“%u %u %u %d \n”,a+1,*a+1,**a+1,***a+1);&lt;br /&gt; &lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;100, 100, 100, 2&lt;br /&gt; &lt;br /&gt;114, 104, 102, 3&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;                  The given array is a 3-D one. It can also be viewed as a 1-D array. &lt;br /&gt; &lt;br /&gt;                                                                                                                                                                                                                                                                      &lt;br /&gt; &lt;br /&gt;2&lt;br /&gt; &lt;br /&gt;4&lt;br /&gt; &lt;br /&gt;7&lt;br /&gt; &lt;br /&gt;8&lt;br /&gt; &lt;br /&gt;3&lt;br /&gt; &lt;br /&gt;4&lt;br /&gt; &lt;br /&gt;2&lt;br /&gt; &lt;br /&gt;2&lt;br /&gt; &lt;br /&gt;2&lt;br /&gt; &lt;br /&gt;3&lt;br /&gt; &lt;br /&gt;3&lt;br /&gt; &lt;br /&gt;4&lt;br /&gt; &lt;br /&gt;   100  102  104  106 108   110  112  114  116   118   120   122&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;thus, for the first printf statement a, *a, **a  give address of  first element .&lt;br /&gt;since the indirection ***a gives the value. Hence, the first line of the output.&lt;br /&gt; &lt;br /&gt;for the second printf a+1 increases in the third dimension thus points to value at&lt;br /&gt;114, *a+1 increments in second dimension thus points to 104, **a +1 increments the&lt;br /&gt;first dimension thus points to 102 and ***a+1 first gets the value at first location&lt;br /&gt;and then increments it by 1. Hence, the output.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;48)       main( )&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;  int a[ ] = {10,20,30,40,50},j,*p;&lt;br /&gt; &lt;br /&gt;  for(j=0; j&lt;5; j++)&lt;br /&gt; &lt;br /&gt;    {&lt;br /&gt; &lt;br /&gt;printf(“%d” ,*a); &lt;br /&gt; &lt;br /&gt;a++;&lt;br /&gt; &lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    p = a;&lt;br /&gt; &lt;br /&gt;   for(j=0; j&lt;5; j++) &lt;br /&gt; &lt;br /&gt;      {&lt;br /&gt; &lt;br /&gt;printf(“%d ” ,*p); &lt;br /&gt; &lt;br /&gt;p++;&lt;br /&gt; &lt;br /&gt;      }&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler error: lvalue required.&lt;br /&gt; &lt;br /&gt;                        &lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Error is in line with statement a++. The operand must be an lvalue and may be of any&lt;br /&gt;of scalar type for the any operator, array name only when subscripted is an lvalue.&lt;br /&gt;Simply array name is a non-modifiable lvalue.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;49)       main( )&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; static int  a[ ]   = {0,1,2,3,4};&lt;br /&gt; &lt;br /&gt; int  *p[ ] = {a,a+1,a+2,a+3,a+4};&lt;br /&gt; &lt;br /&gt; int  **ptr =  p;&lt;br /&gt; &lt;br /&gt; ptr++;&lt;br /&gt; &lt;br /&gt; printf(“\n %d  %d  %d”, ptr-p, *ptr-a, **ptr); &lt;br /&gt; &lt;br /&gt; *ptr++;&lt;br /&gt; &lt;br /&gt; printf(“\n %d  %d  %d”, ptr-p, *ptr-a, **ptr); &lt;br /&gt; &lt;br /&gt; *++ptr;&lt;br /&gt; &lt;br /&gt; printf(“\n %d  %d  %d”, ptr-p, *ptr-a, **ptr); &lt;br /&gt; &lt;br /&gt; ++*ptr;&lt;br /&gt; &lt;br /&gt;       printf(“\n %d  %d  %d”, ptr-p, *ptr-a, **ptr); &lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;            111&lt;br /&gt; &lt;br /&gt;            222&lt;br /&gt; &lt;br /&gt;            333&lt;br /&gt; &lt;br /&gt;            344&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Let us consider the array and the two pointers with some address&lt;br /&gt; &lt;br /&gt;a    &lt;br /&gt; &lt;br /&gt;0&lt;br /&gt; &lt;br /&gt;1&lt;br /&gt; &lt;br /&gt;2&lt;br /&gt; &lt;br /&gt;3&lt;br /&gt; &lt;br /&gt;4&lt;br /&gt; &lt;br /&gt;   100      102      104      106      108&lt;br /&gt; &lt;br /&gt;                                                           p&lt;br /&gt; &lt;br /&gt;100&lt;br /&gt; &lt;br /&gt;102&lt;br /&gt; &lt;br /&gt;104&lt;br /&gt; &lt;br /&gt;106&lt;br /&gt; &lt;br /&gt;108&lt;br /&gt; &lt;br /&gt;                                       1000    1002    1004    1006    1008&lt;br /&gt; &lt;br /&gt;           ptr  &lt;br /&gt; &lt;br /&gt;1000&lt;br /&gt; &lt;br /&gt;2000&lt;br /&gt; &lt;br /&gt;After execution of the instruction ptr++ value in ptr becomes 1002, if scaling&lt;br /&gt;factor for integer is 2 bytes. Now ptr – p is value in ptr – starting location of&lt;br /&gt;array p, (1002 – 1000) / (scaling factor) = 1,  *ptr – a = value at address pointed&lt;br /&gt;by ptr – starting value of array a, 1002 has a value 102  so the value is (102 –&lt;br /&gt;100)/(scaling factor) = 1,  **ptr is the value stored in the location pointed by &lt;br /&gt;the pointer of ptr = value pointed by value pointed by 1002 = value pointed by 102 =&lt;br /&gt;1. Hence the output of the firs printf is  1, 1, 1.&lt;br /&gt; &lt;br /&gt;After execution of *ptr++ increments value of the value in ptr by scaling factor, so&lt;br /&gt;it becomes1004. Hence, the outputs for the second printf are ptr – p = 2, *ptr – a =&lt;br /&gt;2, **ptr = 2. &lt;br /&gt; &lt;br /&gt;After execution of *++ptr increments value of the value in ptr by scaling factor, so&lt;br /&gt;it becomes1004. Hence, the outputs for the third printf are ptr – p = 3, *ptr – a =&lt;br /&gt;3, **ptr = 3. &lt;br /&gt; &lt;br /&gt;After execution of ++*ptr value in ptr remains the same, the value pointed by the&lt;br /&gt;value is incremented by the scaling factor. So the value in array p at location 1006&lt;br /&gt;changes from 106 10 108,. Hence, the outputs for the fourth printf are ptr – p =&lt;br /&gt;1006 – 1000 = 3, *ptr – a = 108 – 100 = 4, **ptr = 4. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;50)       main( )&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; char  *q;&lt;br /&gt; &lt;br /&gt; int  j;&lt;br /&gt; &lt;br /&gt; for (j=0; j&lt;3; j++) scanf(“%s” ,(q+j));&lt;br /&gt; &lt;br /&gt; for (j=0; j&lt;3; j++) printf(“%c” ,*(q+j));&lt;br /&gt; &lt;br /&gt; for (j=0; j&lt;3; j++) printf(“%s” ,(q+j));&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Here we have only one pointer to type char and since we take input in the same&lt;br /&gt;pointer thus we keep writing over in the same location, each time shifting the&lt;br /&gt;pointer value by 1. Suppose the inputs are MOUSE,  TRACK and VIRTUAL. Then for the&lt;br /&gt;first input suppose the pointer starts at location 100 then the input one is stored&lt;br /&gt;as&lt;br /&gt;MOU&lt;br /&gt;S&lt;br /&gt; &lt;br /&gt;E&lt;br /&gt; &lt;br /&gt;\0&lt;br /&gt; &lt;br /&gt;When the second input is given the pointer is incremented as j value becomes 1, so&lt;br /&gt;the input is filled in memory starting from 101.&lt;br /&gt;MTRACK\0&lt;br /&gt;The third input  starts filling from the location 102&lt;br /&gt;MTVIRTUAL&lt;br /&gt;\0&lt;br /&gt; &lt;br /&gt;This is the final value stored .&lt;br /&gt; &lt;br /&gt;The first printf prints the values at the position q, q+1 and q+2  = M T V&lt;br /&gt; &lt;br /&gt;The second printf prints three strings starting from locations q, q+1, q+2&lt;br /&gt; &lt;br /&gt; i.e  MTVIRTUAL, TVIRTUAL and VIRTUAL.&lt;br /&gt; &lt;br /&gt;   &lt;br /&gt; &lt;br /&gt;51)       main( )&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; void *vp;&lt;br /&gt; &lt;br /&gt; char ch = ‘g’, *cp = “goofy”;&lt;br /&gt; &lt;br /&gt; int j = 20;&lt;br /&gt; &lt;br /&gt; vp = &amp;ch;&lt;br /&gt; &lt;br /&gt; printf(“%c”, *(char *)vp);&lt;br /&gt; &lt;br /&gt; vp = &amp;j;&lt;br /&gt; &lt;br /&gt; printf(“%d”,*(int *)vp);&lt;br /&gt; &lt;br /&gt; vp = cp;&lt;br /&gt; &lt;br /&gt; printf(“%s”,(char *)vp + 3);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;            g20fy&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Since a void pointer is used it can be type casted to any  other type pointer. vp =&lt;br /&gt;&amp;ch  stores address of char ch and the next statement prints the value stored in vp&lt;br /&gt;after type casting it to the proper data type pointer. the output is ‘g’. Similarly &lt;br /&gt;the output from second printf is ‘20’. The third printf statement type casts it to&lt;br /&gt;print the string from the 4th value hence the output is ‘fy’.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;52)       main ( )&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; static char *s[ ]  = {“black”, “white”, “yellow”, “violet”};&lt;br /&gt; &lt;br /&gt; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p;&lt;br /&gt; &lt;br /&gt; p = ptr;&lt;br /&gt; &lt;br /&gt; **++p;&lt;br /&gt; &lt;br /&gt; printf(“%s”,*--*++p + 3);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;            ck&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;In this problem we have an array of char pointers pointing to start of 4 strings.&lt;br /&gt;Then we have ptr which is a pointer to a pointer of type char and a variable p which&lt;br /&gt;is a pointer to a pointer to a pointer of type char. p hold the initial value of&lt;br /&gt;ptr, i.e. p = s+3. The next statement increment value in p by 1 , thus now value of&lt;br /&gt;p =  s+2. In the printf statement the expression is evaluated *++p causes gets value&lt;br /&gt;s+1 then the pre decrement is executed and we get s+1 – 1 = s . the indirection&lt;br /&gt;operator now gets the value from the array of s and adds 3 to the starting address.&lt;br /&gt;The string is printed starting from this position. Thus, the output is ‘ck’.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;53)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; int  i, n;&lt;br /&gt; &lt;br /&gt; char *x = “girl”;&lt;br /&gt; &lt;br /&gt; n = strlen(x);&lt;br /&gt; &lt;br /&gt; *x = x[n];&lt;br /&gt; &lt;br /&gt; for(i=0; i&lt;n; ++i)&lt;br /&gt; &lt;br /&gt;   {&lt;br /&gt; &lt;br /&gt;printf(“%s\n”,x);&lt;br /&gt; &lt;br /&gt;x++;&lt;br /&gt; &lt;br /&gt;   }&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;(blank space)&lt;br /&gt; &lt;br /&gt;irl&lt;br /&gt; &lt;br /&gt;rl&lt;br /&gt; &lt;br /&gt;l&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Here a string (a pointer to char) is initialized with a value “girl”.  The strlen&lt;br /&gt;function returns the length of the string, thus n has a value 4. The next statement&lt;br /&gt;assigns value at the nth location (‘\0’) to the first location. Now the string&lt;br /&gt;becomes “\0irl” . Now the printf statement prints the string after each iteration it&lt;br /&gt;increments it starting position.  Loop starts from 0 to 4. The first time x[0] =&lt;br /&gt;‘\0’ hence it prints nothing and pointer value is incremented. The second time it&lt;br /&gt;prints from x[1] i.e “irl” and the third time it prints “rl” and the last time it&lt;br /&gt;prints “l” and the loop terminates.&lt;br /&gt; &lt;br /&gt;54)       int i,j;&lt;br /&gt; &lt;br /&gt;            for(i=0;i&lt;=10;i++)&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            j+=5;&lt;br /&gt; &lt;br /&gt;            assert(i&lt;5);&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer: &lt;br /&gt; &lt;br /&gt;Runtime error: Abnormal program termination. &lt;br /&gt; &lt;br /&gt;                                    assert failed (i&lt;5), &lt;file name&gt;,&lt;line number&gt; &lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;asserts are used during debugging to make sure that certain conditions are&lt;br /&gt;satisfied. If assertion fails, the program will terminate reporting the same. After&lt;br /&gt;debugging use,&lt;br /&gt; &lt;br /&gt;            #undef NDEBUG&lt;br /&gt; &lt;br /&gt;and this will disable all the assertions from the source code. Assertion&lt;br /&gt; &lt;br /&gt;is a good debugging tool to make use of.  &lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt;55)       main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            int i=-1;&lt;br /&gt; &lt;br /&gt;            +i;&lt;br /&gt; &lt;br /&gt;            printf("i = %d, +i = %d \n",i,+i);&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt; i = -1, +i = -1&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Unary + is the only dummy operator in C. Where-ever it comes you can just ignore it&lt;br /&gt;just because it has no effect in the expressions (hence the name dummy operator).&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;56)       What are the files which are automatically opened when a C file is executed?&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;stdin, stdout, stderr (standard input,standard output,standard error).&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;57) what will be the position of the file marker?&lt;br /&gt; &lt;br /&gt;            a: fseek(ptr,0,SEEK_SET);&lt;br /&gt; &lt;br /&gt;            b: fseek(ptr,0,SEEK_CUR);&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;Answer :&lt;br /&gt; &lt;br /&gt;            a: The SEEK_SET sets the file position marker to the starting of the file.&lt;br /&gt; &lt;br /&gt;                        b: The SEEK_CUR sets the file position marker to the current&lt;br /&gt;position&lt;br /&gt; &lt;br /&gt;            of the file.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;58)       main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            char name[10],s[12];&lt;br /&gt; &lt;br /&gt;            scanf(" \"%[^\"]\"",s);&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;            How scanf will execute? &lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;First it checks for the leading white space and discards it.Then it matches with a&lt;br /&gt;quotation mark and then it  reads all character upto another quotation mark.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;59)       What is the problem with the following code segment?&lt;br /&gt; &lt;br /&gt;            while ((fgets(receiving array,50,file_ptr)) != EOF)&lt;br /&gt; &lt;br /&gt;                                    ;&lt;br /&gt; &lt;br /&gt;Answer &amp; Explanation:&lt;br /&gt; &lt;br /&gt;fgets returns a pointer. So the correct end of file check is checking for != NULL.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;60)       main()&lt;br /&gt; &lt;br /&gt;            {&lt;br /&gt; &lt;br /&gt;            main();&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt; Runtime error : Stack overflow.&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;main function calls itself again and again. Each time the function is called its&lt;br /&gt;return address is stored in the call stack. Since there is no condition to terminate&lt;br /&gt;the function call, the call stack overflows at runtime. So it terminates the program&lt;br /&gt;and results in an error.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-5904384177088568058?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/5904384177088568058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=5904384177088568058&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/5904384177088568058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/5904384177088568058'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/06/c-source-code-examples-part-3.html' title='C++ source code Examples Part 3'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-7039658216327483005</id><published>2009-06-08T00:03:00.000+05:30</published><updated>2009-06-08T00:05:22.670+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++ source code'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ example programs'/><category scheme='http://www.blogger.com/atom/ns#' term='C++ interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='c++ faq'/><title type='text'>c++ source code Examples Part 2</title><content type='html'>21.  #define square(x) x*x&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;int i;&lt;br /&gt; &lt;br /&gt;i = 64/square(4);&lt;br /&gt; &lt;br /&gt;printf("%d",i);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;64&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;the macro call square(4) will substituted by 4*4 so the expression becomes i =&lt;br /&gt;64/4*4 . Since / and * has equal priority the expression will be evaluated as&lt;br /&gt;(64/4)*4 i.e. 16*4 = 64&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt;22.  main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;char *p="hai friends",*p1;&lt;br /&gt; &lt;br /&gt;p1=p;&lt;br /&gt; &lt;br /&gt;while(*p!='\0') ++*p++;&lt;br /&gt; &lt;br /&gt;printf("%s   %s",p,p1);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;ibj!gsjfoet&lt;br /&gt; &lt;br /&gt;            Explanation:&lt;br /&gt; &lt;br /&gt;                        ++*p++ will be parse in the given order&lt;br /&gt; &lt;br /&gt;Ø      *p that is value at the location currently pointed by p will be taken&lt;br /&gt; &lt;br /&gt;Ø      ++*p the retrieved value will be incremented &lt;br /&gt; &lt;br /&gt;Ø      when ; is encountered the location will be incremented that is p++ will be&lt;br /&gt;executed&lt;br /&gt; &lt;br /&gt;Hence, in the while loop initial value pointed by p is ‘h’, which is changed to ‘i’&lt;br /&gt;by executing ++*p and pointer moves to point, ‘a’ which is similarly changed to ‘b’&lt;br /&gt;and so on. Similarly blank space is converted to ‘!’. Thus, we obtain value in p&lt;br /&gt;becomes “ibj!gsjfoet” and since p reaches ‘\0’ and p1 points to p thus p1doesnot&lt;br /&gt;print anything. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;23.  #include &lt;stdio.h&gt;&lt;br /&gt; &lt;br /&gt;#define a 10&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;#define a 50&lt;br /&gt; &lt;br /&gt;printf("%d",a);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;50&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;The preprocessor directives can be redefined anywhere in the program. So the most&lt;br /&gt;recently assigned value will be taken.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;24.  #define clrscr() 100&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;clrscr();&lt;br /&gt; &lt;br /&gt;printf("%d\n",clrscr());&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;100&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Preprocessor executes as a seperate pass before the execution of the compiler. So&lt;br /&gt;textual replacement of clrscr() to 100 occurs.The input  program to compiler looks&lt;br /&gt;like this :&lt;br /&gt; &lt;br /&gt;                        main()&lt;br /&gt; &lt;br /&gt;                        {&lt;br /&gt; &lt;br /&gt;                             100;&lt;br /&gt; &lt;br /&gt;                             printf("%d\n",100);&lt;br /&gt; &lt;br /&gt;                        }&lt;br /&gt; &lt;br /&gt;            Note:   &lt;br /&gt; &lt;br /&gt;100; is an executable statement but with no action. So it doesn't give any problem&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;25.  main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;printf("%p",main);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;                        Some address will be printed.&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;            Function names are just addresses (just like array names are addresses).&lt;br /&gt; &lt;br /&gt;main() is also a function. So the address of function main will be printed. %p in&lt;br /&gt;printf specifies that the argument is an address. They are printed as hexadecimal&lt;br /&gt;numbers.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;27)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;clrscr();&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;clrscr();&lt;br /&gt; &lt;br /&gt;            &lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;No output/error&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;The first clrscr() occurs inside a function. So it becomes a function call. In the&lt;br /&gt;second clrscr(); is a function declaration (because it is not inside any function).&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;28)       enum colors {BLACK,BLUE,GREEN}&lt;br /&gt; &lt;br /&gt; main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; printf("%d..%d..%d",BLACK,BLUE,GREEN);&lt;br /&gt; &lt;br /&gt;   &lt;br /&gt; &lt;br /&gt; return(1);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;0..1..2&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;enum assigns numbers starting from 0, if not explicitly defined.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;29)       void main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; char far *farther,*farthest;&lt;br /&gt; &lt;br /&gt;  &lt;br /&gt; &lt;br /&gt; printf("%d..%d",sizeof(farther),sizeof(farthest));&lt;br /&gt; &lt;br /&gt;   &lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;4..2  &lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;            the second pointer is of char type and not a far pointer&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;30)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; int i=400,j=300;&lt;br /&gt; &lt;br /&gt; printf("%d..%d");&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;400..300&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;printf takes the values of the first two assignments of the program. Any number of&lt;br /&gt;printf's may be given. All of them take only the first two values. If more number of&lt;br /&gt;assignments given in the program,then printf will take garbage values.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;31)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt; char *p;&lt;br /&gt; &lt;br /&gt; p="Hello";&lt;br /&gt; &lt;br /&gt; printf("%c\n",*&amp;*p);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;H &lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;* is a dereference operator &amp; is a reference  operator. They can be    applied any&lt;br /&gt;number of times provided it is meaningful. Here  p points to  the first character in&lt;br /&gt;the string "Hello". *p dereferences it and so its value is H. Again  &amp; references it&lt;br /&gt;to an address and * dereferences it to the value H.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;32)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;    int i=1;&lt;br /&gt; &lt;br /&gt;    while (i&lt;=5)&lt;br /&gt; &lt;br /&gt;    {&lt;br /&gt; &lt;br /&gt;       printf("%d",i);&lt;br /&gt; &lt;br /&gt;       if (i&gt;2)&lt;br /&gt; &lt;br /&gt;              goto here;&lt;br /&gt; &lt;br /&gt;       i++;&lt;br /&gt; &lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;fun()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;   here:&lt;br /&gt; &lt;br /&gt;     printf("PP");&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler error: Undefined label 'here' in function main&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Labels have functions scope, in other words The scope of the labels is limited to&lt;br /&gt;functions . The label 'here' is available in function fun() Hence it is not visible&lt;br /&gt;in function main.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;33)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;   static char names[5][20]={"pascal","ada","cobol","fortran","perl"};&lt;br /&gt; &lt;br /&gt;    int i;&lt;br /&gt; &lt;br /&gt;    char *t;&lt;br /&gt; &lt;br /&gt;    t=names[3];&lt;br /&gt; &lt;br /&gt;    names[3]=names[4];&lt;br /&gt; &lt;br /&gt;    names[4]=t;  &lt;br /&gt; &lt;br /&gt;    for (i=0;i&lt;=4;i++)&lt;br /&gt; &lt;br /&gt;            printf("%s",names[i]);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler error: Lvalue required in function main&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Array names are pointer constants. So it cannot be modified.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;34)       void main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;            int i=5;&lt;br /&gt; &lt;br /&gt;            printf("%d",i++ + ++i);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Output Cannot be predicted  exactly.&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Side effects are involved in the evaluation of   i&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;35)       void main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;            int i=5;&lt;br /&gt; &lt;br /&gt;            printf("%d",i+++++i);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler Error &lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;The expression i+++++i is parsed as i ++ ++ + i which is an illegal combination of&lt;br /&gt;operators. &lt;br /&gt; &lt;br /&gt;   &lt;br /&gt; &lt;br /&gt;36)       #include&lt;stdio.h&gt;&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;int i=1,j=2;&lt;br /&gt; &lt;br /&gt;switch(i)&lt;br /&gt; &lt;br /&gt; {&lt;br /&gt; &lt;br /&gt; case 1:  printf("GOOD");&lt;br /&gt; &lt;br /&gt;                break;&lt;br /&gt; &lt;br /&gt; case j:  printf("BAD");&lt;br /&gt; &lt;br /&gt;               break;&lt;br /&gt; &lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;Compiler Error: Constant expression required in function main.&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;The case statement can have only constant expressions (this implies that we cannot&lt;br /&gt;use variable names directly so an error).&lt;br /&gt; &lt;br /&gt;            Note:&lt;br /&gt; &lt;br /&gt;Enumerated types can be used in case statements. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;37)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;int i;&lt;br /&gt; &lt;br /&gt;printf("%d",scanf("%d",&amp;i));  // value 10 is given as input here&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;1&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;Scanf returns number of items successfully read and not 1/0.  Here 10 is given as&lt;br /&gt;input which should have been scanned successfully. So number of items read is 1. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;38)       #define f(g,g2) g##g2&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;int var12=100;&lt;br /&gt; &lt;br /&gt;printf("%d",f(var,12));&lt;br /&gt; &lt;br /&gt;            }&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;100 &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;39)       main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;int i=0;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;for(;i++;printf("%d",i)) ;&lt;br /&gt; &lt;br /&gt;printf("%d",i);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;            1&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;before entering into the for loop the checking condition is "evaluated". Here it&lt;br /&gt;evaluates to 0 (false) and comes out of the loop, and i is incremented (note the&lt;br /&gt;semicolon after the for loop).&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;40)       #include&lt;stdio.h&gt;&lt;br /&gt; &lt;br /&gt;main()&lt;br /&gt; &lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;  char s[]={'a','b','c','\n','c','\0'};&lt;br /&gt; &lt;br /&gt;  char *p,*str,*str1;&lt;br /&gt; &lt;br /&gt;  p=&amp;s[3];&lt;br /&gt; &lt;br /&gt;  str=p;&lt;br /&gt; &lt;br /&gt;  str1=s;&lt;br /&gt; &lt;br /&gt;  printf("%d",++*p + ++*str1-32);&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Answer:&lt;br /&gt; &lt;br /&gt;M&lt;br /&gt; &lt;br /&gt;Explanation:&lt;br /&gt; &lt;br /&gt;p is pointing to character '\n'.str1 is pointing to character 'a' ++*p meAnswer:"p&lt;br /&gt;is pointing to '\n' and that is incremented by one." the ASCII value of '\n' is 10.&lt;br /&gt;then it is incremented to 11. the value of ++*p is 11. ++*str1 meAnswer:"str1 is&lt;br /&gt;pointing to 'a' that is incremented by 1 and it becomes 'b'. ASCII value of 'b' is&lt;br /&gt;98. both 11 and 98 is added and result is subtracted from 32. &lt;br /&gt; &lt;br /&gt;i.e. (11+98-32)=77("M");&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-7039658216327483005?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/7039658216327483005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=7039658216327483005&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/7039658216327483005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/7039658216327483005'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/06/c-source-code-examples-part-2.html' title='c++ source code Examples Part 2'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-6673325558965834090</id><published>2009-06-07T23:55:00.003+05:30</published><updated>2009-06-08T00:00:44.876+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='c++ source code'/><title type='text'>c++ source code Examples Part 1</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 10"&gt;&lt;meta name="Originator" content="Microsoft Word 10"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CSHIVLEE%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"&gt;&lt;/o:smarttagtype&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:officedocumentsettings&gt;   &lt;o:relyonvml/&gt;   &lt;o:allowpng/&gt;  &lt;/o:OfficeDocumentSettings&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;   &lt;/w:Compatibility&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if !mso]&gt;&lt;object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id="ieooui"&gt;&lt;/object&gt; &lt;style&gt; st1\:*{behavior:url(#ieooui) } &lt;/style&gt; &lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face 	{font-family:Tahoma; 	panose-1:2 11 6 4 3 5 4 4 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:1627421319 -2147483648 8 0 66047 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face 	{font-family:Cambria; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073741899 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:Calibri; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman";} h2 	{mso-style-noshow:yes; 	mso-style-next:Normal; 	margin-top:10.0pt; 	margin-right:0in; 	margin-bottom:0in; 	margin-left:0in; 	margin-bottom:.0001pt; 	line-height:115%; 	mso-pagination:widow-orphan lines-together; 	page-break-after:avoid; 	mso-outline-level:2; 	font-size:13.0pt; 	font-family:Cambria; 	color:#4F81BD; 	font-weight:bold;} h3 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	mso-outline-level:3; 	font-size:13.5pt; 	font-family:"Times New Roman"; 	font-weight:bold;} a:link, span.MsoHyperlink 	{mso-style-noshow:yes; 	color:blue; 	text-decoration:underline; 	text-underline:single;} a:visited, span.MsoHyperlinkFollowed 	{color:purple; 	text-decoration:underline; 	text-underline:single;} p 	{mso-margin-top-alt:auto; 	margin-right:0in; 	mso-margin-bottom-alt:auto; 	margin-left:0in; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} pre 	{margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	tab-stops:45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; 	font-size:10.0pt; 	font-family:"Courier New"; 	mso-fareast-font-family:"Times New Roman";} tt 	{mso-style-noshow:yes; 	font-family:"Courier New"; 	mso-ascii-font-family:"Courier New"; 	mso-fareast-font-family:"Times New Roman"; 	mso-hansi-font-family:"Courier New"; 	mso-bidi-font-family:"Courier New";} p.ListParagraph, li.ListParagraph, div.ListParagraph 	{mso-style-name:"List Paragraph"; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:.5in; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:Calibri; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman";} p.ListParagraphCxSpFirst, li.ListParagraphCxSpFirst, div.ListParagraphCxSpFirst 	{mso-style-name:"List ParagraphCxSpFirst"; 	mso-style-type:export-only; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:0in; 	margin-left:.5in; 	margin-bottom:.0001pt; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:Calibri; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman";} p.ListParagraphCxSpMiddle, li.ListParagraphCxSpMiddle, div.ListParagraphCxSpMiddle 	{mso-style-name:"List ParagraphCxSpMiddle"; 	mso-style-type:export-only; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:0in; 	margin-left:.5in; 	margin-bottom:.0001pt; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:Calibri; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman";} p.ListParagraphCxSpLast, li.ListParagraphCxSpLast, div.ListParagraphCxSpLast 	{mso-style-name:"List ParagraphCxSpLast"; 	mso-style-type:export-only; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:.5in; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:Calibri; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman";} span.italic 	{mso-style-name:italic;} span.pk 	{mso-style-name:pk;} span.Char 	{mso-style-name:" Char"; 	mso-style-noshow:yes; 	mso-style-link:"Balloon Text"; 	mso-ansi-font-size:8.0pt; 	mso-bidi-font-size:8.0pt; 	font-family:Tahoma; 	mso-ascii-font-family:Tahoma; 	mso-fareast-font-family:Calibri; 	mso-hansi-font-family:Tahoma; 	mso-bidi-font-family:Tahoma; 	mso-ansi-language:EN-US; 	mso-fareast-language:EN-US; 	mso-bidi-language:AR-SA;} span.klink 	{mso-style-name:klink;} span.kw 	{mso-style-name:kw;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:-132; 	mso-list-type:simple; 	mso-list-template-ids:718861580;} @list l0:level1 	{mso-level-tab-stop:1.25in; 	mso-level-number-position:left; 	margin-left:1.25in; 	text-indent:-.25in;} @list l1 	{mso-list-id:-131; 	mso-list-type:simple; 	mso-list-template-ids:462086524;} @list l1:level1 	{mso-level-tab-stop:1.0in; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in;} @list l2 	{mso-list-id:-130; 	mso-list-type:simple; 	mso-list-template-ids:162444386;} @list l2:level1 	{mso-level-tab-stop:.75in; 	mso-level-number-position:left; 	margin-left:.75in; 	text-indent:-.25in;} @list l3 	{mso-list-id:-129; 	mso-list-type:simple; 	mso-list-template-ids:1541181084;} @list l3:level1 	{mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l4 	{mso-list-id:-128; 	mso-list-type:simple; 	mso-list-template-ids:-1994621262;} @list l4:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:1.25in; 	mso-level-number-position:left; 	margin-left:1.25in; 	text-indent:-.25in; 	font-family:Symbol;} @list l5 	{mso-list-id:-127; 	mso-list-type:simple; 	mso-list-template-ids:-59320694;} @list l5:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:1.0in; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in; 	font-family:Symbol;} @list l6 	{mso-list-id:-126; 	mso-list-type:simple; 	mso-list-template-ids:-1462089782;} @list l6:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.75in; 	mso-level-number-position:left; 	margin-left:.75in; 	text-indent:-.25in; 	font-family:Symbol;} @list l7 	{mso-list-id:-125; 	mso-list-type:simple; 	mso-list-template-ids:1027914936;} @list l7:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Symbol;} @list l8 	{mso-list-id:-120; 	mso-list-type:simple; 	mso-list-template-ids:1501322392;} @list l8:level1 	{mso-level-tab-stop:.25in; 	mso-level-number-position:left; 	margin-left:.25in; 	text-indent:-.25in;} @list l9 	{mso-list-id:-119; 	mso-list-type:simple; 	mso-list-template-ids:-1803907356;} @list l9:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.25in; 	mso-level-number-position:left; 	margin-left:.25in; 	text-indent:-.25in; 	font-family:Symbol;} @list l10 	{mso-list-id:120728403; 	mso-list-type:hybrid; 	mso-list-template-ids:1902799502 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l10:level1 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l11 	{mso-list-id:162205563; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l11:level1 	{mso-level-start-at:2; 	mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l12 	{mso-list-id:197818146; 	mso-list-type:hybrid; 	mso-list-template-ids:-1814390832 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l12:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l12:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l12:level3 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l13 	{mso-list-id:214633515; 	mso-list-type:hybrid; 	mso-list-template-ids:-16380244 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l13:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l13:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l14 	{mso-list-id:215237571; 	mso-list-type:simple; 	mso-list-template-ids:-1292485160;} @list l14:level1 	{mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l15 	{mso-list-id:226689597; 	mso-list-type:hybrid; 	mso-list-template-ids:391397472 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l15:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l15:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l16 	{mso-list-id:257641153; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l16:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l17 	{mso-list-id:275329619; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l17:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l18 	{mso-list-id:283511270; 	mso-list-type:hybrid; 	mso-list-template-ids:-1852781780 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l18:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l18:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l19 	{mso-list-id:338627553; 	mso-list-type:hybrid; 	mso-list-template-ids:1364488884 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l19:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l19:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l20 	{mso-list-id:351961035; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l20:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l21 	{mso-list-id:388040308; 	mso-list-type:hybrid; 	mso-list-template-ids:-1998707180 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l21:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l21:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l22 	{mso-list-id:458963445; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l22:level1 	{mso-level-start-at:2; 	mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l23 	{mso-list-id:502621903; 	mso-list-type:hybrid; 	mso-list-template-ids:-773144704 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l23:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l23:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l24 	{mso-list-id:527184361; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l24:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l25 	{mso-list-id:547112380; 	mso-list-type:hybrid; 	mso-list-template-ids:-2054128720 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l25:level1 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l25:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.5in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l26 	{mso-list-id:601956909; 	mso-list-type:hybrid; 	mso-list-template-ids:-1626436694 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l26:level1 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l27 	{mso-list-id:612172979; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l27:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l28 	{mso-list-id:675772064; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l28:level1 	{mso-level-start-at:2; 	mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l29 	{mso-list-id:693699801; 	mso-list-type:hybrid; 	mso-list-template-ids:1907260308 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l29:level1 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l30 	{mso-list-id:714474502; 	mso-list-type:hybrid; 	mso-list-template-ids:560077464 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l30:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l30:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l31 	{mso-list-id:777720204; 	mso-list-type:hybrid; 	mso-list-template-ids:288945544 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l31:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l31:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l32 	{mso-list-id:781144929; 	mso-list-type:hybrid; 	mso-list-template-ids:3419794 67698689 67698689 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l32:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.5in; 	text-indent:-.25in; 	font-family:Symbol;} @list l32:level2 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:2.0in; 	text-indent:-.25in; 	font-family:Symbol;} @list l33 	{mso-list-id:837505930; 	mso-list-type:hybrid; 	mso-list-template-ids:-934801692 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l33:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l33:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l34 	{mso-list-id:890845880; 	mso-list-type:hybrid; 	mso-list-template-ids:-975133136 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l34:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l34:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l35 	{mso-list-id:943925769; 	mso-list-type:hybrid; 	mso-list-template-ids:1918372802 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l35:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l35:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l36 	{mso-list-id:1099369616; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l36:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l37 	{mso-list-id:1100103000; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l37:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l38 	{mso-list-id:1112748303; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l38:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l39 	{mso-list-id:1127548236; 	mso-list-type:hybrid; 	mso-list-template-ids:30326230 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l39:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l39:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l40 	{mso-list-id:1197623986; 	mso-list-type:simple; 	mso-list-template-ids:-1292485160;} @list l40:level1 	{mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l41 	{mso-list-id:1206137693; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l41:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l42 	{mso-list-id:1321810628; 	mso-list-type:hybrid; 	mso-list-template-ids:-1807056140 67698711 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l42:level1 	{mso-level-number-format:alpha-lower; 	mso-level-text:"%1\)"; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l43 	{mso-list-id:1347559219; 	mso-list-type:hybrid; 	mso-list-template-ids:383920488 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l43:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l43:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l44 	{mso-list-id:1373268067; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l44:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l45 	{mso-list-id:1380205676; 	mso-list-type:hybrid; 	mso-list-template-ids:780556570 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l45:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l45:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l45:level3 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l46 	{mso-list-id:1395423223; 	mso-list-type:hybrid; 	mso-list-template-ids:-1194441540 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l46:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l46:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l47 	{mso-list-id:1423064206; 	mso-list-type:hybrid; 	mso-list-template-ids:-843308932 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l47:level1 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l48 	{mso-list-id:1424762690; 	mso-list-type:hybrid; 	mso-list-template-ids:-721650238 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l48:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l48:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l49 	{mso-list-id:1465923847; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l49:level1 	{mso-level-start-at:2; 	mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l50 	{mso-list-id:1515340205; 	mso-list-type:hybrid; 	mso-list-template-ids:240835260 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l50:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l50:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l51 	{mso-list-id:1593975099; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l51:level1 	{mso-level-start-at:2; 	mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l52 	{mso-list-id:1669675441; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l52:level1 	{mso-level-start-at:2; 	mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l53 	{mso-list-id:1693415778; 	mso-list-type:hybrid; 	mso-list-template-ids:902045512 1494769650 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l53:level1 	{mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.25in; 	text-indent:-.25in;} @list l54 	{mso-list-id:1698236560; 	mso-list-type:hybrid; 	mso-list-template-ids:1586810332 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l54:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l54:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l55 	{mso-list-id:1703901406; 	mso-list-type:hybrid; 	mso-list-template-ids:-1981223492 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l55:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l55:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l56 	{mso-list-id:1732272313; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l56:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l57 	{mso-list-id:1762871402; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l57:level1 	{mso-level-start-at:2; 	mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l58 	{mso-list-id:1771929184; 	mso-list-type:hybrid; 	mso-list-template-ids:-643412024 -1031394728 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l58:level1 	{mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.25in; 	text-indent:-.25in;} @list l59 	{mso-list-id:1789662225; 	mso-list-type:hybrid; 	mso-list-template-ids:665611326 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l59:level1 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l60 	{mso-list-id:1834224125; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l60:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l61 	{mso-list-id:1854606111; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l61:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l62 	{mso-list-id:1910799055; 	mso-list-type:hybrid; 	mso-list-template-ids:1025292108 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l62:level1 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l63 	{mso-list-id:1963919789; 	mso-list-type:hybrid; 	mso-list-template-ids:-608639784 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l63:level1 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:.75in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l64 	{mso-list-id:1981879563; 	mso-list-type:hybrid; 	mso-list-template-ids:1205610974 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l64:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l64:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l65 	{mso-list-id:1996180414; 	mso-list-type:hybrid; 	mso-list-template-ids:-2055592870 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l65:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l65:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l65:level3 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l66 	{mso-list-id:1997763336; 	mso-list-type:hybrid; 	mso-list-template-ids:-95000244 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l66:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:2.0in; 	text-indent:-.25in; 	font-family:Symbol;} @list l67 	{mso-list-id:2041661490; 	mso-list-type:hybrid; 	mso-list-template-ids:1727665760 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l67:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Wingdings;} @list l67:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} @list l68 	{mso-list-id:2044402162; 	mso-list-type:hybrid; 	mso-list-template-ids:546588222 67698701 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l68:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:43.45pt; 	text-indent:-.25in; 	font-family:Wingdings;} @list l68:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:79.45pt; 	text-indent:-.25in; 	font-family:"Courier New";} @list l69 	{mso-list-id:2046522114; 	mso-list-type:hybrid; 	mso-list-template-ids:-1837353878 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l69:level1 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.0in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l70 	{mso-list-id:2087532415; 	mso-list-type:hybrid; 	mso-list-template-ids:1655736028 67698691 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l70:level1 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:1.5in; 	text-indent:-.25in; 	font-family:"Courier New";} @list l71 	{mso-list-id:2090999896; 	mso-list-type:simple; 	mso-list-template-ids:-1317777270;} @list l71:level1 	{mso-level-text:%1; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l38:level1 lfo40 	{mso-level-start-at:2; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l38:level1 lfo41 	{mso-level-start-at:3; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l38:level1 lfo42 	{mso-level-start-at:4; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l17:level1 lfo44 	{mso-level-start-at:2; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l27:level1 lfo46 	{mso-level-start-at:2; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l52:level1 lfo50 	{mso-level-start-at:3; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l52:level1 lfo51 	{mso-level-start-at:4; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l52:level1 lfo52 	{mso-level-start-at:1; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l11:level1 lfo55 	{mso-level-start-at:3; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l11:level1 lfo56 	{mso-level-start-at:1; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l49:level1 lfo58 	{mso-level-start-at:1; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l71:level1 lfo60 	{mso-level-start-at:2; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l71:level1 lfo61 	{mso-level-start-at:3; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l16:level1 lfo63 	{mso-level-start-at:2; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l22:level1 lfo68 	{mso-level-start-at:1; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l40:level1 lfo70 	{mso-level-start-at:2; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l40:level1 lfo71 	{mso-level-start-at:3; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l14:level1 lfo74 	{mso-level-start-at:2; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l14:level1 lfo75 	{mso-level-start-at:3; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l28:level1 lfo78 	{mso-level-start-at:1; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l41:level1 lfo80 	{mso-level-start-at:2; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo82 	{mso-level-start-at:2; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo83 	{mso-level-start-at:3; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo84 	{mso-level-start-at:4; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo85 	{mso-level-start-at:5; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo86 	{mso-level-start-at:6; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo87 	{mso-level-start-at:7; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo88 	{mso-level-start-at:8; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo89 	{mso-level-start-at:9; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo90 	{mso-level-start-at:10; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo91 	{mso-level-start-at:11; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo92 	{mso-level-start-at:12; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo93 	{mso-level-start-at:13; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo94 	{mso-level-start-at:14; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo95 	{mso-level-start-at:15; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo96 	{mso-level-start-at:16; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo97 	{mso-level-start-at:17; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo98 	{mso-level-start-at:18; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo99 	{mso-level-start-at:19; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo100 	{mso-level-start-at:20; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo101 	{mso-level-start-at:21; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:Calibri;} @list l44:level1 lfo102 	{mso-level-start-at:2; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:"Courier New";} @list l44:level1 lfo103 	{mso-level-start-at:3; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:"Courier New";} @list l44:level1 lfo104 	{mso-level-start-at:4; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:"Courier New";} @list l44:level1 lfo105 	{mso-level-start-at:5; 	mso-level-numbering:continue; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	mso-level-legacy:yes; 	mso-level-legacy-indent:.25in; 	mso-level-legacy-space:0in; 	margin-left:0in; 	text-indent:0in; 	font-family:"Courier New";} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman";} table.MsoTableGrid 	{mso-style-name:"Table Grid"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	border:solid black 1.0pt; 	mso-border-alt:solid black .5pt; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-border-insideh:.5pt solid black; 	mso-border-insidev:.5pt solid black; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:Calibri; 	mso-fareast-font-family:Calibri;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;Predict the output or error(s) for the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;1.&lt;span style=""&gt;      &lt;/span&gt;void main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;int&lt;span style=""&gt;  &lt;/span&gt;const * p=5;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;printf("%d",++(*p));&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;Compiler error: Cannot modify a constant value. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;span style=""&gt;    &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;p is a pointer to a "constant integer". But we tried to change the value of the&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;"constant integer".&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;2.&lt;span style=""&gt;      &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;char s[ ]="man";&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;int i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;for(i=0;s[ i ];i++)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;mmmm&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                       &lt;/span&gt;aaaa&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                       &lt;/span&gt;nnnn&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;s[i], *(i+s), *(s+i), i[s] are all different ways of expressing the same idea.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Generally&lt;span style=""&gt;  &lt;/span&gt;array name is the base address for that array. Here s is the base&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;address. i is the index number/displacement from the base address. So, indirecting&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;it with * is same as s[i]. i[s] may be surprising. But in the&lt;span style=""&gt;  &lt;/span&gt;case of&lt;span style=""&gt;  &lt;/span&gt;C&lt;span style=""&gt;  &lt;/span&gt;it is&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;same as s[i].&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;3.&lt;span style=""&gt;      &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;float me = 1.1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;double you = 1.1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;if(me==you)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf("I love U");&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;printf("I hate U");&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;I hate U&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;For floating point numbers (float, double, long double) the values cannot be&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;predicted exactly. Depending on the number of bytes, the precession with of the&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;value&lt;span style=""&gt;  &lt;/span&gt;represented varies. Float takes 4 bytes and long double takes 10 bytes. So&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;float stores 0.9 with less precision than long double.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Rule of Thumb: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Never compare or at-least be cautious when using floating point numbers with&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;relational operators (== , &gt;, &lt;, &lt;=, &gt;=,!= ) .&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;4.&lt;span style=""&gt;      &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;static int var = 5;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;printf("%d ",var--);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;if(var)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;main();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;5 4 3 2 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;When static storage class is given, it is initialized once. The change in the value&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;of a static variable is retained even between the function calls. &lt;st1:place&gt;Main&lt;/st1:place&gt; is also&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;treated like any other ordinary function, which can be called recursively.&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;5.&lt;span style=""&gt;      &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;             &lt;/span&gt;int c[ ]={2.8,3.4,4,6.7,5};&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;             &lt;/span&gt;int j,*p=c,*q=c;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style=""&gt;       &lt;/span&gt;for(j=0;j&lt;5;j++)&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;printf(" %d ",*c);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;++q;&lt;span style=""&gt;     &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;             &lt;/span&gt;for(j=0;j&lt;5;j++){&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf(" %d ",*p);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;++p;&lt;span style=""&gt;     &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;2 2 2 2 2 2 3 4 6 5&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Explanation: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Initially pointer c is assigned to both p and q. In the first loop, since only q is&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;incremented and not c , the value 2 will be printed 5 times. In second loop p itself&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;is incremented. So the values 2 3 4 6 5 will be printed. &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;6.&lt;span style=""&gt;      &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;extern int i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;i=20;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf("%d",i);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Linker Error : Undefined symbol '_i'&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;extern storage class in the following declaration,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                                    &lt;/span&gt;extern int i;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;specifies to the compiler that the memory for i is allocated in some other program&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;and that address will be given to the current program at the time of linking. But&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;linker finds that no other variable of name i is available in any other program with&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;memory space allocated for it. Hence a linker error has occurred .&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;7.&lt;span style=""&gt;      &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;int i=-1,j=-1,k=0,l=2,m;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;m=i++&amp;amp;&amp;amp;j++&amp;amp;&amp;amp;k++||l++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;printf("%d %d %d %d %d",i,j,k,l,m);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;0 0 1 3 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation :&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Logical operations always give a result of 1 or 0 . And also the logical AND (&amp;amp;&amp;amp;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;operator has higher priority over the logical OR (||) operator. So the expression &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;‘i++ &amp;amp;&amp;amp; j++ &amp;amp;&amp;amp; k++’ is executed first. The result of this expression is 0&lt;span style=""&gt;    &lt;/span&gt;(-1 &amp;amp;&amp;amp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;-1 &amp;amp;&amp;amp; 0 = 0). Now the expression is 0 || 2 which evaluates to 1 (because OR operator&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;always gives 1 except for ‘0 || 0’ combination- for which it gives 0). So the value&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;of m is 1. The values of other variables are also incremented by 1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;8.&lt;span style=""&gt;      &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;char *p;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;printf("%d %d ",sizeof(*p),sizeof(p));&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;1 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The sizeof() operator gives the number of bytes taken by its operand. P is a&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;character pointer, which needs one byte for storing its value (a character). Hence&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;sizeof(*p) gives a value of 1. Since it needs two bytes to store the address of the&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;character pointer sizeof(p) gives 2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;9.&lt;span style=""&gt;      &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;int i=3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;switch(i)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;          &lt;/span&gt;&lt;span style=""&gt;   &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                &lt;/span&gt;default:printf("zero");&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                &lt;/span&gt;case 1: printf("one");&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                           &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;               &lt;/span&gt;case 2:printf("two");&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                          &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;              &lt;/span&gt;case 3: printf("three");&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                      &lt;/span&gt;&lt;span style=""&gt;    &lt;/span&gt;break;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;              &lt;/span&gt;}&lt;span style=""&gt;  &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer :&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;three&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation :&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The default case can be placed anywhere inside the loop. It is executed only when&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;all other cases doesn't match.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;10.&lt;span style=""&gt;  &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;              &lt;/span&gt;printf("%x",-1&lt;&lt;4);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;fff0&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation :&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;-1 is internally represented as all 1's. When left shifted four times the least&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;significant 4 bits are filled with 0's.The %x format specifier specifies that the&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;integer value be printed as a hexadecimal value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;11.&lt;span style=""&gt;  &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;char string[]="Hello World";&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;display(string);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;void display(char *string)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;printf("%s",string);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Compiler Error : Type mismatch in redeclaration of function display &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Explanation :&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;In third line, when the function display is encountered, the compiler doesn't know&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;anything about the function display. It assumes the arguments and return types to be&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;integers, (which is the default type). When it sees the actual function display, the&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;arguments and type contradicts with what it has assumed previously. Hence a compile&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;time error occurs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;12.&lt;span style=""&gt;  &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;int c=- -2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;printf("c=%d",c);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                                    &lt;/span&gt;c=2;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Here unary minus (or negation) operator is used twice. Same maths&lt;span style=""&gt;  &lt;/span&gt;rules applies,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;ie. minus * minus= plus.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Note: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;However you cannot give like --2. Because -- operator can&lt;span style=""&gt;  &lt;/span&gt;only be applied to&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;variables as a decrement operator (eg., i--). 2 is a constant and not a variable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;13.&lt;span style=""&gt;  &lt;/span&gt;#define int char&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;int i=65;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;printf("sizeof(i)=%d",sizeof(i));&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;sizeof(i)=1&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Since the #define replaces the string&lt;span style=""&gt;  &lt;/span&gt;int by the macro char &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;14.&lt;span style=""&gt;  &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;int i=10;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;i=!i&gt;14;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Printf ("i=%d",i);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;i=0&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;In the expression !i&gt;14 , NOT (!) operator has more precedence than ‘ &gt;’ symbol.&lt;span style=""&gt;  &lt;/span&gt;!&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;is a unary logical operator. !i (!10) is 0 (not of true is false).&lt;span style=""&gt;  &lt;/span&gt;0&gt;14 is false&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;(zero). &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;15.&lt;span style=""&gt;  &lt;/span&gt;#include&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;char s[]={'a','b','c','\n','c','\0'};&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;char *p,*str,*str1;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;p=&amp;amp;s[3];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;str=p;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;str1=s;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf("%d",++*p + ++*str1-32);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;77&lt;span style=""&gt;        &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;p is pointing to character '\n'. str1 is pointing to character 'a' ++*p. "p is&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;pointing to '\n' and that is incremented by one." the ASCII value of '\n' is 10,&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;which is then incremented to 11. The value of ++*p is 11. ++*str1, str1 is pointing&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;to 'a' that is incremented by 1 and it becomes 'b'. ASCII value of 'b' is 98.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;Now performing (11 + 98 – 32), we get 77("M");&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;So we get the output 77 :: "M" (Ascii is 77).&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;16.&lt;span style=""&gt;  &lt;/span&gt;#include&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;int a[2][2][2] = { {10,2,3,4}, {5,6,7,8}&lt;span style=""&gt;  &lt;/span&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;int *p,*q;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;p=&amp;amp;a[2][2][2];&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;*q=***a;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf("%d----%d",*p,*q);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;SomeGarbageValue---1&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;p=&amp;amp;a[2][2][2]&lt;span style=""&gt;  &lt;/span&gt;you declare only two 2D arrays, but you are trying to access the&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;third 2D(which you are not declared) it will print garbage values. *q=***a starting&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;address of a is assigned integer pointer. Now q is pointing to starting address of&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;a. If you print *q, it will print first element of 3D array.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;17.&lt;span style=""&gt;  &lt;/span&gt;#include&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;struct xx&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;      &lt;/span&gt;int x=3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;      &lt;/span&gt;char name[]="hello";&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;struct xx *s;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf("%d",s-&gt;x);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf("%s",s-&gt;name);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Compiler Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;You should not initialize variables in declaration&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;18.&lt;span style=""&gt;  &lt;/span&gt;#include&lt;stdio.h&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/stdio.h&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;struct xx&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;int x;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;struct yy&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;char s;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;struct xx *p;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;struct yy *q;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Compiler Error&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The structure yy is nested within structure xx. Hence, the elements are of yy are to&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;be accessed through the instance of structure xx, which needs an instance of yy to&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;be known. If the instance is created after defining the structure the compiler will&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;not know about the instance relative to xx. Hence for nested structure yy you have&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;to declare member.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;19.&lt;span style=""&gt;  &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf("\nab");&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf("\bsi");&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf("\rha");&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;hai&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;\n&lt;span style=""&gt;  &lt;/span&gt;- newline&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;\b&lt;span style=""&gt;  &lt;/span&gt;- backspace&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;\r&lt;span style=""&gt;  &lt;/span&gt;- linefeed&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;20.&lt;span style=""&gt;  &lt;/span&gt;main()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;int i=5;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;printf("%d%d%d%d%d%d",i++,i--,++i,--i,i);&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Answer:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;45545&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Explanation:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The arguments in a function call are pushed into the stack from left to right. The&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;evaluation is by popping out from the stack. and the&lt;span style=""&gt;  &lt;/span&gt;evaluation is from right to&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;left, hence the result.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-6673325558965834090?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/6673325558965834090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=6673325558965834090&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/6673325558965834090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/6673325558965834090'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/06/c-source-code-examples-part-1.html' title='c++ source code Examples Part 1'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-2757234664979383491</id><published>2009-04-26T15:26:00.002+05:30</published><updated>2009-04-26T15:31:02.950+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Basic shell scripting questions and answers'/><title type='text'>Basic shell scripting questions</title><content type='html'>&lt;div&gt;Question: How do you find out what’s your shell? - echo $SHELL&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: What’s the command to find out today’s date? - date&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: What’s the command to find out users on the system? - who&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you find out the current directory you’re in? - pwd&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you remove a file? - rm&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you remove a - rm -rf&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you find out your own username? - whoami&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you send a mail message to somebody? - mail somebody@techinterviews.com -s ‘Your subject’ -c ‘cc@techinterviews.com‘&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you count words, lines and characters in a file? - wc&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you search for a string inside a given file? - grep string filename&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you search for a string inside a directory? - grep string *&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you search for a string in a directory with the subdirectories recursed? - grep -r string *&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: What are PIDs? - They are process IDs given to processes. A PID can vary from 0 to 65535.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you list currently running process? - ps&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you stop a process? - kill pid&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you find out about all running processes? - ps -ag&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you stop all the processes, except the shell window? - kill 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you fire a process in the background? - ./process-name &amp;amp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you refer to the arguments passed to a shell script? - $1, $2 and so on. $0 is your script name.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: What’s the conditional statement in shell scripting? - if {condition} then … fi&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you do number comparison in shell scripts? - -eq, -ne, -lt, -le, -gt, -ge&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you test for file properties in shell scripts? - -s filename tells you if the file is not empty, -f filename tells you whether the argument is a file, and not a directory, -d filename tests if the argument is a directory, and not a file, -w filename tests for writeability, -r filename tests for readability, -x filename tests for executability&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you do Boolean logic operators in shell scripting? - ! tests for logical not, -a tests for logical and, and -o tests for logical or.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you find out the number of arguments passed to the shell script? - $#&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: What’s a way to do multilevel if-else’s in shell scripting? - if {condition} then {statement} elif {condition} {statement} fi&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you write a for loop in shell? - for {variable name} in {list} do {statement} done&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you write a while loop in shell? - while {condition} do {statement} done&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How does a case statement look in shell scripts? - case {variable} in {possible-value-1}) {statement};; {possible-value-2}) {statement};; esac&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you read keyboard input in shell scripts? - read {variable-name}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How do you define a function in a shell script? - function-name() { #some code here return }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Question: How does getopts command work? - The parameters to your script can be passed as -n 15 -x 20. Inside the script, you can iterate through the getopts array as while getopts n:x option, and the variable $option contains the value of the entered option.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-2757234664979383491?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/2757234664979383491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=2757234664979383491&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/2757234664979383491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/2757234664979383491'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/basic-shell-scripting-questions.html' title='Basic shell scripting questions'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9088987006789845123.post-1270143421214636603</id><published>2009-04-26T15:14:00.002+05:30</published><updated>2009-04-26T15:25:33.882+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux command line Q A interview questions'/><title type='text'>Linux command line Q and A Questions</title><content type='html'>Question: You need to see the last fifteen lines of the files dog, cat and horse. What command should you use?&lt;br /&gt;tail -15 dog cat horse&lt;br /&gt;The tail utility displays the end of a file. The -15 tells tail to display the last fifteen lines of each specified file.&lt;br /&gt;&lt;br /&gt;Question: Who owns the data dictionary?&lt;br /&gt;The SYS user owns the data dictionary. The SYS and SYSTEM users are created when the database is created.&lt;br /&gt;&lt;br /&gt;Question: You routinely compress old log files. You now need to examine a log from two months ago. In order to view its contents without first having to decompress it, use the _________ utility.&lt;br /&gt;zcat&lt;br /&gt;&lt;br /&gt;The zcat utility allows you to examine the contents of a compressed file much the same way that cat displays a file.&lt;br /&gt;&lt;br /&gt;Question: You suspect that you have two commands with the same name as the command is not producing the expected results. What command can you use to determine the location of the command being run?&lt;br /&gt;which&lt;br /&gt;The which command searches your path until it finds a command that matches the command you are looking for and displays its full path.&lt;br /&gt;You locate a command in the /bin directory but do not know what it does. What command can you use to determine its purpose.&lt;br /&gt;whatis&lt;br /&gt;The whatis command displays a summary line from the man page for the specified command.&lt;br /&gt;You wish to create a link to the /data directory in bob’s home directory so you issue the command ln /data /home/bob/datalink but the command fails. What option should you use in this command line to be successful.&lt;br /&gt;Use the -F option&lt;br /&gt;In order to create a link to a directory you must use the -F option.&lt;br /&gt;&lt;br /&gt;Question: When you issue the command ls -l, the first character of the resulting display represents the file’s ___________.&lt;br /&gt;type&lt;br /&gt;The first character of the permission block designates the type of file that is being displayed.&lt;br /&gt;&lt;br /&gt;Question: What utility can you use to show a dynamic listing of running processes?&lt;br /&gt;top&lt;br /&gt;The top utility shows a listing of all running processes that is dynamically updated.&lt;br /&gt;&lt;br /&gt;Question: Where is standard output usually directed?&lt;br /&gt;to the screen or display&lt;br /&gt;By default, your shell directs standard output to your screen or display.&lt;br /&gt;&lt;br /&gt;Question: You wish to restore the file memo.ben which was backed up in the tarfile MyBackup.tar. What command should you type?&lt;br /&gt;tar xf MyBackup.tar memo.ben&lt;br /&gt;This command uses the x switch to extract a file. Here the file memo.ben will be restored from the tarfile MyBackup.tar.&lt;br /&gt;&lt;br /&gt;Question: You need to view the contents of the tarfile called MyBackup.tar. What command would you use?&lt;br /&gt;tar tf MyBackup.tar&lt;br /&gt;The t switch tells tar to display the contents and the f modifier specifies which file to examine.&lt;br /&gt;&lt;br /&gt;Question: You want to create a compressed backup of the users’ home directories. What utility should you use?&lt;br /&gt;tar&lt;br /&gt;You can use the z modifier with tar to compress your archive at the same time as creating it.&lt;br /&gt;&lt;br /&gt;Question: What daemon is responsible for tracking events on your system?&lt;br /&gt;syslogd&lt;br /&gt;The syslogd daemon is responsible for tracking system information and saving it to specified log files.&lt;br /&gt;&lt;br /&gt;Question: You have a file called phonenos that is almost 4,000 lines long. What text filter can you use to split it into four pieces each 1,000 lines long?&lt;br /&gt;split&lt;br /&gt;The split text filter will divide files into equally sized pieces. The default length of each piece is 1,000 lines.&lt;br /&gt;&lt;br /&gt;Question: You would like to temporarily change your command line editor to be vi. What command should you type to change it?&lt;br /&gt;set -o vi&lt;br /&gt;The set command is used to assign environment variables. In this case, you are instructing your shell to assign vi as your command line editor. However, once you log off and log back in you will return to the previously defined command line editor.&lt;br /&gt;&lt;br /&gt;Question: What account is created when you install Linux?&lt;br /&gt;root&lt;br /&gt;Whenever you install Linux, only one user account is created. This is the superuser account also known as root.&lt;br /&gt;&lt;br /&gt;Question: What command should you use to check the number of files and disk space used and each user’s defined quotas?&lt;br /&gt;repquota&lt;br /&gt;The repquota command is used to get a report on the status of the quotas you have set including the amount of allocated space and amount of used space.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-1270143421214636603?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/1270143421214636603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=1270143421214636603&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/1270143421214636603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/1270143421214636603'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/linux-command-line-q-and-questions.html' title='Linux command line Q and A Questions'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-323669787644246377</id><published>2009-04-26T15:07:00.002+05:30</published><updated>2009-04-26T15:13:45.344+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='solaris interviews'/><category scheme='http://www.blogger.com/atom/ns#' term='Solaris interview questions and answers'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><title type='text'>Solaris interview questions</title><content type='html'>Question: List the files in current directory sorted by size ? &lt;br /&gt;Answer: - ls -l | grep ^- | sort -nr &lt;br /&gt;&lt;br /&gt;Question: List the hidden files in current directory ?&lt;br /&gt;Answer:  - ls -a1 | grep "^\."&lt;br /&gt;&lt;br /&gt;Question: Delete blank lines in a file ? &lt;br /&gt;Answer: - cat sample.txt | grep -v ‘^$’ &gt; new_sample.txt&lt;br /&gt;&lt;br /&gt;Question: Search for a sample string in particular files ?&lt;br /&gt;Answer: - grep “Debug” *.confHere grep uses the string “Debug” to search in all files with extension“.conf” under current directory.&lt;br /&gt;&lt;br /&gt;Question: Display the last newly appending lines of a file during appendingdata to the same file by some processes ? - tail –f Debug.logHere tail shows the newly appended data into Debug.log by some processes/user.&lt;br /&gt;&lt;br /&gt;Question: Display the Disk Usage of file sizes under each directory in currentDirectory ? - du -k * | sort –nr (or) du –k . | sort -nr&lt;br /&gt;Change to a directory, which is having very long name ? - cd CDMA_3X_GEN*Here original directory name is – “CDMA_3X_GENERATION_DATA”.&lt;br /&gt;&lt;br /&gt;Question: Display the all files recursively with path under current directory ? - find . -depth -print&lt;br /&gt;&lt;br /&gt;Question: Set the Display automatically for the current new user ? &lt;br /&gt;Answer: - export DISPLAY=`eval ‘who am i | cut -d"(" -f2 | cut -d")" -f1′`Here in above command, see single quote, double quote, grave ascent is used. Observe carefully.&lt;br /&gt;&lt;br /&gt;Question: Display the processes, which are running under yourusername ? &lt;br /&gt;Answer: - ps –aef | grep MaheshvjHere, Maheshvj is the username.&lt;br /&gt;&lt;br /&gt;Question: List some Hot Keys for bash shell ? &lt;br /&gt;Answer: - Ctrl+l – Clears the Screen. Ctrl+r – &lt;br /&gt;&lt;br /&gt;Question: Does a search in previously given commands in shell. Ctrl+u - Clears the typing before the hotkey. Ctrl+a – Places cursor at the beginning of the command at shell. Ctrl+e – Places cursor at the end of the command at shell. Ctrl+d – Kills the shell. Ctrl+z – Places the currently running process into background.&lt;br /&gt;&lt;br /&gt;Question: Display the files in the directory by file size ? &lt;br /&gt;Answer: - ls –ltr | sort –nr –k 5&lt;br /&gt;How to save man pages to a file ? - man &lt;command&gt; | col –b &gt; &lt;output-file&gt;Example : man top | col –b &gt; top_help.txt&lt;br /&gt;&lt;br /&gt;Question: How to know the date &amp; time for – when script is executed ? &lt;br /&gt;Answer: - Add the following script line in shell script.eval echo "Script is executed at `date`" &gt;&gt; timeinfo.infHere, “timeinfo.inf” contains date &amp; time details ie., when script is executed and history related to execution.&lt;br /&gt;&lt;br /&gt;Question: How do you find out drive statistics ? &lt;br /&gt;Answer: - iostat -E&lt;br /&gt;&lt;br /&gt;Question: Display disk usage in Kilobytes ? &lt;br /&gt;Answer: - du -k&lt;br /&gt;&lt;br /&gt;Question: Display top ten largest files/directories ? &lt;br /&gt;Answer: - du -sk * | sort -nr | head&lt;br /&gt;&lt;br /&gt;Question: How much space is used for users in kilobytes ? &lt;br /&gt;Answer: - quot -af&lt;br /&gt;&lt;br /&gt;Question: How to create null file ? - cat /dev/null &gt; filename1&lt;br /&gt;Access common commands quicker ? - ps -ef | grep -i $@&lt;br /&gt;&lt;br /&gt;Question: Display the page size of memory ? &lt;br /&gt;Answer: - pagesize -a&lt;br /&gt;&lt;br /&gt;Question: Display Ethernet Address arp table ? &lt;br /&gt;Answer: - arp -a&lt;br /&gt;&lt;br /&gt;Question: Display the no.of active established connections to localhost ? - netstat -a | grep EST&lt;br /&gt;Question: Display the state of interfaces used for TCP/IP traffice ? &lt;br /&gt;Answer: - netstat -i&lt;br /&gt;&lt;br /&gt;Question: Display the parent/child tree of a process ? &lt;br /&gt;Answer: - ptree &lt;pid&gt; Example: ptree 1267&lt;br /&gt;&lt;br /&gt;Question: Show the working directory of a process ? &lt;br /&gt;Answer: - pwdx &lt;pid&gt; Example: pwdx 1267&lt;br /&gt;&lt;br /&gt;Question: Display the processes current open files ? &lt;br /&gt;Answer: - pfiles &lt;pid&gt; Example: pfiles 1267&lt;br /&gt;&lt;br /&gt;Question: Display the inter-process communication facility status ? &lt;br /&gt;Answer: - ipcs&lt;br /&gt;&lt;br /&gt;Question: Display the top most process utilizing most CPU ? &lt;br /&gt;Answer: - top –b 1&lt;br /&gt;&lt;br /&gt;Question:Alternative for top command ? &lt;br /&gt;Answer: - prstat –a&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-323669787644246377?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/323669787644246377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=323669787644246377&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/323669787644246377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/323669787644246377'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/solaris-interview-questions.html' title='Solaris interview questions'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-5800771278844434743</id><published>2009-04-03T16:03:00.002+05:30</published><updated>2009-04-03T16:07:08.770+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='garbage collection algorithm'/><category scheme='http://www.blogger.com/atom/ns#' term='Deterministic Destruction'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Garbage Collection'/><title type='text'>ASP.NET Garbage Collection</title><content type='html'>1 What is garbage collection?&lt;br /&gt;&lt;br /&gt;Ans.  Garbage collection is a system whereby a run-time component takes responsibility for managing the lifetime of objects and the heap memory that they occupy. This concept is not new to .NET - Java and many other languages/runtimes have used garbage collection for some time.&lt;br /&gt;&lt;br /&gt;2.   Is it true that objects don't always get destroyed immediately when the last reference goes away?&lt;br /&gt;&lt;br /&gt;Ans.  Yes. The garbage collector offers no guarantees about the time when an object will be destroyed and its memory reclaimed.&lt;br /&gt;There is an interesting thread in the archives, started by Chris Sells, about the implications of non-deterministic destruction of objects in C#: http://discuss.develop.com/archives/wa.exe?A2=ind0007&amp;amp;L=DOTNET&amp;amp;P=R24819&lt;br /&gt;In October 2000, Microsoft's Brian Harry posted a lengthy analysis of the problem: http://discuss.develop.com/archives/wa.exe?A2=ind0010A&amp;amp;L=DOTNET&amp;amp;P=R28572&lt;br /&gt;Chris Sells' response to Brian's posting is here: http://discuss.develop.com/archives/wa.exe?A2=ind0010C&amp;amp;L=DOTNET&amp;amp;P=R983&lt;br /&gt;&lt;br /&gt;3.   Why doesn't the .NET runtime offer deterministic destruction?&lt;br /&gt;&lt;br /&gt;Ans.  Because of the garbage collection algorithm. The .NET garbage collector works by periodically running through a list of all the objects that are currently being referenced by an application. All the objects that it doesn't find during this search are ready to be destroyed and the memory reclaimed. The implication of this algorithm is that the runtime doesn't get notified immediately when the final reference on an object goes away - it only finds out during the next sweep of the heap.&lt;br /&gt;Futhermore, this type of algorithm works best by performing the garbage collection sweep as rarely as possible. Normally heap exhaustion is the trigger for a collection sweep.&lt;br /&gt;&lt;br /&gt;4.   Is the lack of deterministic destruction in .NET a problem?&lt;br /&gt;&lt;br /&gt;Ans.  It's certainly an issue that affects component design. If you have objects that maintain expensive or scarce resources (e.g. database locks), you need to provide some way for the client to tell the object to release the resource when it is done. Microsoft recommend that you provide a method called Dispose() for this purpose. However, this causes problems for distributed objects - in a distributed system who calls the Dispose() method? Some form of reference-counting or ownership-management mechanism is needed to handle distributed objects - unfortunately the runtime offers no help with this.&lt;br /&gt;&lt;br /&gt;5. Does non-deterministic destruction affect the usage of COM objects from managed code?&lt;br /&gt;&lt;br /&gt;Ans.  Yes. When using a COM object from managed code, you are effectively relying on the garbage collector to call the final release on your object. If your COM object holds onto an expensive resource which is only cleaned-up after the final release, you may need to provide a new interface on your object which supports an explicit Dispose() method.&lt;br /&gt;&lt;br /&gt;6.   I've heard that Finalize methods should be avoided. Should I implement Finalize on my class?&lt;br /&gt;&lt;br /&gt;Ans.  An object with a Finalize method is more work for the garbage collector than an object without one. Also there are no guarantees about the order in which objects are Finalized, so there are issues surrounding access to other objects from the Finalize method. Finally, there is no guarantee that a Finalize method will get called on an object, so it should never be relied upon to do clean-up of an object's resources.&lt;br /&gt;Microsoft recommend the following pattern:&lt;br /&gt;public class CTest : IDisposable&lt;br /&gt;{&lt;br /&gt;    public void Dispose()&lt;br /&gt;    {&lt;br /&gt;        ... // Cleanup activities&lt;br /&gt;        GC.SuppressFinalize(this);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    ~CTest()    // C# syntax hiding the Finalize() method&lt;br /&gt;    {&lt;br /&gt;        Dispose();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;In the normal case the client calls Dispose(), the object's resources are freed, and the garbage collector is relieved of its Finalizing duties by the call to SuppressFinalize(). In the worst case, i.e. the client forgets to call Dispose(), there is a reasonable chance that the object's resources will eventually get freed by the garbage collector calling Finalize(). Given the limitations of the garbage collection algorithm this seems like a pretty reasonable approach.&lt;br /&gt;&lt;br /&gt;7.   Do I have any control over the garbage collection algorithm?&lt;br /&gt;&lt;br /&gt;Ans.  A little. For example, the System.GC class exposes a Collect method - this forces the garbage collector to collect all unreferenced objects immediately.&lt;br /&gt;5.8 How can I find out what the garbage collector is doing?&lt;br /&gt;Lots of interesting statistics are exported from the .NET runtime via the '.NET CLR xxx' performance counters. Use Performance Monitor to view them.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-5800771278844434743?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/5800771278844434743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=5800771278844434743&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/5800771278844434743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/5800771278844434743'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/aspnet-garbage-collection.html' title='ASP.NET Garbage Collection'/><author><name>Shaveta Aggarwal</name><uri>http://www.blogger.com/profile/16345884203149403084</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-9088987006789845123.post-7762454214178140749</id><published>2009-04-03T15:47:00.002+05:30</published><updated>2009-04-03T16:02:23.310+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Assembly'/><category scheme='http://www.blogger.com/atom/ns#' term='assembly versioning'/><category scheme='http://www.blogger.com/atom/ns#' term='private assembly and a shared assembly'/><title type='text'>.NET Assemblies</title><content type='html'>1.   What is an assembly?&lt;br /&gt;&lt;br /&gt;Ans.  An assembly is sometimes described as a logical .EXE or .DLL, and can be an application (with a main entry point) or a library. An assembly consists of one or more files (dlls, exes, html files etc), and represents a group of resources, type definitions, and implementations of those types. An assembly may also contain references to other assemblies. These resources, types and references are described in a block of data called a manifest. The manifest is part of the assembly, thus making the assembly self-describing.&lt;br /&gt;An important aspect of assemblies is that they are part of the identity of a type. The identity of a type is the assembly that houses it combined with the type name. This means, for example, that if assembly A exports a type called T, and assembly B exports a type called T, the .NET runtime sees these as two completely different types. Furthermore, don't get confused between assemblies and namespaces - namespaces are merely a hierarchical way of organising type names. To the runtime, type names are type names, regardless of whether namespaces are used to organise the names. It's the assembly plus the typename (regardless of whether the type name belongs to a namespace) that uniquely indentifies a type to the runtime.&lt;br /&gt;Assemblies are also important in .NET with respect to security - many of the security restrictions are enforced at the assembly boundary.&lt;br /&gt;Finally, assemblies are the unit of versioning in .NET - more on this below.&lt;br /&gt;&lt;br /&gt;2.  How can I produce an assembly?&lt;br /&gt;&lt;br /&gt;Ans.  The simplest way to produce an assembly is directly from a .NET compiler. For example, the following C# program:&lt;br /&gt;public class CTest&lt;br /&gt;{&lt;br /&gt;    public CTest()&lt;br /&gt;    {&lt;br /&gt;        System.Console.WriteLine( "Hello from CTest" );&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;can be compiled into a library assembly (dll) like this:&lt;br /&gt;csc /t:library ctest.cs&lt;br /&gt;You can then view the contents of the assembly by running the "IL Disassembler" tool that comes with the .NET SDK.&lt;br /&gt;Alternatively you can compile your source into modules, and then combine the modules into an assembly using the assembly linker (al.exe). For the C# compiler, the /target:module switch is used to generate a module instead of an assembly.&lt;br /&gt;&lt;br /&gt;3.   What is the difference between a private assembly and a shared assembly?&lt;br /&gt;&lt;br /&gt;Ans.     Location and visibility: A private assembly is normally used by a single application, and is stored in the application's directory, or a sub-directory beneath. A shared assembly is normally stored in the global assembly cache, which is a repository of assemblies maintained by the .NET runtime. Shared assemblies are usually libraries of code which many applications will find useful, e.g. the .NET framework classes.&lt;br /&gt;&lt;br /&gt;·    Versioning: The runtime enforces versioning constraints only on shared assemblies, not on private assemblies.&lt;br /&gt;&lt;br /&gt;4.  How do assemblies find each other?&lt;br /&gt;&lt;br /&gt;Ans.  By searching directory paths. There are several factors which can affect the path (such as the AppDomain host, and application configuration files), but for private assemblies the search path is normally the application's directory and its sub-directories. For shared assemblies, the search path is normally same as the private assembly path plus the shared assembly cache.&lt;br /&gt;&lt;br /&gt;5.   How does assembly versioning work?&lt;br /&gt;&lt;br /&gt;Ans.  Each assembly has a version number called the compatibility version. Also each reference to an assembly (from another assembly) includes both the name and version of the referenced assembly.&lt;br /&gt;The version number has four numeric parts (e.g. 5.5.2.33). Assemblies with either of the first two parts different are normally viewed as incompatible. If the first two parts are the same, but the third is different, the assemblies are deemed as 'maybe compatible'. If only the fourth part is different, the assemblies are deemed compatible. However, this is just the default guideline - it is the version policy that decides to what extent these rules are enforced. The version policy can be specified via the application configuration file.&lt;br /&gt;Remember: versioning is only applied to shared assemblies, not private assemblies.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-7762454214178140749?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/7762454214178140749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=7762454214178140749&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/7762454214178140749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/7762454214178140749'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/net-assemblies.html' title='.NET Assemblies'/><author><name>Shaveta Aggarwal</name><uri>http://www.blogger.com/profile/16345884203149403084</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-9088987006789845123.post-9207660456819695617</id><published>2009-04-03T15:40:00.005+05:30</published><updated>2009-04-03T15:46:36.889+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='clr'/><category scheme='http://www.blogger.com/atom/ns#' term='CLS'/><category scheme='http://www.blogger.com/atom/ns#' term='IL'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET Basic Terminology'/><category scheme='http://www.blogger.com/atom/ns#' term='Reflection'/><category scheme='http://www.blogger.com/atom/ns#' term='Managed'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='CTS'/><title type='text'>.NET Basic terminology</title><content type='html'>1 What is the CLR?&lt;br /&gt;&lt;br /&gt;Ans.  CLR = Common Language Runtime. The CLR is a set of standard resources that (in theory) any .NET program can take advantage of, regardless of programming language. Robert Schmidt (Microsoft) lists the following CLR resources in his MSDN PDC# article:&lt;br /&gt;·    Object-oriented programming model (inheritance, polymorphism, exception handling, garbage collection)&lt;br /&gt;·    Security model&lt;br /&gt;·    Type system&lt;br /&gt;·    All .NET base classes&lt;br /&gt;·    Many .NET framework classes&lt;br /&gt;·    Development, debugging, and profiling tools&lt;br /&gt;·    Execution and code management&lt;br /&gt;·    IL-to-native translators and optimizers&lt;br /&gt;What this means is that in the .NET world, different programming languages will be more equal in capability than they have ever been before, although clearly not all languages will support all CLR services.&lt;br /&gt;&lt;br /&gt;2.   What is the CTS?&lt;br /&gt;&lt;br /&gt;Ans.  CTS = Common Type System. This is the range of types that the .NET runtime understands, and therefore that .NET applications can use. However note that not all .NET languages will support all the types in the CTS. The CTS is a superset of the CLS.&lt;br /&gt;&lt;br /&gt;3.   What is the CLS?&lt;br /&gt;&lt;br /&gt;Ans.  CLS = Common Language Specification. This is a subset of the CTS which all .NET languages are expected to support. The idea is that any program which uses CLS-compliant types can interoperate with any .NET program written in any language.&lt;br /&gt;In theory this allows very tight interop between different .NET languages - for example allowing a C# class to inherit from a VB class.&lt;br /&gt;&lt;br /&gt;4.   What is IL?&lt;br /&gt;&lt;br /&gt;Ans.  IL = Intermediate Language. Also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code (of any language) is compiled to IL. The IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In-Time (JIT) compiler.&lt;br /&gt;&lt;br /&gt;5.   What is C#?&lt;br /&gt;&lt;br /&gt;Ans.  C# is a new language designed by Microsoft to work with the .NET framework. In their "Introduction to C#" whitepaper, Microsoft describe C# as follows:&lt;br /&gt;"C# is a simple, modern, object oriented, and type-safe programming language derived from C and C++. C# (pronounced “C sharp”) is firmly planted in the C and C++ family tree of languages, and will immediately be familiar to C and C++ programmers. C# aims to combine the high productivity of Visual Basic and the raw power of C++."&lt;br /&gt;Substitute 'Java' for 'C#' in the quote above, and you'll see that the statement still works pretty well :-).&lt;br /&gt;&lt;br /&gt;6.   What does 'managed' mean in the .NET context?&lt;br /&gt;&lt;br /&gt;Ans.  The term 'managed' is the cause of much confusion. It is used in various places within .NET, meaning slightly different things.&lt;br /&gt;Managed code: The .NET framework provides several core run-time services to the programs that run within it - for example exception handling and security. For these services to work, the code must provide a minimum level of information to the runtime. Such code is called managed code. All C# and Visual Basic.NET code is managed by default. VS7 C++ code is not managed by default, but the compiler can produce managed code by specifying a command-line switch (/com+).&lt;br /&gt;Managed data: This is data that is allocated and de-allocated by the .NET runtime's garbage collector. C# and VB.NET data is always managed. VS7 C++ data is unmanaged by default, even when using the /com+ switch, but it can be marked as managed using the __gc keyword.&lt;br /&gt;Managed classes: This is usually referred to in the context of Managed Extensions (ME) for C++. When using ME C++, a class can be marked with the __gc keyword. As the name suggests, this means that the memory for instances of the class is managed by the garbage collector, but it also means more than that. The class becomes a fully paid-up member of the .NET community with the benefits and restrictions that brings. An example of a benefit is proper interop with classes written in other languages - for example, a managed C++ class can inherit from a VB class. An example of a restriction is that a managed class can only inherit from one base class.&lt;br /&gt;&lt;br /&gt;7.   What is reflection?&lt;br /&gt;&lt;br /&gt;Ans.  All .NET compilers produce metadata about the types defined in the modules they produce. This metadata is packaged along with the module (modules in turn are packaged together in assemblies), and can be accessed by a mechanism called reflection. The System.Reflection namespace contains classes that can be used to interrogate the types for a module/assembly.&lt;br /&gt;Using reflection to access .NET metadata is very similar to using ITypeLib/ITypeInfo to access type library data in COM, and it is used for similar purposes - e.g. determining data type sizes for marshaling data across context/process/machine boundaries.&lt;br /&gt;Reflection can also be used to dynamically invoke methods (see System.Type.InvokeMember), or even create types dynamically at run-time (see System.Reflection.Emit.TypeBuilder).&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-9207660456819695617?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/9207660456819695617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=9207660456819695617&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/9207660456819695617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/9207660456819695617'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/net-basic-terminology.html' title='.NET Basic terminology'/><author><name>Shaveta Aggarwal</name><uri>http://www.blogger.com/profile/16345884203149403084</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-9088987006789845123.post-3479107116876347205</id><published>2009-04-03T15:35:00.003+05:30</published><updated>2009-04-03T15:40:40.125+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='first version of .NET . .NET Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Platform'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET Languages'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>What is .NET</title><content type='html'>1.  What is .NET?&lt;br /&gt;&lt;br /&gt;Ans.  That's difficult to sum up in a sentence. According to Microsoft, .NET is a "revolutionary new platform, built on open Internet protocols and standards, with tools and services that meld computing and communications in new ways".&lt;br /&gt;A more practical definition would be that .NET is a new environment for developing and running software applications, featuring ease of development of web-based services, rich standard run-time services available to components written in a variety of programming languages, and inter-language and inter-machine interoperability.&lt;br /&gt;Note that when the term ".NET" is used in this FAQ it refers only to the new .NET runtime and associated technologies. This is sometimes called the ".NET Framework". This FAQ does NOT cover any of the various other existing and new products/technologies that Microsoft are attaching the .NET name to (e.g. SQL Server.NET).&lt;br /&gt;&lt;br /&gt;2.   Does .NET only apply to people building web-sites?&lt;br /&gt;&lt;br /&gt;Ans.  No. If you write any Windows software (using ATL/COM, MFC, VB, or even raw Win32), .NET may offer a viable alternative (or addition) to the way you do things currently. Of course, if you do develop web sites, then .NET has lots to interest you - not least ASP.NET.&lt;br /&gt;&lt;br /&gt;3.   When was .NET announced?&lt;br /&gt;Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and delegates were given CDs containing a pre-release version of the .NET framework/SDK and Visual Studio.NET.&lt;br /&gt;&lt;br /&gt;4.   When was the first version of .NET released?&lt;br /&gt;&lt;br /&gt;Ans.   The final version of the 1.0 SDK and runtime was made publicly available around 6pm PST on 15-Jan-2002. At the same time, the final version of Visual Studio.NET was made available to MSDN subscribers.&lt;br /&gt;&lt;br /&gt;5.   What tools can I use to develop .NET applications?&lt;br /&gt;&lt;br /&gt;Ans.  There are a number of tools, described here in ascending order of cost:&lt;br /&gt;·    .NET Framework SDK: The SDK is free and includes command-line compilers for C++, C#, and VB.NET and various other utilities to aid development.&lt;br /&gt;·    ASP.NET Web Matrix: This is a free ASP.NET development environment from Microsoft. As well as a GUI development environment, the download includes a simple web server that can be used instead of IIS to host ASP.NET apps. This opens up ASP.NET development to users of Windows XP Home Edition, which cannot run IIS.&lt;br /&gt;·    Microsoft Visual C# .NET Standard 2003: This is a cheap (around $100) version of Visual Studio limited to one language and also with limited wizard support. For example, there's no wizard support for class libraries or custom UI controls. Useful for beginners to learn with, or for savvy developers who can work around the deficiencies in the supplied wizards. As well as C#, there are VB.NET and C++ versions.&lt;br /&gt;·    Microsoft Visual Studio.NET Professional 2003: If you have a license for Visual Studio 6.0, you can get the upgrade. You can also upgrade from VS.NET 2002 for a token $30. Visual Studio.NET includes support for all the MS languages (C#, C++, VB.NET) and has extensive wizard support.&lt;br /&gt;At the top end of the price spectrum are the Visual Studio.NET 2003 Enterprise and Enterprise Architect editions. These offer extra features such as Visual Sourcesafe (version control), and performance and analysis tools. Check out the Visual Studio.NET Feature Comparison at http://msdn.microsoft.com/vstudio/howtobuy/choosing.asp.&lt;br /&gt;&lt;br /&gt;6.   What platforms does the .NET Framework run on?&lt;br /&gt;&lt;br /&gt;Ans.  The runtime supports Windows XP, Windows 2000, NT4 SP6a and Windows ME/98. Windows 95 is not supported. Some parts of the framework do not work on all platforms - for example, ASP.NET is only supported on Windows XP and Windows 2000. Windows 98/ME cannot be used for development.&lt;br /&gt;IIS is not supported on Windows XP Home Edition, and so cannot be used to host ASP.NET. However, the ASP.NET Web Matrix web server does run on XP Home.&lt;br /&gt;The Mono project is attempting to implement the .NET framework on Linux.&lt;br /&gt;&lt;br /&gt;7.   What languages does the .NET Framework support?&lt;br /&gt;&lt;br /&gt;Ans.  MS provides compilers for C#, C++, VB and JScript. Other vendors have announced that they intend to develop .NET compilers for languages such as COBOL, Eiffel, Perl, Smalltalk and Python.&lt;br /&gt;&lt;br /&gt;8.   Will the .NET Framework go through a standardisation process?&lt;br /&gt;&lt;br /&gt;Ans.  From http://msdn.microsoft.com/net/ecma/: "On December 13, 2001, the ECMA General Assembly ratified the C# and common language infrastructure (CLI) specifications into international standards. The ECMA standards will be known as ECMA-334 (C#) and ECMA-335 (the CLI)."&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-3479107116876347205?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/3479107116876347205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=3479107116876347205&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/3479107116876347205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/3479107116876347205'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/what-is-net.html' title='What is .NET'/><author><name>Shaveta Aggarwal</name><uri>http://www.blogger.com/profile/16345884203149403084</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-9088987006789845123.post-5455319764647820965</id><published>2009-04-03T15:33:00.002+05:30</published><updated>2009-04-03T15:35:06.881+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='IIS Isolation Levels'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='Advantages in IIS'/><title type='text'>XML interview Questions Part II</title><content type='html'>1.    How to configure the sites in Web server (IIS)?&lt;br /&gt;&lt;br /&gt;2.    Advantages in IIS 6.0?&lt;br /&gt;&lt;br /&gt;http://www.microsoft.com/windowsserver2003/iis/evaluation/features/default.mspx&lt;br /&gt;http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/windowsserver2003/proddocs/datacenter/gs_whatschanged.asp&lt;br /&gt;&lt;br /&gt;3.    IIS Isolation Levels?&lt;br /&gt;&lt;br /&gt;Ans.  Internet Information Server introduced the notion "Isolation Level", which is also present in IIS4 under a different name. IIS5 supports three isolation levels, that you can set from the Home Directory tab of the site's Properties dialog:&lt;br /&gt;·    Low (IIS Process): ASP pages run in INetInfo.Exe, the main IIS process, therefore they are executed in-process. This is the fastest setting, and is the default under IIS4. The problem is that if ASP crashes, IIS crashes as well and must be restarted (IIS5 has a reliable restart feature that automatically restarts a server when a fatal error occurs).&lt;br /&gt;·    Medium (Pooled): In this case ASP runs in a different process, which makes this setting more reliable: if ASP crashes IIS won't. All the ASP applications at the Medium isolation level share the same process, so you can have a web site running with just two processes (IIS and ASP process). IIS5 is the first Internet Information Server version that supports this setting, which is also the default setting when you create an IIS5 application. Note that an ASP application that runs at this level is run under COM+, so it's hosted in DLLHOST.EXE (and you can see this executable in the Task Manager).&lt;br /&gt;·    High (Isolated): Each ASP application runs out-process in its own process space, therefore if an ASP application crashes, neither IIS nor any other ASP application will be affected. The downside is that you consume more memory and resources if the server hosts many ASP applications. Both IIS4 and IIS5 supports this setting: under IIS4 this process runs inside MTS.EXE, while under IIS5 it runs inside DLLHOST.EXE.&lt;br /&gt;When selecting an isolation level for your ASP application, keep in mind that out-process settings - that is, Medium and High - are less efficient than in-process (Low). However, out-process communication has been vastly improved under IIS5, and in fact IIS5's Medium isolation level often deliver better results than IIS4's Low isolation. In practice, you shouldn't set the Low isolation level for an IIS5 application unless you really need to serve hundreds pages per second.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-5455319764647820965?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/5455319764647820965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=5455319764647820965&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/5455319764647820965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/5455319764647820965'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/xml-interview-questions-part-ii.html' title='XML interview Questions Part II'/><author><name>Shaveta Aggarwal</name><uri>http://www.blogger.com/profile/16345884203149403084</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-9088987006789845123.post-7416433480029594490</id><published>2009-04-03T15:26:00.004+05:30</published><updated>2009-04-03T15:32:59.795+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='diffgram'/><category scheme='http://www.blogger.com/atom/ns#' term='data island'/><category scheme='http://www.blogger.com/atom/ns#' term='IIS authentication modes'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='IIS log files'/><title type='text'>XML Interview Questions Part I</title><content type='html'>1.    Explain what a DiffGram is, and a good use for one?&lt;br /&gt;&lt;br /&gt;Ans.  A DiffGram is an XML format that is used to identify current and original versions of data elements. When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used.&lt;br /&gt;The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection. When a DataSet is written as a DiffGram, it populates the DiffGram with all the necessary information to accurately recreate the contents, though not the schema, of the DataSet, including column values from both the Original and Current row versions, row error information, and row order.&lt;br /&gt;DiffGram Format&lt;br /&gt;The DiffGram format is divided into three sections: the current data, the original (or "before") data, and an errors section, as shown in the following example.&lt;br /&gt;&lt;?xml version="1.0"?&gt;&lt;br /&gt;&lt;diffgr:diffgram&lt;br /&gt;xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&lt;br /&gt;xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"&lt;br /&gt;xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;br /&gt;&lt;br /&gt;&lt;datainstance&gt;&lt;br /&gt;&lt;/datainstance&gt;&lt;br /&gt;&lt;br /&gt;&lt;diffgr:before&gt;&lt;br /&gt;&lt;/diffgr:before&gt;&lt;br /&gt;&lt;br /&gt;&lt;diffgr:errors&gt;&lt;br /&gt;&lt;/diffgr:errors&gt;&lt;br /&gt;&lt;/diffgr:diffgram&gt;&lt;br /&gt;The DiffGram format consists of the following blocks of data:&lt;br /&gt;&lt;datainstance&gt;&lt;br /&gt;The name of this element, DataInstance, is used for explanation purposes in this documentation. A DataInstance element represents a DataSet or a row of a DataTable. Instead of DataInstance, the element would contain the name of the DataSet or DataTable. This block of the DiffGram format contains the current data, whether it has been modified or not. An element, or row, that has been modified is identified with the diffgr:hasChanges annotation.&lt;br /&gt;&lt;diffgr:before&gt;&lt;br /&gt;This block of the DiffGram format contains the original version of a row. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation.&lt;br /&gt;&lt;diffgr:errors&gt;&lt;br /&gt;This block of the DiffGram format contains error information for a particular row in the DataInstance block. Elements in this block are matched to elements in the DataInstance block using the diffgr:id annotation.&lt;br /&gt;&lt;br /&gt;2.    If I replace my Sqlserver with XML files and how about handling the same?&lt;br /&gt;&lt;br /&gt;3.    Write syntax to serialize class using XML Serializer?&lt;br /&gt;&lt;br /&gt;(IIS)&lt;br /&gt;&lt;br /&gt;4.    In which process does IIS runs (was asking about the EXE file)&lt;br /&gt;&lt;br /&gt;inetinfo.exe is the Microsoft IIS server running, handling ASP.NET requests among other things.  When an ASP.NET request is received (usually a file with .aspx extension), the ISAPI filter aspnet_isapi.dll takes care of it by passing the request to the actual worker process&lt;br /&gt;aspnet_wp.exe.&lt;br /&gt;&lt;br /&gt;5.    Where are the IIS log files stored?&lt;br /&gt;&lt;br /&gt;Ans.  C:\WINDOWS\system32\Logfiles\W3SVC1&lt;br /&gt;    OR&lt;br /&gt;c:\winnt\system32\LogFiles\W3SVC1&lt;br /&gt;&lt;br /&gt;6.    What are the different IIS authentication modes in IIS 5.0 and Explain? Difference between basic and digest authentication modes?&lt;br /&gt;&lt;br /&gt;Ans.   IIS provides a variety of authentication schemes:&lt;br /&gt;·    Anonymous (enabled by default)&lt;br /&gt;·    Basic&lt;br /&gt;·    Digest&lt;br /&gt;·    Integrated Windows authentication (enabled by default)&lt;br /&gt;·    Client Certificate Mapping&lt;br /&gt;Anonymous&lt;br /&gt;Anonymous authentication gives users access to the public areas of your Web site without prompting them for a user name or password. Although listed as an authentication scheme, it is not technically performing any client authentication because the client is not required to supply any credentials. Instead, IIS provides stored credentials to Windows using a special user account, IUSR_machinename. By default, IIS controls the password for this account. Whether or not IIS controls the password affects the permissions the anonymous user has. When IIS controls the password, a sub authentication DLL (iissuba.dll) authenticates the user using a network logon. The function of this DLL is to validate the password supplied by IIS and to inform Windows that the password is valid, thereby authenticating the client. However, it does not actually provide a password to Windows. When IIS does not control the password, IIS calls the LogonUser() API in Windows and provides the account name, password and domain name to log on the user using a local logon. After the logon, IIS caches the security token and impersonates the account. A local logon makes it possible for the anonymous user to access network resources, whereas a network logon does not.&lt;br /&gt;Basic Authentication&lt;br /&gt;IIS Basic authentication as an implementation of the basic authentication scheme found in section 11 of the HTTP 1.0 specification.&lt;br /&gt;As the specification makes clear, this method is, in and of itself, non-secure. The reason is that Basic authentication assumes a trusted connection between client and server. Thus, the username and password are transmitted in clear text. More specifically, they are transmitted using Base64 encoding, which is trivially easy to decode. This makes Basic authentication the wrong choice to use over a public network on its own.&lt;br /&gt;Basic Authentication is a long-standing standard supported by nearly all browsers. It also imposes no special requirements on the server side -- users can authenticate against any NT domain, or even against accounts on the local machine. With SSL to shelter the security credentials while they are in transmission, you have an authentication solution that is both highly secure and quite flexible.&lt;br /&gt;Digest Authentication&lt;br /&gt;The Digest authentication option was added in Windows 2000 and IIS 5.0. Like Basic authentication, this is an implementation of a technique suggested by Web standards, namely RFC 2069 (superceded by RFC 2617).&lt;br /&gt;Digest authentication also uses a challenge/response model, but it is much more secure than Basic authentication (when used without SSL). It achieves this greater security not by encrypting the secret (the password) before sending it, but rather by following a different design pattern -- one that does not require the client to transmit the password over the wire at all.&lt;br /&gt;Instead of sending the password itself, the client transmits a one-way message digest (a checksum) of the user's password, using (by default) the MD5 algorithm. The server then fetches the password for that user from a Windows 2000 Domain Controller, reruns the checksum algorithm on it, and compares the two digests. If they match, the server knows that the client knows the correct password, even though the password itself was never sent. (If you have ever wondered what the default ISAPI filter "md5filt" that is installed with IIS 5.0 is used for, now you know.&lt;br /&gt;Integrated Windows Authentication&lt;br /&gt;Integrated Windows authentication (formerly known as NTLM authentication and Windows NT Challenge/Response authentication) can use either NTLM or Kerberos V5 authentication and only works with Internet Explorer 2.0 and later.&lt;br /&gt;When Internet Explorer attempts to access a protected resource, IIS sends two WWW-Authenticate headers, Negotiate and NTLM.&lt;br /&gt;·    If Internet Explorer recognizes the Negotiate header, it will choose it because it is listed first. When using Negotiate, the browser will return information for both NTLM and Kerberos. At the server, IIS will use Kerberos if both the client (Internet Explorer 5.0 and later) and server (IIS 5.0 and later) are running Windows 2000 and later, and both are members of the same domain or trusted domains. Otherwise, the server will default to using NTLM.&lt;br /&gt;·    If Internet Explorer does not understand Negotiate, it will use NTLM.&lt;br /&gt;So, which mechanism is used depends upon a negotiation between Internet Explorer and IIS.&lt;br /&gt;When used in conjunction with Kerberos v5 authentication, IIS can delegate security credentials among computers running Windows 2000 and later that are trusted and configured for delegation. Delegation enables remote access of resources on behalf of the delegated user.&lt;br /&gt;Integrated Windows authentication is the best authentication scheme in an intranet environment where users have Windows domain accounts, especially when using Kerberos. Integrated Windows authentication, like digest authentication, does not pass the user's password across the network. Instead, a hashed value is exchanged.&lt;br /&gt;Client Certificate Mapping&lt;br /&gt;A certificate is a digitally signed statement that contains information about an entity and the entity's public key, thus binding these two pieces of information together. A trusted organization (or entity) called a Certification Authority (CA) issues a certificate after the CA verifies that the entity is who it says it is. Certificates can contain different types of data. For example, an X.509 certificate includes the format of the certificate, the serial number of the certificate, the algorithm used to sign the certificate, the name of the CA that issued the certificate, the name and public key of the entity requesting the certificate, and the CA's signature. X.509 client certificates simplify authentication for larger user bases because they do not rely on a centralized account database. You can verify a certificate simply by examining the certificate.&lt;br /&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconIISAuthentication.asp&lt;br /&gt;&lt;br /&gt;7.    Explain the concept of data island?&lt;br /&gt;8.    How to use XML DOM model on client side using JavaScript.&lt;br /&gt;9.    What are the ways to create a tree view control using XML, XSL &amp;amp; JavaScript?&lt;br /&gt;10.    Questions on XPathNavigator, and the other classes in System.XML Namespace?&lt;br /&gt;11.    What is Use of Template in XSL?&lt;br /&gt;12.    What is “Well Formed XML” and “Valid XML”&lt;br /&gt;13.    How you will do SubString in XSL&lt;br /&gt;14.    Can we do sorting in XSL ? how do you deal sorting columns dynamically in XML.&lt;br /&gt;15.    What is “Async” property of XML Means ?&lt;br /&gt;16.    What is XPath Query ?&lt;br /&gt;17.    Difference Between Element and Node.&lt;br /&gt;18.    What is CDATA Section.&lt;br /&gt;19.    DOM &amp;amp; SAX parsers explanation and difference&lt;br /&gt;20.    What is GetElementbyname method will do?&lt;br /&gt;21.    What is selectnode method will give?&lt;br /&gt;22.    What is valid xml document? What a well formed xml document?&lt;br /&gt;23.    What is the Difference between XmlDocument and XmlDataDocument?&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-7416433480029594490?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/7416433480029594490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=7416433480029594490&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/7416433480029594490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/7416433480029594490'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/xml-interview-questions-part-i.html' title='XML Interview Questions Part I'/><author><name>Shaveta Aggarwal</name><uri>http://www.blogger.com/profile/16345884203149403084</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-9088987006789845123.post-4967268248944163195</id><published>2009-04-03T15:20:00.004+05:30</published><updated>2009-04-03T15:25:51.901+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='singleton and singlecall'/><category scheme='http://www.blogger.com/atom/ns#' term='trace utility'/><category scheme='http://www.blogger.com/atom/ns#' term='CAO and SAO'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Webservice and Remoting'/><title type='text'>ASP.NET Web Service and Remoting Interview Questions Part II</title><content type='html'>16.    What is Remoting?&lt;br /&gt;&lt;br /&gt;Ans.  The process of communication between different operating system processes, regardless of whether they are on the same computer. The .NET remoting system is an architecture designed to simplify communication between objects living in different application domains, whether on the same computer or not, and between different contexts, whether in the same application domain or not.&lt;br /&gt;&lt;br /&gt;17.    Difference between web services &amp;amp; remoting?&lt;br /&gt;&lt;br /&gt;Ans.    ASP.NET Web Services    .NET Remoting      &lt;br /&gt;Protocol     Can be accessed only over HTTP    Can be accessed over any protocol (including TCP, HTTP, SMTP and so on)      &lt;br /&gt;State Management     Web services work in a stateless environment    Provide support for both stateful and stateless environments through Singleton and SingleCall objects      &lt;br /&gt;Type System     Web services support only the datatypes defined in the XSD type system, limiting the number of objects that can be serialized.     Using binary communication, .NET Remoting can provide support for rich type system      &lt;br /&gt;Interoperability     Web services support interoperability across platforms, and are ideal for heterogeneous environments.     .NET remoting requires the client be built using .NET, enforcing homogenous environment.       &lt;br /&gt;Reliability     Highly reliable due to the fact that Web services are always hosted in IIS    Can also take advantage of IIS for fault isolation. If IIS is not used, application needs to provide plumbing for ensuring the reliability of the application.       &lt;br /&gt;Extensibility     Provides extensibility by allowing us to intercept the SOAP messages during the serialization and deserialization stages.     Very extensible by allowing us to customize the different components of the .NET remoting framework.       &lt;br /&gt;Ease-of-Programming     Easy-to-create and deploy.     Complex to program.     &lt;br /&gt;&lt;br /&gt;18.    Though both the .NET Remoting infrastructure and ASP.NET Web services can enable cross-process communication, each is designed to benefit a different target audience. ASP.NET Web services provide a simple programming model and a wide reach. .NET Remoting provides a more complex programming model and has a much narrower reach.&lt;br /&gt;As explained before, the clear performance advantage provided by TCPChannel-remoting should make you think about using this channel whenever you can afford to do so. If you can create direct TCP connections from your clients to your server and if you need to support only the .NET platform, you should go for this channel. If you are going to go cross-platform or you have the requirement of supporting SOAP via HTTP, you should definitely go for ASP.NET Web services.&lt;br /&gt;Both the .NET remoting and ASP.NET Web services are powerful technologies that provide a suitable framework for developing distributed applications. It is important to understand how both technologies work and then choose the one that is right for your application. For applications that require interoperability and must function over public networks, Web services are probably the best bet. For those that require communications with other .NET components and where performance is a key priority, .NET Remoting is the best choice. In short, use Web services when you need to send and receive data from different computing platforms, use .NET Remoting when sending and receiving data between .NET applications. In some architectural scenarios, you might also be able to use.NET Remoting in conjunction with ASP.NET Web services and take advantage of the best of both worlds.&lt;br /&gt;The Key difference between ASP.NET webservices and .NET Remoting is how they serialize data into messages and the format they choose for metadata.  ASP.NET uses XML serializer for serializing or Marshalling. And XSD is used for Metadata.  .NET Remoting relies on System.Runtime.Serialization.Formatter.Binary and System.Runtime.Serialization.SOAPFormatter and relies on .NET CLR Runtime assemblies for metadata.&lt;br /&gt;&lt;br /&gt;19.    Can you pass SOAP messages through remoting?&lt;br /&gt;&lt;br /&gt;20.    CAO and SAO.&lt;br /&gt;&lt;br /&gt;Ans. Client Activated objects are those remote objects whose Lifetime is directly Controlled by the client. This is in direct contrast to SAO. Where the server, not the client has complete control over the lifetime of the objects.&lt;br /&gt;Client activated objects are instantiated on the server as soon as the client request the object to be created. Unlike as SAO a CAO doesn’t delay the object creation until the first method is called on the object. (In SAO the object is instantiated when the client calls the method on the object)&lt;br /&gt;&lt;br /&gt;21.  singleton and singlecall.&lt;br /&gt;&lt;br /&gt;Singleton types never have more than one instance at any one time. If an instance exists, all client requests are serviced by that instance.&lt;br /&gt;Single Call types always have one instance per client request. The next method invocation will be serviced by a different server instance, even if the previous instance has not yet been recycled by the system.&lt;br /&gt;&lt;br /&gt;22.    What is Asynchronous Web Services?&lt;br /&gt;&lt;br /&gt;23.    Web Client class and its methods?&lt;br /&gt;&lt;br /&gt;24.    Flow of remoting?&lt;br /&gt;&lt;br /&gt;25.    What is the use of trace utility?&lt;br /&gt;&lt;br /&gt;Ans.  Using the SOAP Trace Utility&lt;br /&gt;The Microsoft® Simple Object Access Protocol (SOAP) Toolkit 2.0 includes a TCP/IP trace utility, MSSOAPT.EXE. You use this trace utility to view the SOAP messages sent by HTTP between a SOAP client and a service on the server.&lt;br /&gt;Using the Trace Utility on the Server&lt;br /&gt;To see all of a service's messages received from and sent to all clients, perform the following steps on the server.&lt;br /&gt;1.    On the server, open the Web Services Description Language (WSDL) file.&lt;br /&gt;2.    In the WSDL file, locate the &lt;soap:address&gt; element that corresponds to the service and change the location attribute for this element to port 8080. For example, if the location attribute specifies&lt;br /&gt;&lt;http://myserver/vdir/service.wsdl&gt; change this attribute to &lt;http://myserver:8080/vdir/service.wsdl&gt;.&lt;br /&gt;3.    Run MSSOAPT.exe.&lt;br /&gt;4.    On the File menu, point to New, and either click Formatted Trace (if you don't want to see HTTP headers) or click Unformatted Trace (if you do want to see HTTP headers).&lt;br /&gt;5.    In the Trace Setup dialog box, click OK to accept the default values.&lt;br /&gt;Using the Trace Utility on the Client&lt;br /&gt;To see all messages sent to and received from a service, do the following steps on the client.&lt;br /&gt;6.    Copy the WSDL file from the server to the client.&lt;br /&gt;7.    Modify location attribute of the &lt;soap:address&gt; element in the local copy of the WSDL document to direct the client to localhost:8080 and make a note of the current host and port. For example, if the WSDL contains &lt;http://myserver/vdir/service.wsdl&gt;, change it to &lt;http://localhost:8080/vdir/service.wsdl&gt; and make note of "MyServer".&lt;br /&gt;8.    On the client, run MSSOPT.exe.&lt;br /&gt;9.    On the File menu, point to New, and either click Formatted Trace (if you don't want to see HTTP headers) or click Unformatted Trace (if you do want to see HTTP headers).&lt;br /&gt;10.    In the Destination host box, enter the host specified in Step 2.&lt;br /&gt;11.    In the Destination port box, enter the port specified in Step 2.&lt;br /&gt;12.     Click OK.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-4967268248944163195?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/4967268248944163195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=4967268248944163195&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/4967268248944163195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/4967268248944163195'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/aspnet-web-service-and-remoting_03.html' title='ASP.NET Web Service and Remoting Interview Questions Part II'/><author><name>Shaveta Aggarwal</name><uri>http://www.blogger.com/profile/16345884203149403084</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-9088987006789845123.post-3429622417322394045</id><published>2009-04-03T15:12:00.005+05:30</published><updated>2009-04-03T15:19:58.372+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='disco file'/><category scheme='http://www.blogger.com/atom/ns#' term='SOAP'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET WebService'/><category scheme='http://www.blogger.com/atom/ns#' term='role of HTTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Namespace for webservice'/><category scheme='http://www.blogger.com/atom/ns#' term='wsdl tool'/><category scheme='http://www.blogger.com/atom/ns#' term='WSDL'/><category scheme='http://www.blogger.com/atom/ns#' term='asynchronous'/><category scheme='http://www.blogger.com/atom/ns#' term='UDDI'/><category scheme='http://www.blogger.com/atom/ns#' term='secure a web service'/><category scheme='http://www.blogger.com/atom/ns#' term='proxy'/><title type='text'>ASP.NET Web Service and Remoting Interview Questions Part I</title><content type='html'>1.    What is a WebService and what is the underlying protocol used in it?Why Web Services?&lt;br /&gt;&lt;br /&gt;Ans.  Web Services are applications delivered as a service on the Web. Web services allow for programmatic access of business logic over the Web. Web services typically rely on XML-based protocols, messages, and interface descriptions for communication and access. Web services are designed to be used by other programs or applications rather than directly by end user. Programs invoking a Web service are called clients. SOAP over HTTP is the most commonly used protocol for invoking Web services.&lt;br /&gt;There are three main uses of Web services.&lt;br /&gt;1.    Application integration Web services within an intranet are commonly used to integrate business applications running on disparate platforms. For example, a .NET client running on Windows 2000 can easily invoke a Java Web service running on a mainframe or Unix machine to retrieve data from a legacy application.&lt;br /&gt;2.    Business integration Web services allow trading partners to engage in e-business leveraging the existing Internet infrastructure. Organizations can send electronic purchase orders to suppliers and receive electronic invoices. Doing e-business with Web services means a low barrier to entry because Web services can be added to existing applications running on any platform without changing legacy code.&lt;br /&gt;3.    Commercial Web services focus on selling content and business services to clients over the Internet similar to familiar Web pages. Unlike Web pages, commercial Web services target applications not humans as their direct users. Continental Airlines exposes flight schedules and status Web services for travel Web sites and agencies to use in their applications. Like Web pages, commercial Web services are valuable only if they expose a valuable service or content. It would be very difficult to get customers to pay you for using a Web service that creates business charts with the customers? data. Customers would rather buy a charting component (e.g. COM or .NET component) and install it on the same machine as their application. On the other hand, it makes sense to sell real-time weather information or stock quotes as a Web service. Technology can help you add value to your services and explore new markets, but ultimately customers pay for contents and/or business services, not for technology&lt;br /&gt;&lt;br /&gt;2.    Are Web Services a replacement for other distributed computing platforms?&lt;br /&gt;&lt;br /&gt;Ans.  No. Web Services is just a new way of looking at existing implementation platforms.&lt;br /&gt;&lt;br /&gt;3.    In a Webservice, need to display 10 rows from a table. So DataReader or DataSet is best choice?&lt;br /&gt;&lt;br /&gt;Ans.  A: WebService will support only DataSet.&lt;br /&gt;&lt;br /&gt;4.    How to generate WebService proxy? What is SOAP, WSDL, UDDI and the concept behind Web Services? What are various components of WSDL? What is the use of WSDL.exe utility?&lt;br /&gt;&lt;br /&gt;Ans.  SOAP is an XML-based messaging framework specifically designed for exchanging formatted data across the Internet, for example using request and reply messages or sending entire documents. SOAP is simple, easy to use, and completely neutral with respect to operating system, programming language, or distributed computing platform.&lt;br /&gt;After SOAP became available as a mechanism for exchanging XML messages among enterprises (or among disparate applications within the same enterprise), a better way was needed to describe the messages and how they are exchanged. The Web Services Description Language (WSDL) is a particular form of an XML Schema, developed by Microsoft and IBM for the purpose of defining the XML message, operation, and protocol mapping of a web service accessed using SOAP or other XML protocol. WSDL defines web services in terms of "endpoints" that operate on XML messages. The WSDL syntax allows both the messages and the operations on the messages to be defined abstractly, so they can be mapped to multiple physical implementations. The current WSDL spec describes how to map messages and operations to SOAP 1.1, HTTP GET/POST, and MIME. WSDL creates web service definitions by mapping a group of endpoints into a logical sequence of operations on XML messages. The same XML message can be mapped to multiple operations (or services) and bound to one or more communications protocols (using "ports").&lt;br /&gt;The Universal Description, Discovery, and Integration (UDDI) framework defines a data model (in XML) and SOAP APIs for registration and searches on business information, including the web services a business exposes to the Internet. UDDI is an independent consortium of vendors, founded by Microsoft, IBM, and Ariba, for the purpose of developing an Internet standard for web service description registration and discovery. Microsoft, IBM, and Ariba also are hosting the initial deployment of a UDDI service, which is conceptually patterned after DNS (the Internet service that translates URLs into TCP addresses). UDDI uses a private agreement profile of SOAP (i.e. UDDI doesn't use the SOAP serialization format because it's not well suited to passing complete XML documents (it's aimed at RPC style interactions). The main idea is that businesses use the SOAP APIs to register themselves with UDDI, and other businesses search UDDI when they want to discover a trading partner, for example someone from whom they wish to procure sheet metal, bolts, or transistors. The information in UDDI is categorized according to industry type and geographical location, allowing UDDI consumers to search through lists of potentially matching businesses to find the specific one they want to contact. Once a specific business is chosen, another call to UDDI is made to obtain the specific contact information for that business. The contact information includes a pointer to the target business's WSDL or other XML schema file describing the web service that the target business publishes.&lt;br /&gt;&lt;br /&gt;5.    How to generate proxy class other than .net app and wsdl tool?&lt;br /&gt;&lt;br /&gt;Ans.  To access an XML Web service from a client application, you first add a Web reference, which is a reference to an XML Web service. When you create a Web reference, Visual Studio creates an XML Web service proxy class automatically and adds it to your project. This proxy class exposes the methods of the XML Web service and handles the marshalling of appropriate arguments back and forth between the XML Web service and your application. Visual Studio uses the Web Services Description Language (WSDL) to create the proxy.&lt;br /&gt;To generate an XML Web service proxy class:&lt;br /&gt;·    From a command prompt, use Wsdl.exe to create a proxy class, specifying (at a minimum) the URL to an XML Web service or a service description, or the path to a saved service description.&lt;br /&gt;Wsdl /language:language  /protocol:protocol /namespace:myNameSpace /out:filename&lt;br /&gt;/username:username /password:password /domain:domain &lt;url&gt;&lt;br /&gt;&lt;br /&gt;6.    What is a proxy in web service? How do I use a proxy server when invoking a Web service?&lt;br /&gt; &lt;br /&gt;7.    asynchronous web service means?&lt;br /&gt;&lt;br /&gt;8.    What are the events fired when web service called?&lt;br /&gt;&lt;br /&gt;9.    How will do transaction in Web Services?&lt;br /&gt;&lt;br /&gt;10.    How does SOAP transport happen and what is the role of HTTP in it? How you can access a webservice using soap?&lt;br /&gt;&lt;br /&gt;11.    What are the different formatters can be used in both? Why?.. binary/soap&lt;br /&gt;&lt;br /&gt;12.    How you will protect / secure a web service?&lt;br /&gt;&lt;br /&gt;Ans.  For the most part, things that you do to secure a Web site can be used to secure a Web Service. If you need to encrypt the data exchange, you use Secure Sockets Layer (SSL) or a Virtual Private Network to keep the bits secure. For authentication, use HTTP Basic or Digest authentication with Microsoft® Windows® integration to figure out who the caller is.&lt;br /&gt;these items cannot:&lt;br /&gt;·    Parse a SOAP request for valid values&lt;br /&gt;·    Authenticate access at the Web Method level (they can authenticate at the Web Service level)&lt;br /&gt;·    Stop reading a request as soon as it is recognized as invalid&lt;br /&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontransactionsupportinaspnetwebservices.asp&lt;br /&gt;&lt;br /&gt;13.    How will you expose/publish a webservice?&lt;br /&gt;&lt;br /&gt;14.    What is disco file?&lt;br /&gt;&lt;br /&gt;15.    What’s the attribute for webservice method? What is the namespace for creating webservice?&lt;br /&gt;&lt;br /&gt;Ans. &lt;br /&gt;&lt;br /&gt;[WebMethod]&lt;br /&gt;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Services;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-3429622417322394045?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/3429622417322394045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=3429622417322394045&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/3429622417322394045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/3429622417322394045'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/aspnet-web-service-and-remoting.html' title='ASP.NET Web Service and Remoting Interview Questions Part I'/><author><name>Shaveta Aggarwal</name><uri>http://www.blogger.com/profile/16345884203149403084</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9088987006789845123.post-7715487638352328216</id><published>2009-04-03T15:03:00.005+05:30</published><updated>2009-04-03T15:12:31.829+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='web.config'/><category scheme='http://www.blogger.com/atom/ns#' term='AutoEventWireup attribute'/><category scheme='http://www.blogger.com/atom/ns#' term='smart navigation'/><category scheme='http://www.blogger.com/atom/ns#' term='Global ASA(X)'/><category scheme='http://www.blogger.com/atom/ns#' term='pie chart in asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='name collisions'/><category scheme='http://www.blogger.com/atom/ns#' term='Caching'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Last Error Occurred'/><category scheme='http://www.blogger.com/atom/ns#' term='control and component'/><title type='text'>ASP.NET Application and Security Interview Questions Part II</title><content type='html'>11.    How can u handle Exceptions in Asp.Net?&lt;br /&gt;&lt;br /&gt;12.    How can u handle Un Managed Code Exceptions in ASP.Net?&lt;br /&gt;&lt;br /&gt;13.    Asp.net - How to find last error which occurred?&lt;br /&gt;&lt;br /&gt;Ans.  A: Server.GetLastError();&lt;br /&gt;[C#]&lt;br /&gt;Exception LastError;&lt;br /&gt;String ErrMessage;&lt;br /&gt;LastError = Server.GetLastError();&lt;br /&gt;if (LastError != null)&lt;br /&gt;ErrMessage = LastError.Message;&lt;br /&gt;else&lt;br /&gt;ErrMessage = "No Errors";&lt;br /&gt;Response.Write("Last Error = " + ErrMessage);&lt;br /&gt;&lt;br /&gt;14.    How to do Caching in ASP?&lt;br /&gt;&lt;br /&gt;Ans.  A: &lt;%@ OutputCache Duration="60" VaryByParam="None" %&gt;&lt;br /&gt;&lt;br /&gt;VaryByParam value    Description      &lt;br /&gt;none    One version of page cached (only raw GET)      &lt;br /&gt;*    n versions of page cached based on query string and/or POST body      &lt;br /&gt;v1    n versions of page cached based on value of v1 variable in query string or POST body      &lt;br /&gt;v1;v2    n versions of page cached based on value of v1 and v2 variables in query string or POST body    &lt;br /&gt;&lt;br /&gt;15.    &lt;%@ OutputCache Duration="60" VaryByParam="none" %&gt;&lt;br /&gt;&lt;%@ OutputCache Duration="60" VaryByParam="*" %&gt;&lt;br /&gt;&lt;%@ OutputCache Duration="60" VaryByParam="name;age" %&gt;&lt;br /&gt;The OutputCache directive supports several other cache varying options&lt;br /&gt;·    VaryByHeader - maintain separate cache entry for header string changes (UserAgent, UserLanguage, etc.)&lt;br /&gt;·    VaryByControl - for user controls, maintain separate cache entry for properties of a user control&lt;br /&gt;·    VaryByCustom - can specify separate cache entries for browser types and version or provide a custom GetVaryByCustomString method in HttpApplicationderived class&lt;br /&gt;&lt;br /&gt;16.    What is the Global ASA(X) File?&lt;br /&gt;&lt;br /&gt;17.    Any alternative to avoid name collisions other then Namespaces.&lt;br /&gt;&lt;br /&gt;Ans.  A scenario that two namespaces named N1 and N2 are there both having the same class say A. now in another class i ve written&lt;br /&gt;using N1;using N2;&lt;br /&gt;and i am instantiating class A in this class. Then how will u avoid name collisions?&lt;br /&gt;Ans: using alias&lt;br /&gt;Eg: using MyAlias = MyCompany.Proj.Nested;&lt;br /&gt;&lt;br /&gt;18.    Which is the namespace used to write error message in event Log File?&lt;br /&gt;&lt;br /&gt;19.    What are the page level transaction and class level transaction?&lt;br /&gt;&lt;br /&gt;20.    What are  different transaction options?&lt;br /&gt;&lt;br /&gt;21.    What is the namespace for encryption?&lt;br /&gt;&lt;br /&gt;22.    What is the difference between application and cache variables?&lt;br /&gt;&lt;br /&gt;23.    What is the difference between control and component?&lt;br /&gt;&lt;br /&gt;24.    You ve defined one page_load event in aspx page and same page_load event in code behind how will prog run?&lt;br /&gt;&lt;br /&gt;25.    Where would you use an IHttpModule, and what are the limitations of any approach you might take in implementing one?&lt;br /&gt;&lt;br /&gt;26.    Can you edit data in the Repeater control? Which template must you provide, in order to display data in a Repeater control? How can you provide an alternating color scheme in a Repeater control? What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?&lt;br /&gt;&lt;br /&gt;27.    What is the use of web.config? Difference between machine.config and Web.config?&lt;br /&gt;&lt;br /&gt;Ans.   ASP.NET configuration files are XML-based text files--each named web.config--that can appear in any directory on an ASP.NET&lt;br /&gt;Web application server. Each web.config file applies configuration settings to the directory it is located in and to all&lt;br /&gt;virtual child directories beneath it. Settings in child directories can optionally override or modify settings specified in&lt;br /&gt;parent directories. The root configuration file--WinNT\Microsoft.NET\Framework\&lt;version&gt;\config\machine.config--provides&lt;br /&gt;default configuration settings for the entire machine. ASP.NET configures IIS to prevent direct browser access to web.config&lt;br /&gt;files to ensure that their values cannot become public (attempts to access them will cause ASP.NET to return 403: Access&lt;br /&gt;Forbidden).&lt;br /&gt;At run time ASP.NET uses these web.config configuration files to hierarchically compute a unique collection of settings for&lt;br /&gt;each incoming URL target request (these settings are calculated only once and then cached across subsequent requests; ASP.NET&lt;br /&gt;automatically watches for file changes and will invalidate the cache if any of the configuration files change).&lt;br /&gt;&lt;br /&gt;28.    What is the use of sessionstate tag in the web.config file?&lt;br /&gt;&lt;br /&gt;Ans.  Configuring session state: Session state features can be configured via the &lt;sessionstate&gt; section in a web.config file. To double the default timeout of 20 minutes, you can add the following to the web.config file of an application:&lt;br /&gt;&lt;sessionState&lt;br /&gt;timeout="40"&lt;br /&gt;/&gt;&lt;br /&gt;29.    What are the different modes for the sessionstates in the web.config file?&lt;br /&gt;&lt;br /&gt;Ans.  Off    Indicates that session state is not enabled.      &lt;br /&gt;Inproc    Indicates that session state is stored locally.      &lt;br /&gt;StateServer    Indicates that session state is stored on a remote server.      &lt;br /&gt;SQLServer    Indicates that session state is stored on the SQL Server.    &lt;br /&gt;&lt;br /&gt;30.    What is smart navigation?&lt;br /&gt;&lt;br /&gt;Ans.  When a page is requested by an Internet Explorer 5 browser, or later, smart navigation enhances the user's experience of the page by performing the following:&lt;br /&gt;·    eliminating the flash caused by navigation.&lt;br /&gt;·    persisting the scroll position when moving from page to page.&lt;br /&gt;·    persisting element focus between navigations.&lt;br /&gt;·    retaining only the last page state in the browser's history.&lt;br /&gt;Smart navigation is best used with ASP.NET pages that require frequent postbacks but with visual content that does not change dramatically on return. Consider this carefully when deciding whether to set this property to true.&lt;br /&gt;Set the SmartNavigation attribute to true in the @ Page directive in the .aspx file. When the page is requested, the dynamically generated class sets this property.&lt;br /&gt;&lt;br /&gt;31.    In what order do the events of an ASPX page execute. As a developer is it important to undertsand these events?&lt;br /&gt;&lt;br /&gt;32.    How would you get ASP.NET running in Apache web servers - why would you even do this?&lt;br /&gt;&lt;br /&gt;33.    What tags do you need to add within the asp:datagrid tags to bind columns manually&lt;br /&gt;&lt;br /&gt;34.    What base class do all Web Forms inherit from?&lt;br /&gt;&lt;br /&gt;Ans.  System.Web.UI.Page&lt;br /&gt;&lt;br /&gt;35.    How can we create pie chart in asp.net?&lt;br /&gt;&lt;br /&gt;36.    Is it possible for me to change my aspx file extension to some other name?&lt;br /&gt;&lt;br /&gt;Ans.   Yes.&lt;br /&gt;Open IIS-&gt;Default Website -&gt; Properties&lt;br /&gt;Select HomeDirectory tab&lt;br /&gt;Click on configuration button&lt;br /&gt;Click on add. Enter aspnet_isapi details (C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\aspnet_isapi.dll   |  GET,HEAD,POST,DEBUG)&lt;br /&gt;&lt;br /&gt;Open machine.config(C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\CONFIG) &amp;amp; add new extension under &lt;httphandlers&gt; tag&lt;br /&gt;&lt;add verb="*" path="*.santhosh" type="System.Web.UI.PageHandlerFactory"&gt;&lt;br /&gt;&lt;br /&gt;37.    What is AutoEventWireup attribute for ?&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-7715487638352328216?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/7715487638352328216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=7715487638352328216&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/7715487638352328216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/7715487638352328216'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/aspnet-application-and-security_03.html' title='ASP.NET Application and Security Interview Questions Part II'/><author><name>Shaveta Aggarwal</name><uri>http://www.blogger.com/profile/16345884203149403084</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-9088987006789845123.post-727699539306325681</id><published>2009-04-03T14:24:00.003+05:30</published><updated>2009-04-03T14:40:59.973+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='validator'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Injection'/><category scheme='http://www.blogger.com/atom/ns#' term='windows authentication'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET Role-Based security'/><category scheme='http://www.blogger.com/atom/ns#' term='authentication modes'/><category scheme='http://www.blogger.com/atom/ns#' term='Postback'/><title type='text'>ASP.NET Application and Security Interview Questions Part I</title><content type='html'>1.   Security types in ASP/ASP.NET? Different Authentication modes?&lt;br /&gt;&lt;br /&gt;2.    How .Net has implemented security for web applications?&lt;br /&gt;&lt;br /&gt;3.    How to do Forms authentication in asp.net?&lt;br /&gt;&lt;br /&gt;4.    Explain authentication levels in .net ?&lt;br /&gt;&lt;br /&gt;5.    Explain autherization levels in .net ?&lt;br /&gt;&lt;br /&gt;6.    What is Role-Based security?&lt;br /&gt;&lt;br /&gt;Ans.  A role is a named set of principals that have the same privileges with respect to security (such as a teller or a manager). A principal can be a member of one or more roles. Therefore, applications can use role membership to determine whether a principal is authorized to perform a requested action.&lt;br /&gt;&lt;br /&gt;7.    How will you do windows authentication and what is the namespace?&lt;br /&gt;&lt;br /&gt;Ans.  If a user is logged under integrated windows authentication mode, but he is still not able to logon, what might be the possible cause for this? In ASP.Net application how do you find the name of the logged in person under windows authentication?&lt;br /&gt;&lt;br /&gt;8.    What are the different authentication modes in the .NET environment?&lt;br /&gt;&lt;br /&gt;Ans.      &lt;authentication mode="Windows|Forms|Passport|None"&gt;&lt;br /&gt;                    &lt;forms name="name"&lt;br /&gt;                      loginUrl="url"&lt;br /&gt;                          protection="All|None|Encryption|Validation"&lt;br /&gt;                          timeout="30" path="/" &gt;&lt;br /&gt;                          requireSSL="true|false"&lt;br /&gt;                          slidingExpiration="true|false"&gt;&lt;br /&gt;                         &lt;credentials passwordformat="Clear|SHA1|MD5"&gt;&lt;br /&gt;                            &lt;user name="username" password="password"&gt;&lt;br /&gt;                         &lt;/credentials&gt;&lt;br /&gt;                     &lt;/forms&gt;&lt;br /&gt;                     &lt;passport redirecturl="internal"&gt;&lt;br /&gt;             &lt;/authentication&gt;&lt;br /&gt;&lt;br /&gt;Attribute    Option    Description      &lt;br /&gt;mode           Controls the default authentication mode for an application.      &lt;br /&gt;       Windows    Specifies Windows authentication as the default authentication mode. Use this mode when using any form of Microsoft Internet Information Services (IIS) authentication: Basic, Digest, Integrated Windows authentication (NTLM/Kerberos), or certificates.      &lt;br /&gt;       Forms    Specifies ASP.NET forms-based authentication as the default authentication mode.      &lt;br /&gt;       Passport    Specifies Microsoft Passport authentication as the default authentication mode.      &lt;br /&gt;       None    Specifies no authentication. Only anonymous users are expected or applications can handle events to provide their own authentication.    &lt;br /&gt;&lt;br /&gt;9.    How do you specify whether your data should be passed as Query string and Forms (Mainly about POST and GET)&lt;br /&gt;&lt;br /&gt;Ans.   Through attribute tag of form tag.&lt;br /&gt;&lt;br /&gt;10.    What is the other method, other than GET and POST, in ASP.NET?&lt;br /&gt;&lt;br /&gt;11.    What are validator?&lt;br /&gt;&lt;br /&gt;Ans.  Name the Validation controls in asp.net? How do u disable them? Will the asp.net validators run in server side or client side? How do you do Client-side validation in .Net? How to disable validator control by client side JavaScript?&lt;br /&gt;A set of server controls included with ASP.NET that test user input in HTML and Web server controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation controls can also perform validation ("EnableClientScript" property set to true/false) using client script.&lt;br /&gt;The following validation controls are available in asp.net:&lt;br /&gt;RequiredFieldValidator Control, CompareValidator Control, RangeValidator Control, RegularExpressionValidator Control, CustomValidator Control, ValidationSummary Control.&lt;br /&gt;&lt;br /&gt;12.    Which two properties are there on every validation control?&lt;br /&gt;&lt;br /&gt;Ans.  ControlToValidate, ErrorMessage&lt;br /&gt;&lt;br /&gt;13.    How do you use css in asp.net?&lt;br /&gt;&lt;br /&gt;Ans.  Within the head section of an HTML document that will use these styles, add a link to this external CSS style sheet that&lt;br /&gt;follows this form:&lt;br /&gt;&lt;br /&gt;15.    How do you implement postback with a text box? What is postback and usestate?&lt;br /&gt;&lt;br /&gt;Ans.  Make AutoPostBack property to true&lt;br /&gt;&lt;br /&gt;16.    How can you debug an ASP page, without touching the code?&lt;br /&gt;&lt;br /&gt;17.    What is SQL injection?&lt;br /&gt;&lt;br /&gt;Ans.   An SQL injection attack "injects" or manipulates SQL code by adding unexpected SQL to a query.&lt;br /&gt;Many web pages take parameters from web user, and make SQL query to the database. Take for instance when a user login, web page that user name and password and make SQL query to the database to check if a user has valid name and password.&lt;br /&gt;Username: ' or 1=1 ---&lt;br /&gt;Password: [Empty]&lt;br /&gt;This would execute the following query against the users table:&lt;br /&gt;select count(*) from users where userName='' or 1=1 --' and userPass=''&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-727699539306325681?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/727699539306325681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=727699539306325681&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/727699539306325681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/727699539306325681'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/aspnet-application-and-security.html' title='ASP.NET Application and Security Interview Questions Part I'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.post-1149287186647098801</id><published>2009-04-03T14:11:00.006+05:30</published><updated>2009-04-03T14:22:45.909+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='view state'/><category scheme='http://www.blogger.com/atom/ns#' term='Server-side and Client-side code'/><category scheme='http://www.blogger.com/atom/ns#' term='cookie less session'/><category scheme='http://www.blogger.com/atom/ns#' term='State Management'/><category scheme='http://www.blogger.com/atom/ns#' term='webfarm'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.net Application and Session Events'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP Session and ASP.NET Session'/><title type='text'>Asp.Net Session State Interview Questions</title><content type='html'>1.    Application and Session Events&lt;br /&gt;&lt;br /&gt;Ans.  The ASP.NET page framework provides ways for you to work with events that can be raised when your application starts or stops or when an individual user's session starts or stops:&lt;br /&gt;·    Application events are raised for all requests to an application. For example, Application_BeginRequest is raised when any Web Forms page or XML Web service in your application is requested. This event allows you to initialize resources that will be used for each request to the application. A corresponding event, Application_EndRequest, provides you with an opportunity to close or otherwise dispose of resources used for the request.&lt;br /&gt;·    Session events are similar to application events (there is a Session_OnStart and a Session_OnEnd event), but are raised with each unique session within the application. A session begins when a user requests a page for the first time from your application and ends either when your application explicitly closes the session or when the session times out.&lt;br /&gt;You can create handlers for these types of events in the Global.asax file.&lt;br /&gt;&lt;br /&gt;2.    Difference between ASP Session and ASP.NET Session?&lt;br /&gt;&lt;br /&gt;Ans.  asp.net session supports cookie less session &amp;amp; it can span across multiple servers.&lt;br /&gt;&lt;br /&gt;3.    What is cookie less session? How it works?&lt;br /&gt;&lt;br /&gt;Ans.  By default, ASP.NET will store the session state in the same process that processes the request, just as ASP does. If cookies are not available, a session can be tracked by adding a session identifier to the URL. This can be enabled by setting the following:&lt;br /&gt;&lt;sessionstate cookieless="true"&gt;&lt;br /&gt;&lt;br /&gt;4.    How you will handle session when deploying application in more than a server? Describe session handling in a webfarm, how does it work and what are the limits?&lt;br /&gt;&lt;br /&gt;Ans.  By default, ASP.NET will store the session state in the same process that processes the request, just as ASP does. Additionally, ASP.NET can store session data in an external process, which can even reside on another machine. To enable this feature:&lt;br /&gt;·    Start the ASP.NET state service, either using the Services snap-in or by executing "net start aspnet_state" on the command line. The state service will by default listen on port 42424. To change the port, modify the registry key for the service: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\Port&lt;br /&gt;·    Set the mode attribute of the &lt;sessionstate&gt; section to "StateServer".&lt;br /&gt;·    Configure the stateConnectionString attribute with the values of the machine on which you started aspnet_state.&lt;br /&gt;The following sample assumes that the state service is running on the same machine as the Web server ("localhost") and uses the default port (42424):&lt;br /&gt;&lt;sessionstate mode="StateServer" stateconnectionstring="tcpip=localhost:42424"&gt;&lt;br /&gt;Note that if you try the sample above with this setting, you can reset the Web server (enter iisreset on the command line) and the session state value will persist.&lt;br /&gt;&lt;br /&gt;5.    What method do you use to explicitly kill a users session?&lt;br /&gt;&lt;br /&gt;Ans.  Abandon()&lt;br /&gt;&lt;br /&gt;6.    What are the different ways you would consider sending data across pages in ASP (i.e between 1.asp to 2.asp)?&lt;br /&gt;&lt;br /&gt;Ans. Session public properties&lt;br /&gt;&lt;br /&gt;7.    What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?&lt;br /&gt;&lt;br /&gt;Ans.  Web pages are recreated each time the page is posted to the server. In traditional Web programming, this would ordinarily mean that all information associated with the page and the controls on the page would be lost with each round trip.&lt;br /&gt;To overcome this inherent limitation of traditional Web programming, the ASP.NET page framework includes various options to help you preserve changes — that is, for managing state. The page framework includes a facility called view state that automatically preserves property values of the page and all the controls on it between round trips.&lt;br /&gt;However, you will probably also have application-specific values that you want to preserve. To do so, you can use one of the state management options.&lt;br /&gt;Client-Based State Management Options:&lt;br /&gt;View State&lt;br /&gt;Hidden Form Fields&lt;br /&gt;Cookies&lt;br /&gt;Query Strings&lt;br /&gt;Server-Based State Management Options&lt;br /&gt;Application State&lt;br /&gt;Session State&lt;br /&gt;Database Support&lt;br /&gt;&lt;br /&gt;8.    What are the disadvantages of view state / what are the benefits?&lt;br /&gt;&lt;br /&gt;Ans.  Automatic view-state management is a feature of server controls that enables them to repopulate their property values on a round trip (without you having to write any code). This feature does impact performance, however, since a server control's view state is passed to and from the server in a hidden form field. You should be aware of when view state helps you and when it hinders your page's performance.&lt;br /&gt;&lt;br /&gt;9.    When maintaining session through Sql server, what is the impact of Read and Write operation on Session objects? will performance degrade?&lt;br /&gt;&lt;br /&gt;Ans.  Maintaining state using database technology is a common practice when storing user-specific information where the information store is large. Database storage is particularly useful for maintaining long-term state or state that must be preserved even if the server must be restarted.&lt;br /&gt;&lt;br /&gt;10.    What are the contents of cookie?&lt;br /&gt;&lt;br /&gt;11.    How do you create a permanent cookie?&lt;br /&gt;&lt;br /&gt;12.    What is ViewState? What does the "EnableViewState" property do? Why would I want it on or off?&lt;br /&gt;&lt;br /&gt;13.    Explain the differences between Server-side and Client-side code?&lt;br /&gt;&lt;br /&gt;Ans.  Server side code will process at server side &amp;amp; it will send the result to client. Client side code (javascript) will execute only at client side.&lt;br /&gt;&lt;br /&gt;14.    Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?&lt;br /&gt;&lt;br /&gt;15.    Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?&lt;br /&gt;&lt;br /&gt;A:  Many of the ASP.NET configuration options are not configurable at the site, application or subdirectory level on the shared hosting platform.  Certain options can affect the security, performance and stability of the server and, therefore cannot be changed.  The following settings are the only ones that can be changed in your site’s web.config file (s):&lt;br /&gt;browserCaps&lt;br /&gt;clientTarget&lt;br /&gt;pages&lt;br /&gt;customErrors&lt;br /&gt;globalization&lt;br /&gt;authorization&lt;br /&gt;authentication&lt;br /&gt;webControls&lt;br /&gt;webServices&lt;br /&gt;&lt;br /&gt;16.    Briefly describe the role of global.asax?&lt;br /&gt;&lt;br /&gt;17.    How can u debug your .net application?&lt;br /&gt;&lt;br /&gt;18.    How do u deploy your asp.net application?&lt;br /&gt;&lt;br /&gt;19.    Where do we store our connection string in asp.net application?&lt;br /&gt;&lt;br /&gt;20.    Various steps taken to optimize a web based application (caching, stored procedure etc.)&lt;br /&gt;&lt;br /&gt;21.    How does ASP.NET framework maps client side events to Server side events.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-8716701302248821";
/* 468x15, created 5/12/08 */
google_ad_slot = "5004572289";
google_ad_width = 468;
google_ad_height = 15;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9088987006789845123-1149287186647098801?l=interviewhelper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://interviewhelper.blogspot.com/feeds/1149287186647098801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9088987006789845123&amp;postID=1149287186647098801&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/1149287186647098801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9088987006789845123/posts/default/1149287186647098801'/><link rel='alternate' type='text/html' href='http://interviewhelper.blogspot.com/2009/04/aspnet-session-state-interview.html' title='Asp.Net Session State Interview Questions'/><author><name>Shivlee Aggarwal</name><uri>http://www.blogger.com/profile/15557591804437237343</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-9088987006789845123.
