Technical Support Interview Questions
Following are some Technical Support
Interview Questions
1. Tell me about your tech support experience.
2. About how many calls did you answer on average in a day?
3. What procedures did you follow when you received a call?
4. What percentage of all calls were you able to answer without escalation?
5. How long were you prepared to work on a call before escalating it?
6. What percentage of every 8 hour shift were you either on the phone or available to take a call?
7. Would you say there was much diversity in the type of calls you received?
8. How did you like working third shift?
9. What percentage of your cases needed 2 or more calls to clear the same issue?
10. How did you deal with really upset customers?
11. How many angry customers would you refer to your supervisor in a week?
12. How do you feel about going on the road from time to time?
13. Could you deliver a training class if necessary?
14. How would you deal with a disruptive student?
15. What if he didn’t realize he was a disruptive student?
16. What sort of ramp-up time do you think you need to be fully productive?
17. What are you expecting from this job?
18. Where do you see yourself being in 2 years?
19. Do you have any questions?
Following are some Technical Support
Interview Questions
1. Tell me about your tech support experience.
2. About how many calls did you answer on average in a day?
3. What procedures did you follow when you received a call?
4. What percentage of all calls were you able to answer without escalation?
5. How long were you prepared to work on a call before escalating it?
6. What percentage of every 8 hour shift were you either on the phone or available to take a call?
7. Would you say there was much diversity in the type of calls you received?
8. How did you like working third shift?
9. What percentage of your cases needed 2 or more calls to clear the same issue?
10. How did you deal with really upset customers?
11. How many angry customers would you refer to your supervisor in a week?
12. How do you feel about going on the road from time to time?
13. Could you deliver a training class if necessary?
14. How would you deal with a disruptive student?
15. What if he didn’t realize he was a disruptive student?
16. What sort of ramp-up time do you think you need to be fully productive?
17. What are you expecting from this job?
18. Where do you see yourself being in 2 years?
19. Do you have any questions?
- How do you register a component? Expected answer: Compiling the component, running REGSVR32 MyDLL.dll
- Name and explain the different compatibility types when creating a COM component. Expected answer: No Compatibility ? New GUID created, references from other components will not workProject Compatibility ? Default for a new component
Binary Compatibility ? GUID does not change, references from other components will work - Why iss it important to use source control software for source code? Expected answer: Modification history.Code ownership: Multiple people can not modify the same code at the same time.
- What two methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful? Expected answer: SetComplete and SetAbort.
- What is the tool used to configure the port range and protocols for DCOM communications? Expected answer: DCOMCONFIG.EXE
- What does Option Explicit refer to? Expected answer: All variables must be declared before use. Their type is not required.
- What are the different ways to Declare and Instantiate an object in Visual Basic 6? Expected answer: Dim obj as OBJ.CLASS with eitherSet obj = New OBJ.CLASS orSet obj = CreateObject(?OBJ.CLASS?) orSet obj = GetObject( ,? OBJ.CLASS?)orDim obj as New OBJ.CLASS
- Name the four different cursor types in ADO and describe them briefly. Expected answer: The cursor types are listed from least to most resource intensive.Forward Only ? Fastest, can only move forward in recordset Static ? Can move to any record in the recordset. Data is static and never changes.KeySet ? Changes are detectable, records that are deleted by other users are unavailable, and records created by other users are not detectedDynamic ? All changes are visible.
- Name the four different locking type in ADO and describe them briefly. Expected answer: LockPessimistic ? Locks the row once after any edits occur.LockOptimistic ? Locks the row only when Update is called.LockBatchOptimistic ? Allows Batch Updates.LockReadOnly ? Read only. Can not alter the data.
- Describe Database Connection pooling (relative to MTS ) Expected answer: This allows MTS to reuse database connections. Database connections are put to ?sleep? as opposed to being created and destroyed and are activated upon request.
- What are the ADO objects? Explain them. Provide a scenario using three of them to return data from a database. Expected answer: Connection ? Connects to a data source; contains the Errors collectionCommand ? Executes commands to the data source. Is the only object that can accept parameters for a stored procedure.Recordset ? The set of data returned from the database.Scenario: There are many possibilities. The most likely is as follows:Dim conn As ADODB.ConnectionDim rs As ADODB.RecordsetDim Cmd As ADODB.Commandconn.ConnectionString = ?CONNECTION STRING?conn.OpenSet Cmd.ActiveConnection = connCmd.CommandText = ?SQL STATEMENT?Set rs = Cmd.ExecuteSet rs.ActiveConnection = Nothingconn.Close
- Under the ADO Command Object, what collection is responsible for input to stored procedures? Expected answer: The Parameters collection.
- What are some benefits of using MTS? Expected answer: Database Pooling, Transactional operations, Deployment, Security, Remote Execution.
- What is the benefit of wrapping database calls into MTS transactions? Expected answer: If database calls are made within the context of a transaction, aborting the transaction will undo and changes that occur within that transaction. This removes the possibility of stranded, or partial data.
- Describe and In Process vs. Out of Process component. Which is faster? Expected answer:An in-process component is implemented as a DLL, and runs in the same process space as its client app, enabling the most efficient communication between client and component.Each client app that uses the component starts a new instance of it.An out of process component is implemented as an EXE, and unlike a dll, runs in its own process space. As a result, exe’s are slower then dll’s because communications between client and component must be marshalled across process boundaries. A single instance of an out of process component can service many clients.
- What are the main components of the ADO object model? How are they used? Expected answer:Connection: Used to make a connection between your app and an external data source, ie, sql server.Command: Used to build queries, including user-specific parameters, to access records from a data source (which are returned in a Recordset)Recordset:Used to access records returned from an SQL query. With a recordset, you can navigate returned records. You can also add, modify or delete records.
- What are kernel objects? - – Several types of kernel objects, such as access token objects, event objects, file objects, file-mapping objects, I/O completion port objects, job objects, mailslot objects, mutex objects, pipe objects, process objects, semaphore objects, thread objects, and waitable timer objects.
- What is a kernel object? – Each kernel object is simply a memory block allocated by the kernel and is accessible only by the kernel. This memory block is a data structure whose members maintain information about the object. Some members (security descriptor, usage count, and so on) are the same across all object types, but most are specific to a particular object type. For example, a process object has a process ID, a base priority, and an exit code, whereas a file object has a byte offset, a sharing mode, and an open mode.
- User can access these kernel objects structures? – Kernel object data structures are accessible only by the kernel
- If we cannot alter these Kernel Object structures directly, how do our applications manipulate these kernel objects? – The answer is that Windows offers a set of functions that manipulate these structures in well-defined ways. These kernel objects are always accessible via these functions. When you call a function that creates a kernel object, the function returns a handle that identifies the object.
- How owns the Kernel Object? – Kernel objects are owned by the kernel, not by a process
- How does the kernel object outlive the process that created it? – If your process calls a function that creates a kernel object and then your process terminates, the kernel object is not necessarily destroyed. Under most circumstances, the object will be destroyed; but if another process is using the kernel object your process created, the kernel knows not to destroy the object until the other process has stopped using it
- Which is the data member common to all the kernel object and what is the use of it? -
- How to identify the difference between the kernel object and user object? -
- What is the purpose of Process Handle Table? -
- Name few functions that create Kernel Objects? – HANDLE CreateThread(…),HANDLE CreateFile(..),HANDLE CreateFileMapping(..)HANDLE CreateSemaphore(..)etcAll functions that create kernel objects return process-relative handles that can be used successfully by any and all threads that are running in the same process.
- What is handle? – Handle value is actually the index into the process’s handle table that identifies where the kernel object’s information is stored.
- How the handle helps in manipulating the kernel objects? – Whenever you call a function that accepts a kernel object handle as an argument, you pass the value returned by one of the Create* functions. Internally, the function looks in your process’s handle table to get the address of the kernel object you want to manipulate and then manipulates the object’s data structure in a well-defined fashion.
- What happens when the CloseHandle(handle) is called? – This function first checks the calling process’s handle table to ensure that the index (handle) passed to it identifies an object that the process does in fact have access to. If the index is valid, the system gets the address of the kernel object’s data structure and decrements the usage count member in the structure; if the count is zero, the kernel destroys the kernel object from memory.
- You forget to call CloseHandle – will there be a memory leak? – Well, yes and no. It is possible for a process to leak resources (such as kernel objects) while the process runs. However, when the process terminates, the operating system ensures that any and all resources used by the process are freed—this is guaranteed. For kernel objects, the system performs the following actions: When your process terminates, the system automatically scans the process’s handle table. If the table has any valid entries (objects that you didn’t close before terminating), the system closes these object handles for you. If the usage count of any of these objects goes to zero, the kernel destroys the object.
- What is the need of process relative handles? – The most important reason was robustness. If kernel object handles were system-wide values, one process could easily obtain the handle to an object that another process was using and wreak havoc on that process. Another reason for process-relative handles is security. Kernel objects are protected with security, and a process must request permission to manipulate an object before attempting to manipulate it. The creator of the object can prevent an unauthorized user from touching the object simply by denying access to it
- How the handles are handled in the child process? – The operating system creates the new child process but does not allow the child process to begin executing its code right away. Of course, the system creates a new, empty process handle table for the child process—just as it would for any new process. But because you passed TRUE to CreateProcess’s bInheritHandles parameter, the system does one more thing: it walks the parent process’s handle table, and for each entry it finds that contains a valid inheritable handle, the system copies the entry exactly into the child process’s handle table. The entry is copied to the exact same position in the child process’s handle table as in the parent’s handle table.
- Why the entries in the parent process table and child table are same? – It means that the handle value that identifies a kernel object is identical in both the parent and the child processes.
- What about the usage count in the parent child process tables? – The system increments the usage count of the kernel object because two processes are now using the object. For the kernel object to be destroyed, both the parent process and the child process must either call CloseHandle on the object or terminate.
- What are Named Objects? – Method available for sharing kernel objects across process boundaries is to name the objects. Below are the kernel named objects 1) mutex, 2) Events, 3) semaphore, 4) waitableTimers, 5)file mapping, 6)job object. There are APIs to create these objects with last parameter as the object name.
- What do you mean by unnamed object? – When you are creating the kernel objects with the help of API’s like CreateMutex(, , , ,pzname). And the Pzname parameter is NULL , you are indicating to the system that you want to create an unnamed (anonymous) kernel object. When you create an unnamed object, you can share the object across processes by using either inheritance or DuplicateHandle
- What is DuplicateHandle (API)? – Takes an entry in one process’s handle table and makes a copy of the entry into another process’s handle table
- What is a thread? – A thread describes a path of execution within a process. Every time a process is initialized, the system creates a primary thread. This thread begins executing with the C/C++ run-time library’s startup code, which in turn calls your entry-point function ( main , Wmain , WinMain , or WWinMain ) and continues executing until the entry-point function returns and the C/C++ run-time library’s startup code calls ExitProcess
- What is the limit on per process for creating a thread? – The number of threads a process can create is limited by the available virtual memory and depends on the default stack size
- What is Synchronization Objects? – Synchronization object s are use to co-ordinate the execution of multiple threads.
- Which kernel objects are use for Thread Synchronization on different processes? – Event, Mutex, Semaphore
- What is Event Object and why it is used? – Event is the thread synchronization object to set signaled state or non-signaled state.
- What is signaled and non signaled state? – An event is in signaled state means that it has the capacity to release the threads waiting for this event to be signaled. An event is in non signaled state means that it will not release any thread that is waiting for this particular event.example in our project: when user clicks the image application icon double simultaneously. Two image application windows were created. so PAIG created an event and set it to non-signaled state. Then the image application will reset the event to signaled state, after this all the threads are released.
- APIs for creating event and set and reset the events – CreateEvent-to create the event OpenEvent – to open already created event SetEvent – to set the event signaled stateRestEvent – To set the Event To non-Signaled State
- What is Mutex Object and why it is used? – A mutex object is a synchronization object whose state is set to signaled when it is not owned by any thread, and non-signaled when it is owned. For example, to prevent two threads from writing to shared memory at the same time, each thread waits for ownership of a mutex object before executing the code that accesses the memory. After writing to the shared memory, the thread releases the mutex object.
- How do I create a Mutex? – A thread uses the CreateMutex function to create a mutex object. The creating thread can request immediate ownership of the mutex object and can also specify a name for the mutex object
- How do other threads own the mutex? – Threads in other processes can open a handle to an existing named mutex object by specifying its name in a call to theOpenMutex – function. Any thread with a handle to a mutex object can use one of the wait functions to request ownership of the mutex object. If the mutex object is owned by another thread, the wait function blocks the requesting thread until the owning thread releases the mutex object using theReleaseMutex – function.
- What is semaphores and why it is used? – A semaphore object is a synchronization object that maintains a count between zero and a specified maximum value. The count is decremented each time a thread completes a wait for the semaphore object and incremented each time a thread releases the semaphore. When the count reaches zero, no more threads can successfully wait for the semaphore object state to become signaled. The state of a semaphore is set to signaled when its count is greater than zero, and non-signaled when its count is zero. The semaphore object is useful in controlling a shared resource that can support a limited number of users. It acts as a gate that limits the number of threads sharing the resource to a specified maximum number. For example, an application might place a limit on the number of windows that it creates. It uses a semaphore with a maximum count equal to the window limit, decrementing the count whenever a window is created and incrementing it whenever a window is closed. The application specifies the semaphore object in call to one of the wait functions before each window is created. When the count is zero – indicating that the window limit has been reached – the wait function blocks execution of the window-creation code.
- What are the Features & Benefits of Quick Test Pro (QTP 8.0)? – Operates stand-alone, or integrated into Mercury Business Process Testing and Mercury Quality Center. Introduces next-generation zero-configuration Keyword Driven testing technology in Quick Test Professional 8.0 allowing for fast test creation, easier maintenance, and more powerful data-driving capability. Identifies objects with Unique Smart Object Recognition, even if they change from build to build, enabling reliable unattended script execution. Collapses test documentation and test creation to a single step with Auto-documentation technology. Enables thorough validation of applications through a full complement of checkpoints.
- How to handle the exceptions using recovery scenario manager in QTP? – There are 4 trigger events during which a recovery scenario should be activated. A pop up window appears in an opened application during the test run: A property of an object changes its state or value, A step in the test does not run successfully, An open application fails during the test run, These triggers are considered as exceptions.You can instruct QTP to recover unexpected events or errors that occurred in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps: 1. Triggered Events 2. Recovery steps 3. Post Recovery Test-Run
- What is the use of Text output value in QTP? – Output values enable to view the values that the application talks during run time. When parameterized, the values change for each iteration. Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.
- How to use the Object spy in QTP 8.0 version? – There are two ways to Spy the objects in QTP: 1) Thru file toolbar, In the File Toolbar click on the last toolbar button (an icon showing a person with hat). 2) True Object repository Dialog, In Object repository dialog click on the button object spy. In the Object spy Dialog click on the button showing hand symbol. The pointer now changes in to a hand symbol and we have to point out the object to spy the state of the object if at all the object is not visible. or window is minimized then, hold the Ctrl button and activate the required window to and release the Ctrl button.
- How Does Run time data (Parameterization) is handled in QTP? – You can then enter test data into the Data Table, an integrated spreadsheet with the full functionality of Excel, to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files.
- What is keyword view and Expert view in QTP? – Quick Testâۉ„¢s Keyword Driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View. Advanced testers can view and edit their tests in the Expert View, which reveals the underlying industry-standard VBScript that Quick Test Professional automatically generates. Any changes made in the Expert View are automatically synchronized with the Keyword View.
- Explain about the Test Fusion Report of QTP? – Once a tester has run a test, a Test Fusion report displays all aspects of the test run: a high-level results overview, an expandable Tree View of the test specifying exactly where application failures occurred, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explanations of each checkpoint pass and failure. By combining Test Fusion reports with Quick Test Professional, you can share reports across an entire QA and development team.
- Which environments does QTP support? – Quick Test Professional supports functional testing of all enterprise environments, including Windows, Web,..NET, Java/J2EE, SAP, Siebel, Oracle, PeopleSoft, Visual Basic, ActiveX, mainframe terminal emulators, and Web services.
- What is QTP? – Quick Test is a graphical interface record-playback automation tool. It is able to work with any web, java or windows client application. Quick Test enables you to test standard web objects and ActiveX controls. In addition to these environments, Quick Test Professional also enables you to test Java applets and applications and multimedia objects on Applications as well as standard Windows applications, Visual Basic 6 applications and.NET framework applications
- Explain QTP Testing process? – Quick Test testing process consists of 6 main phases:
- Create your test plan – Prior to automating there should be a detailed description of the test including the exact steps to follow, data to be input, and all items to be verified by the test. The verification information should include both data validations and existence or state verifications of objects in the application.
- Recording a session on your application – As you navigate through your application, Quick Test graphically displays each step you perform in the form of a collapsible icon-based test tree. A step is any user action that causes or makes a change in your site, such as clicking a link or image, or entering data in a form.
- Enhancing your test – Inserting checkpoints into your test lets you search for a specific value of a page, object or text string, which helps you identify whether or not your application is functioning correctly. NOTE: Checkpoints can be added to a test as you record it or after the fact via the Active Screen. It is much easier and faster to add the checkpoints during the recording process. Broadening the scope of your test by replacing fixed values with parameters lets you check how your application performs the same operations with multiple sets of data. Adding logic and conditional statements to your test enables you to add sophisticated checks to your test.
- Debugging your test – If changes were made to the script, you need to debug it to check that it operates smoothly and without interruption.
- Running your test on a new version of your application – You run a test to check the behavior of your application. While running, Quick Test connects to your application and performs each step in your test.
- Analyzing the test results – You examine the test results to pinpoint defects in your application.
- Reporting defects – As you encounter failures in the application when analyzing test results, you will create defect reports in Defect Reporting Tool.
- Explain the QTP Tool interface. – It contains the following key elements: Title bar, displaying the name of the currently open test, Menu bar, displaying menus of Quick Test commands, File toolbar, containing buttons to assist you in managing tests, Test toolbar, containing buttons used while creating and maintaining tests, Debug toolbar, containing buttons used while debugging tests. Note: The Debug toolbar is not displayed when you open Quick Test for the first time. You can display the Debug toolbar by choosing View — Toolbars — Debug. Action toolbar, containing buttons and a list of actions, enabling you to view the details of an individual action or the entire test flow. Note: The Action toolbar is not displayed when you open Quick Test for the first time. You can display the Action toolbar by choosing View — Toolbars — Action. If you insert a reusable or external action in a test, the Action toolbar is displayed automatically. Test pane, containing two tabs to view your test-the Tree View and the Expert View ,Test Details pane, containing the Active Screen. Data Table, containing two tabs, Global and Action, to assist you in parameterizing your test. Debug Viewer pane, containing three tabs to assist you in debugging your test-Watch Expressions, Variables, and Command. (The Debug Viewer pane can be opened only when a test run pauses at a breakpoint.) Status bar, displaying the status of the test
- How does QTP recognize Objects in AUT? – Quick Test stores the definitions for application objects in a file called the Object Repository. As you record your test, Quick Test will add an entry for each item you interact with. Each Object Repository entry will be identified by a logical name (determined automatically by Quick Test), and will contain a set of properties (type, name, etc) that uniquely identify each object. Each line in the Quick Test script will contain a reference to the object that you interacted with, a call to the appropriate method (set, click, check) and any parameters for that method (such as the value for a call to the set method). The references to objects in the script will all be identified by the logical name, rather than any physical, descriptive properties.
- What are the types of Object Repositories in QTP? – Quick Test has two types of object repositories for storing object information: shared object repositories and action object repositories. You can choose which type of object repository you want to use as the default type for new tests, and you can change the default as necessary for each new test. The object repository per-action mode is the default setting. In this mode, Quick Test automatically creates an object repository file for each action in your test so that you can create and run tests without creating, choosing, or modifying object repository files. However, if you do modify values in an action object repository, your changes do not have any effect on other actions. Therefore, if the same test object exists in more than one action and you modify an objectâۉ„¢s property values in one action, you may need to make the same change in every action (and any test) containing the object.
- Explain the check points in QTP? – A checkpoint verifies that expected information is displayed in an Application while the test is running. You can add eight types of checkpoints to your test for standard web objects using QTP. A page checkpoint checks the characteristics of an Application. A text checkpoint checks that a text string is displayed in the appropriate place on an Application. An object checkpoint (Standard) checks the values of an object on an Application. An image checkpoint checks the values of an image on an Application. A table checkpoint checks information within a table on a Application. An Accessibilityy checkpoint checks the web page for Section 508 compliance. An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application. A database checkpoint checks the contents of databases accessed by your web site
- In how many ways we can add check points to an application using QTP? – We can add checkpoints while recording the application or we can add after recording is completed using Active screen (Note : To perform the second one The Active screen must be enabled while recording).
- How does QTP identify objects in the application? – QTP identifies the object in the application by Logical Name and Class.
- What is Parameterizing Tests? – When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data. Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.
- What is test object model in QTP? – The test object model is a large set of object types or classes that Quick Test uses to represent the objects in your application. Each test object class has a list of properties that can uniquely identify objects of that class and a set of relevant methods that Quick Test can record for it. A test object is an object that Quick Test creates in the test or component to represent the actual object in your application. Quick Test stores information about the object that will help it identify and check the object during the run session.
- What is Object Spy in QTP? – Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected objectâۉ„¢s hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box.
- What is the Diff between Image check-point and Bit map Check point? – Image checkpoints enable you to check the properties of a Web image. You can check an area of a Web page or application as a bitmap. While creating a test or component, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. Quick Test captures the specified object as a bitmap, and inserts a checkpoint in the test or component. You can also choose to save only the selected area of the object with your test or component in order to save disk Space. For example, suppose you have a Web site that can display a map of a city the user specifies. The map has control keys for zooming. You can record the new map that is displayed after one click on the control key that zooms in the map. Using the bitmap checkpoint, you can check that the map zooms in correctly. You can create bitmap checkpoints for all supported testing environments (as long as the appropriate add-ins are loaded). Note: The results of bitmap checkpoints may be affected by factors such as operating system, screen resolution, and color settings.
- How many ways we can parameterize data in QTP? – There are four types of parameters: Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test. Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, Quick Test uses a different value from the Data Table. Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that Quick Test generates for you based on conditions and options you choose. Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application handles small and large ticket orders, you can have Quick Test generate a random number and insert it in a number of tickets edit field.
- How do u do batch testing in WR & is it possible to do in QTP, if so explain? – Batch Testing in WR is nothing but running the whole test set by selecting Run Test set from the Execution Grid. The same is possible with QTP also. If our test cases are automated then by selecting Run Test set all the test scripts can be executed. In this process the Scripts get executed one by one by keeping all the remaining scripts in Waiting mode.
- If I give some thousand tests to execute in 2 days what do u do? – Adhoc testing is done. It Covers the least basic functionalities to verify that the system is working fine.
- What does it mean when a check point is in red color? what do u do? – A red color indicates failure. Here we analyze the cause for failure whether it is a Script Issue or Environment Issue or a Application issue.
- What is Object Spy in QTP? – Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected objectâۉ„¢s hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box.
- What is the file extension of the code file & object repository file in QTP? – Code file extension is.vbs and object repository is.tsr
- Explain the concept of object repository & how QTP recognizes objects? – Object Repository: displays a tree of all objects in the current component or in the current action or entire test (depending on the object repository mode you selected). We can view or modify the test object description of any test object in the repository or to add new objects to the repository. Quicktest learns the default property values and determines in which test object class it fits. If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description. If no assistive properties are available, then it adds a special Ordinal identifier such as objects location on the page or in the source code.
- What are the properties you would use for identifying a browser & page when using descriptive programming? – Name would be another property apart from title that we can use.
- Give me an example where you have used a COM interface in your QTP project? – com interface appears in the scenario of front end and back end. for eg:if you r using oracle as back end and front end as VB or any language then for better compatibility we will go for an interface. of which COM will be one among those interfaces. Create object creates handle to the instance of the specified object so that we program can use the methods on the specified object. It is used for implementing Automation(as defined by Microsoft).
- Explain in brief about the QTP Automation Object Model. – Essentially all configuration and run functionality provided via the Quick Test interface is in some way represented in the Quick Test automation object model via objects, methods, and properties. Although a one-on-one comparison cannot always be made, most dialog boxes in Quick Test have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods. You can use the objects, methods, and properties exposed by the Quick Test automation object model, along with standard programming elements such as loops and conditional statements to design your program.
Most frequently asked Interview Questions
Why have you selected to join us?
I always longed to work with a company. I am familiar and whose products I have used and trusted.
(Narrate briefly how you can prove your statement. Do good research on the company before facing the interview)
Where do you want to be in 5 years?
I would like to be frank. Judge me from the work and I am sure you will put me right where I want to be.
Note : Do not over ambitious and speak in a way that you are not satisfied with your current job which you have applied for.
Describe your ideal career?
Talk of what you enjoy most your skills and natural talents. Do not specify your goal and any job title.
Tell me something about yourself
Do not just repeat what you have given in your resume. Be ready with the answer, a talent or something you did out of the ordinary. You can sound it as unique or give it a touch of your personality.
How did you apply for the job?
Be specific and give a straight answer of how you came to know about the vacancy. If it was advertised specify how you came across it.
Why do you want to work here?
Have a research done about the company / organization
Give just one or two reasons why you are interested. You can add these points (1) company’s reputation(2) desire to join the specific field of interest.
Don’t you think that you are over qualified for this job?
(This question is put to you to puzzle a candidate. Be calm and answer the question with a positive and confident approach)
Answer in the negative
My experience and qualification will just help me to do the job better. Moreover I am at establishing a long term relationship which my qualification will favor me to handle more responsibilities and help me to rise to your expectations.
What competition do you see if you take up this job?
When you answer, clearly show that you have researched carefully and acquired more in-depth knowledge about the company.
Enumerate some positive and negative traits of the company and their competitions.
Feel confident to show that competition is not an unexpected one.
What would you do if our competitor offer you a job?
Show your confidence in the company’s worth, stress the point ‘I would say No’ by pointing out some qualities you found out in your research about the company.
Why are you leaving your current job?
You should give two or three reasons for leaving.
Lack of challenge, focus on the limitations etc. Point out your ambition to prove your worth confidently.
What salary do you expect?
(This is a tricky question to be answered carefully. Interviewers often accept people with realistic financial goals.)
If you mention a salary that is low it shows that you are not up to the mark. If you mention too high you have ruined a chance to get a job. So the best is to ask for the salary they offer and then show your capacity, how your experience and qualification rate with what is offered.
What interests you most about the job?
(Show how you believe that you are most suited to the post. If you can find out an earlier experience it would be fine.)
If you have experience, you can quote some similarities from the past and how you achieved success.
What is your dream job?
Make the question a chance to display your aptitude that fits the job you have applied for. Display how your skills can be put into suite the challenges and modern trends.
Why should we take you?
This is often the concluding Question( Some tips to the answer)
Don’ts : Do not repeat your resume
Do not enumerate your experience
Do’s: Prove Your interest
Be positive in your answer
Be prepared with confidence in what you are going to say
Make sure the answer comes from the bottom of your heart.
If you have unlimited time and financial resources how would you spend them
Even though it is tempting to discuss thing you would do for fun, answer these questions with strict coherence with the job you have applied for.
Egg: If you are into teaching, touch on your interest in adult literary programmers and other teaching oriented aspects.
How is your experience relevant to this job?
Sketch out some similar work which you have done in your previous job. It should be something justifiable by you, even though others may think differently.
You can even ask some question where you can prove that your experience stands in good strand.
How could you enrich your current job?
Design your answer to show that you are still interested in the job and you point out a few instances where improvements can be made. Convince the person that you can be relied on and you will not get bored with what you do with time.
How many days where you absent from work?
Give a solid attendance record. But at the same time show you were not responsible . Convince that you are willing to take up responsibility.
Egg: I was absent 7 days. 4 days due to conjunctivitis and one day due to the death of a close relative and 2 days had to accompany my parents for their check up.
Tell me about a time you had to deal with an irritate customer, how did you handle the solution?
The question is aimed at you to hear from yourself how you handle people when others loose their temper. Here the best answer you can give to describe a situation and show how you handled it with maturity and diplomacy.
How do you manage stress in your daily work?
You can describe a situation of how you had managed stress in your previous work if you had one or narrate how you can find time in your busy schedule to relax a bit.
Describe a professional skill you have developed in you?
It will be better if you be specific with your answer. Narrate some thing you worked for to fulfill your work more efficiently. Describe how you attended a seminar and brought about the changed in your work.
How do you manage your work to meet dead lines
Answer the question effectively . Describe in detail how your plan out, set priorities, determine schedules, how you follow out to see the progress and meet the dead line.
What books you read?
Do not ever say you have read a book which you have not. Here your suggestion can lead the interviewer to know your taste and interest. It can also hint on how you take your profession.
What are the most rewarding aspect of you most recent job?
The best way to answer it is to focus in what you do efficiently, keep in mind the position you are applying for.
What aspects of this job do you feel most confident?
Narrate what you are good and match it with the present job requirements. You may ask questions to clear if that particular skill will add benefit to the company
What can motivate you?
The Interview expects an answer to know you better .Keep in tune with your job and work you have applied for. Do not beat around the bush.
Whom do you choose as your reference and why?
Name the references and how you know them. You can also show that you are a person who care for relationships and how you stand in good stead with them.
Can we call all your references?
If you have given your present boss as your reference you can tell that you prefer to call your current boss only after you receive a confirmed offer as he may not like you changing the job.
Do you have any questions?
Be prepared to answer this question in advance. List out a few questions you wish to know more about. After you have faced the interview your logic will guide you to ask the question you really want to know more about.
How do you handle criticism
Here the interview is on the look out for your accountability and professional character.
Simply explain a situation that caused a problem and narrate how you faced it and overcame it.
Tell me about a situation that upset you at work
Her the interview is trying to find out how you deal with pressure. Be diplomatic and objective with your answer. Prepare the answer so that the answer comes as a smooth reassurance
Have you ever been fired?
If the answer is negative, the answer is simple. But if you have been fired, you need to be prepared to the answer the follow up questions that my come up.
If the termination was for reason beyond your control narrate it. If not do not try justifying yourself. If you had a fault, admit it and convince the interview that you have corrected it.
Do you change your job frequently?
Be honest and if you had changed the jobs frequently there could be ample reasons to do so. Put them up as contracts that expired at the stipulated time.
Be convincing when you say that you long to have a steady and long lasting relationship with the present job you are applying for.
What is the toughest job you had?
Avoid making any negative statements especially about your previous employer. Change the question with a positive outlook and answer it with a satisfied remark of your outcome.
How do you handle tension?
Answer with ease that in any job and any situation that tension is a part of it. Relax before putting the f act you are very used to such type of works.
What is your current salary?
Do not bluff. Be specific on the answer. Do not hesitate to say the benefits you enjoyed in the previous job. It may be verified so never mention the benefits you have not got.
Will you be willing to accept transfer?
Tell you preference but do not specify that you will be not willing to work else where.
What is your weakness?
Turn the question to a positive one. Simply say that you are a perfectionist and your commitment to output of high quality perfect work. Say this is your weakness
Why have you selected to join us?
I always longed to work with a company. I am familiar and whose products I have used and trusted.
(Narrate briefly how you can prove your statement. Do good research on the company before facing the interview)
Where do you want to be in 5 years?
I would like to be frank. Judge me from the work and I am sure you will put me right where I want to be.
Note : Do not over ambitious and speak in a way that you are not satisfied with your current job which you have applied for.
Describe your ideal career?
Talk of what you enjoy most your skills and natural talents. Do not specify your goal and any job title.
Tell me something about yourself
Do not just repeat what you have given in your resume. Be ready with the answer, a talent or something you did out of the ordinary. You can sound it as unique or give it a touch of your personality.
How did you apply for the job?
Be specific and give a straight answer of how you came to know about the vacancy. If it was advertised specify how you came across it.
Why do you want to work here?
Have a research done about the company / organization
Give just one or two reasons why you are interested. You can add these points (1) company’s reputation(2) desire to join the specific field of interest.
Don’t you think that you are over qualified for this job?
(This question is put to you to puzzle a candidate. Be calm and answer the question with a positive and confident approach)
Answer in the negative
My experience and qualification will just help me to do the job better. Moreover I am at establishing a long term relationship which my qualification will favor me to handle more responsibilities and help me to rise to your expectations.
What competition do you see if you take up this job?
When you answer, clearly show that you have researched carefully and acquired more in-depth knowledge about the company.
Enumerate some positive and negative traits of the company and their competitions.
Feel confident to show that competition is not an unexpected one.
What would you do if our competitor offer you a job?
Show your confidence in the company’s worth, stress the point ‘I would say No’ by pointing out some qualities you found out in your research about the company.
Why are you leaving your current job?
You should give two or three reasons for leaving.
Lack of challenge, focus on the limitations etc. Point out your ambition to prove your worth confidently.
What salary do you expect?
(This is a tricky question to be answered carefully. Interviewers often accept people with realistic financial goals.)
If you mention a salary that is low it shows that you are not up to the mark. If you mention too high you have ruined a chance to get a job. So the best is to ask for the salary they offer and then show your capacity, how your experience and qualification rate with what is offered.
What interests you most about the job?
(Show how you believe that you are most suited to the post. If you can find out an earlier experience it would be fine.)
If you have experience, you can quote some similarities from the past and how you achieved success.
What is your dream job?
Make the question a chance to display your aptitude that fits the job you have applied for. Display how your skills can be put into suite the challenges and modern trends.
Why should we take you?
This is often the concluding Question( Some tips to the answer)
Don’ts : Do not repeat your resume
Do not enumerate your experience
Do’s: Prove Your interest
Be positive in your answer
Be prepared with confidence in what you are going to say
Make sure the answer comes from the bottom of your heart.
If you have unlimited time and financial resources how would you spend them
Even though it is tempting to discuss thing you would do for fun, answer these questions with strict coherence with the job you have applied for.
Egg: If you are into teaching, touch on your interest in adult literary programmers and other teaching oriented aspects.
How is your experience relevant to this job?
Sketch out some similar work which you have done in your previous job. It should be something justifiable by you, even though others may think differently.
You can even ask some question where you can prove that your experience stands in good strand.
How could you enrich your current job?
Design your answer to show that you are still interested in the job and you point out a few instances where improvements can be made. Convince the person that you can be relied on and you will not get bored with what you do with time.
How many days where you absent from work?
Give a solid attendance record. But at the same time show you were not responsible . Convince that you are willing to take up responsibility.
Egg: I was absent 7 days. 4 days due to conjunctivitis and one day due to the death of a close relative and 2 days had to accompany my parents for their check up.
Tell me about a time you had to deal with an irritate customer, how did you handle the solution?
The question is aimed at you to hear from yourself how you handle people when others loose their temper. Here the best answer you can give to describe a situation and show how you handled it with maturity and diplomacy.
How do you manage stress in your daily work?
You can describe a situation of how you had managed stress in your previous work if you had one or narrate how you can find time in your busy schedule to relax a bit.
Describe a professional skill you have developed in you?
It will be better if you be specific with your answer. Narrate some thing you worked for to fulfill your work more efficiently. Describe how you attended a seminar and brought about the changed in your work.
How do you manage your work to meet dead lines
Answer the question effectively . Describe in detail how your plan out, set priorities, determine schedules, how you follow out to see the progress and meet the dead line.
What books you read?
Do not ever say you have read a book which you have not. Here your suggestion can lead the interviewer to know your taste and interest. It can also hint on how you take your profession.
What are the most rewarding aspect of you most recent job?
The best way to answer it is to focus in what you do efficiently, keep in mind the position you are applying for.
What aspects of this job do you feel most confident?
Narrate what you are good and match it with the present job requirements. You may ask questions to clear if that particular skill will add benefit to the company
What can motivate you?
The Interview expects an answer to know you better .Keep in tune with your job and work you have applied for. Do not beat around the bush.
Whom do you choose as your reference and why?
Name the references and how you know them. You can also show that you are a person who care for relationships and how you stand in good stead with them.
Can we call all your references?
If you have given your present boss as your reference you can tell that you prefer to call your current boss only after you receive a confirmed offer as he may not like you changing the job.
Do you have any questions?
Be prepared to answer this question in advance. List out a few questions you wish to know more about. After you have faced the interview your logic will guide you to ask the question you really want to know more about.
How do you handle criticism
Here the interview is on the look out for your accountability and professional character.
Simply explain a situation that caused a problem and narrate how you faced it and overcame it.
Tell me about a situation that upset you at work
Her the interview is trying to find out how you deal with pressure. Be diplomatic and objective with your answer. Prepare the answer so that the answer comes as a smooth reassurance
Have you ever been fired?
If the answer is negative, the answer is simple. But if you have been fired, you need to be prepared to the answer the follow up questions that my come up.
If the termination was for reason beyond your control narrate it. If not do not try justifying yourself. If you had a fault, admit it and convince the interview that you have corrected it.
Do you change your job frequently?
Be honest and if you had changed the jobs frequently there could be ample reasons to do so. Put them up as contracts that expired at the stipulated time.
Be convincing when you say that you long to have a steady and long lasting relationship with the present job you are applying for.
What is the toughest job you had?
Avoid making any negative statements especially about your previous employer. Change the question with a positive outlook and answer it with a satisfied remark of your outcome.
How do you handle tension?
Answer with ease that in any job and any situation that tension is a part of it. Relax before putting the f act you are very used to such type of works.
What is your current salary?
Do not bluff. Be specific on the answer. Do not hesitate to say the benefits you enjoyed in the previous job. It may be verified so never mention the benefits you have not got.
Will you be willing to accept transfer?
Tell you preference but do not specify that you will be not willing to work else where.
What is your weakness?
Turn the question to a positive one. Simply say that you are a perfectionist and your commitment to output of high quality perfect work. Say this is your weakness
1. Why so JavaScript and Java have similar name?
A. JavaScript is a stripped-down version of Java
B. JavaScript’s syntax is loosely based on Java’s
C. They both originated on the island of Java
D. None of the above
2. When a user views a page containing a JavaScript program, which machine actually executes the script?
A. The User’s machine running a Web browser
B. The Web server
C. A central machine deep within Netscape’s corporate offices
D. None of the above
3. ______ JavaScript is also called client-side JavaScript.
A. Microsoft
B. Navigator
C. LiveWire
D. Native
4. __________ JavaScript is also called server-side JavaScript.
A. Microsoft
B. Navigator
C. LiveWire
D. Native
5. What are variables used for in JavaScript Programs?
A. Storing numbers, dates, or other values
B. Varying randomly
C. Causing high-school algebra flashbacks
D. None of the above
6. _____ JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation.
A. Client-side
B. Server-side
C. Local
D. Native
7. What should appear at the very end of your JavaScript?
The
B. The
D.
16. Inside which HTML element do we put the JavaScript?
A.
B.
C.
Tell me something about yourself? This is the most common and very first question usually asked in any interview. When you answer this question you usually have to tell about the following:
The interviewer is asking this question to find out how can your skills and experience be a value add for the job you are being interviewed for.
Answers that would get the interviewer’s attention:
Look at the job description. Find out requirements of the job? Make a list of these requirements. List your skills and think of two or three key qualities you have to offer that match each requirement that the employer is seeking.
Other ways of asking the same question:
What ever may be the reason why you left your present job, don’t speak badly about your previous employer. The interviewer may think, you will you will talk bad about his company next time you’re looking for another job.
Reasons why you might have left your job:
So do not say anything like:
So do not say anything like:
Every organisation has a career path and we have to spend the required time at each level, learn the stuff what it takes to get it to the next level and move on. Hence set your expectations realistic.
How did you handle your most challenging experience in your previous job? Think of a stressfull thing that happened at your last job. Then write a short description of what it was and what you did. Did you work to resolve the problem? Did you remove yourself from the problem and let other handle it? Stuff like that. Just a short explaination of what happened.
This is more related to problem solving., first, think of a problem you had in you work and what is the action/ solution you have taken to resolve. It is always better to explain the point in logical order with a good example.
When answering a question like this, you should always try and remember two things:
If you are a fresher with no work experience or does not have any challenging experience, talk to your seniors or people who has experience. They may give you some examples.
- · Educational Qualifications: When you talk about educational qualifications, don’t talk about percentages unless they are very good. If you have made any achievements like topping college academics or secured a gold medal make sure you tell about it.
- Family Background: Donot spend too much of time here. Let the interviewer know your father’s and mother’s profession and how many siblings you have.
- Hobbies/Interests: This is very important section and be prepared for follow up questions. If you say my hobby is reading books. Interviewer might ask a followup question like, what type of books you usually read. If you say I read fiction books. The interviewer might ask you, Who is your favourite author. So be very careful when you are making up hobbies. It is better if your hobbies add value for the type of job you are doing. For example if you are going for a software engineer
- Strengths: Tell interviewer about your strengths with example. Examples of strengths are listed below. Make sure you back up each strength with an example from your past experience.
- Weakness: When ever you say you have a weakness, make sure you also have a plan and working on it to over come your weakness.
- Hard Working in nature.
- Dedication.
- Commitment.
- Good Team player.
- Communication Skills
- Problem solving skills
- Taking Initiatives
- Beging Pro-active
- Design Skills
- Too invloved : Some times when there is a technical issue or a problem I tend to work continuously until I fix it without having a break. But what I have noticed and am trying to practice is that taking a break away from the problem and thinking outside the square or taking suggestions will assist you in identifying the root cause of the problem sooner.
- Over confident : Very rarely I become over confident, especially when a simple task is given, I get to solving the issue without spending much time planning. So I am working on applying the 80/20 principle of planning and implementation. Spend 80% of my effort and time in planning and 20% on implementation.
The interviewer is asking this question to find out how can your skills and experience be a value add for the job you are being interviewed for.
Answers that would get the interviewer’s attention:
- I have three years of experience in this technology and my skills enables me to develop better products in less time
- I have what it takes to fill the requirements of this job – solve customer problems using my excellent customer service skills.
- I have the experience and expertise in the area of customer support that is required in this position.
Look at the job description. Find out requirements of the job? Make a list of these requirements. List your skills and think of two or three key qualities you have to offer that match each requirement that the employer is seeking.
Other ways of asking the same question:
- What can you bring to this position?
- What can you bring to the table if selected?
- Why do you think you are qualified for this job?
What ever may be the reason why you left your present job, don’t speak badly about your previous employer. The interviewer may think, you will you will talk bad about his company next time you’re looking for another job.
Reasons why you might have left your job:
- They didn’t pay you enough.
- Odd shift timings.
- You did not like the management.
- This new job offer pays much more than what you are getting now.
- You are fired for poor performance or bad code of conduct.
- My organisation is very small and I have already spent 3 years and as there is no scope for growth with my current employer and I’m ready to move on to a new challenge.
- I’m looking for a bigger challenge and to grow my career and I couldn’t job hunt part time while working. It didn’t seem ethical to use my former employer’s time.
- I’m relocating to this area due to family circumstances and left my previous position in order to make the move.
- I am interested in a new challenge and an opportunity to use my technical skills and experience in a different capacity than I have in the past.
- I was looking for a position like this which is an excellent match for my skills and experience and I am not able to fully utilize them in my present job as there is very limited scope for growth.
- Why are you leaving your job?
- Why did you leave your job?
- What made you leave your current job?
So do not say anything like:
- You dislike overtime.
- You dislike management.
- You dislike your immediate manager or co-workers.
- You dislike deadlines.
- You like challenges.
- Opportunity to grow into design, architecture, performance tuning etc
- Opportunity to learn and/or mentor junior developers
- You dislike frustrating situations like identifying a memory leak problem or a complex transactional or a concurrency issue. You want to get on top of it as soon as possible.
So do not say anything like:
- I dislike stress and cannot perform well under pressure. All organisations work with deadlines and at times there will be a crucial need to work under pressure. This is the reason why most interviewer’s ask this question.
- First, I understand why there is a need to complete the given task at hand with in so less time and react to situations, rather than to stress. That way, the situation is handled and doesn’t become stressful.
- I actually work better under pressure and I’ve found that I enjoy working in a challenging environment.
- Prioritizing my responsibilities so I have a clear idea of what needs to be done when, has helped me effectively manage pressure on the job.
- If the people I am managing are contributing to my stress level, I discuss options for better handling difficult situations with them.
Every organisation has a career path and we have to spend the required time at each level, learn the stuff what it takes to get it to the next level and move on. Hence set your expectations realistic.
- Next 2-3 years to become a senior developer.
- Next 3-5 years to become a team lead.
How did you handle your most challenging experience in your previous job? Think of a stressfull thing that happened at your last job. Then write a short description of what it was and what you did. Did you work to resolve the problem? Did you remove yourself from the problem and let other handle it? Stuff like that. Just a short explaination of what happened.
This is more related to problem solving., first, think of a problem you had in you work and what is the action/ solution you have taken to resolve. It is always better to explain the point in logical order with a good example.
When answering a question like this, you should always try and remember two things:
- use an example.
- use the word ‘teamwork’.
If you are a fresher with no work experience or does not have any challenging experience, talk to your seniors or people who has experience. They may give you some examples.
What is .net
.Net is the Development Platform which provides advanced feature facilities for the web and window application along with the window services . The .Net is the Middle layer between the operating System and the .Net application .The feature of .Net that the .Net Component can talk with each other without worrying about the language in which they are originally.. Two main components are CLR stands for the common Language Runtime and the .Net FrameWork Base classes. The CLR performs the task of converting the IL to native code Which gives the .Net applications to be language Independent . The Other component Like .Net FramwWork Base Classes act as services to be provided to the .Net applications.
Differences between VB.Net and C#, related to OOPS concepts?
VB.NET is a windows application
Where as C# is a console
1)What is the difference between vb and vb.net ?
vb is object based and vb.net is object oriented.In VB.net ,oops concept is used
How can i extract the formated word(bold,italic,underline,font,color etc) from the msword file.
using CommonDialog class
eg:
the code to invoke the default font dialog box by using the FontDialog control is given below:
private sub displayfont_click(byval sender as system.object,byval e as system.eventargs) handles displayfont.click
fontdialog.showDialog()
textbox1.font=fontdialog1.font
end sub
the code to invoke the default font dialog box by instantiating the fontdialog class is:
dim fdialog as new fontdialog()
private sub displayfont_click(byval sender as system.object,byval e as system.eventargs) handles displayfont.click
fdialog.showDialog()
textbox1.font=fontdialog1.font
end sub
How does CLR solves dll hell?
Unlike VB6; .net does not require to generate GUID for the dll’s. The dll’s are hosted thru applications ,IIS or windows services. These things internally refer to the physical locations of the file thus even if the dll is updated with certain functionalities the older application can still refer to the previous version of the Dll.
How to send xml file on server using HTTP protocol?
Through SOAP Protocol
What is different between Web.Config and Machine.Config and Where it will be ?
the settings made in the web.config file are applied to that particular web application only whereas the settings of machine.config file are applied to the whole asp.net application.
Whats the difference bt. .dll extension and .exe extension files?
The main difference between .dll and .exe is
.dll is the In process component where it take up the client’s memory space to run. So the communication between the application and component(dll) is very fast.
.EXE is the Out of process component. It uses its own memory(not application memory) to run the component. The communication between the application and component is slow when compared to .dll
What is the base class of .net?
System.Object is the base class of .NET
It Supports all classes in the .NET Framework class hierarchy and provides low-level services to derived classes. This is the ultimate superclass of all classes in the .NET Framework; it is the root of the type hierarchy.
How to store and retrieve images in sql server database through VB.NET
SQL Server supports the ability for clients to store objects within tables
What are Jagged Arrarys ?
The other type of multidimensional array is the jagged array. A two dimensional jagged array can be thought of as a table where each row can have a different number of columns. Take for example, a table where families are the rows and family members are the columns. Unless each family has the same number of members, each row will have a variable number of columns. You can use a jagged array to represent such a table.
A jagged array is really an array of arrays. To create a jagged array, you declare the array of arrays with multiple sets of parentheses or brackets and indicate the size of the jagged array in the first set of brackets (parentheses).
How can we remove Handlers at Run time ?
RemoveHandler myobj.myEvent, AddressOf MyEventHandler
What are Satellite Assemblies?
Satellite assemblies are user for localizing the applications resources.
A satellite assembly is a DLL that contains only resource strings
.we typically have one satellite assembly DLL for each language. Because these satellite assembly DLLs are separated from the main assembly (an .exe or DLL), it is easier to drop in multi-language support as we progress in your development process.
What do you mean by ‘Option Strict On’ ?
Option Strict
Visual Basic language in general does not require explicit syntax to be used when performing operations that might not be optimally efficient (e.g. late binding) or that might fail at run time (e.g. narrowing conversions). This permissive semantics often prevents detection of coding errors and also affects the performance of the application.
VB.NET enables a programmer to enforce strict semantics by setting this option to “On”. When used, this option should appear before any other code. This option can be set to “On” or “Off”. If this statement is not specified, by default, it is set to “Off”.
Syntax: Option Strict [On / Off]
When it is set to “On”, it disallows any narrowing conversions to occur without an explicit cast operator, late binding and does not let the programmer omit “As” clause in the declaration statement. Since setting it to “On” requires explicit conversion, it also requires that the compiler be able to determine the type of each variable. Thus it is implied that Option Strict also means Option Explicit.
Visual Basic .NET allows implicit conversions of any data type to any other data type. However, data loss can occur if the value of one data type is converted to a data type with less precision or a smaller capacity. Setting this option to “On” ensures compile-time notification of these types of conversions so they may be avoided.
How VB Implements the Disonnected Architecture as like VB.Net?
In VB to implement a disconnected recordset, after you have filled the recordset with the data, set its active connection property to “Nothing”. That breaks the connection to the database.You can locally also save the data of the recordset by using its Save function.
.Net is the Development Platform which provides advanced feature facilities for the web and window application along with the window services . The .Net is the Middle layer between the operating System and the .Net application .The feature of .Net that the .Net Component can talk with each other without worrying about the language in which they are originally.. Two main components are CLR stands for the common Language Runtime and the .Net FrameWork Base classes. The CLR performs the task of converting the IL to native code Which gives the .Net applications to be language Independent . The Other component Like .Net FramwWork Base Classes act as services to be provided to the .Net applications.
Differences between VB.Net and C#, related to OOPS concepts?
VB.NET is a windows application
Where as C# is a console
1)What is the difference between vb and vb.net ?
vb is object based and vb.net is object oriented.In VB.net ,oops concept is used
How can i extract the formated word(bold,italic,underline,font,color etc) from the msword file.
using CommonDialog class
eg:
the code to invoke the default font dialog box by using the FontDialog control is given below:
private sub displayfont_click(byval sender as system.object,byval e as system.eventargs) handles displayfont.click
fontdialog.showDialog()
textbox1.font=fontdialog1.font
end sub
the code to invoke the default font dialog box by instantiating the fontdialog class is:
dim fdialog as new fontdialog()
private sub displayfont_click(byval sender as system.object,byval e as system.eventargs) handles displayfont.click
fdialog.showDialog()
textbox1.font=fontdialog1.font
end sub
How does CLR solves dll hell?
Unlike VB6; .net does not require to generate GUID for the dll’s. The dll’s are hosted thru applications ,IIS or windows services. These things internally refer to the physical locations of the file thus even if the dll is updated with certain functionalities the older application can still refer to the previous version of the Dll.
How to send xml file on server using HTTP protocol?
Through SOAP Protocol
What is different between Web.Config and Machine.Config and Where it will be ?
the settings made in the web.config file are applied to that particular web application only whereas the settings of machine.config file are applied to the whole asp.net application.
Whats the difference bt. .dll extension and .exe extension files?
The main difference between .dll and .exe is
.dll is the In process component where it take up the client’s memory space to run. So the communication between the application and component(dll) is very fast.
.EXE is the Out of process component. It uses its own memory(not application memory) to run the component. The communication between the application and component is slow when compared to .dll
What is the base class of .net?
System.Object is the base class of .NET
It Supports all classes in the .NET Framework class hierarchy and provides low-level services to derived classes. This is the ultimate superclass of all classes in the .NET Framework; it is the root of the type hierarchy.
How to store and retrieve images in sql server database through VB.NET
SQL Server supports the ability for clients to store objects within tables
What are Jagged Arrarys ?
The other type of multidimensional array is the jagged array. A two dimensional jagged array can be thought of as a table where each row can have a different number of columns. Take for example, a table where families are the rows and family members are the columns. Unless each family has the same number of members, each row will have a variable number of columns. You can use a jagged array to represent such a table.
A jagged array is really an array of arrays. To create a jagged array, you declare the array of arrays with multiple sets of parentheses or brackets and indicate the size of the jagged array in the first set of brackets (parentheses).
How can we remove Handlers at Run time ?
RemoveHandler myobj.myEvent, AddressOf MyEventHandler
What are Satellite Assemblies?
Satellite assemblies are user for localizing the applications resources.
A satellite assembly is a DLL that contains only resource strings
.we typically have one satellite assembly DLL for each language. Because these satellite assembly DLLs are separated from the main assembly (an .exe or DLL), it is easier to drop in multi-language support as we progress in your development process.
What do you mean by ‘Option Strict On’ ?
Option Strict
Visual Basic language in general does not require explicit syntax to be used when performing operations that might not be optimally efficient (e.g. late binding) or that might fail at run time (e.g. narrowing conversions). This permissive semantics often prevents detection of coding errors and also affects the performance of the application.
VB.NET enables a programmer to enforce strict semantics by setting this option to “On”. When used, this option should appear before any other code. This option can be set to “On” or “Off”. If this statement is not specified, by default, it is set to “Off”.
Syntax: Option Strict [On / Off]
When it is set to “On”, it disallows any narrowing conversions to occur without an explicit cast operator, late binding and does not let the programmer omit “As” clause in the declaration statement. Since setting it to “On” requires explicit conversion, it also requires that the compiler be able to determine the type of each variable. Thus it is implied that Option Strict also means Option Explicit.
Visual Basic .NET allows implicit conversions of any data type to any other data type. However, data loss can occur if the value of one data type is converted to a data type with less precision or a smaller capacity. Setting this option to “On” ensures compile-time notification of these types of conversions so they may be avoided.
How VB Implements the Disonnected Architecture as like VB.Net?
In VB to implement a disconnected recordset, after you have filled the recordset with the data, set its active connection property to “Nothing”. That breaks the connection to the database.You can locally also save the data of the recordset by using its Save function.
The COBOL paper.
01.consider the following piece of code
01 GROSS-PAY
05 BASIC-PAY PIC 9(5)
05 ALLOWENCES PIC 9(3)
if BASIC-PAY has a value 1000 and ALLOWENCES has a value of 250,what will be
displayed by the statement
DISPLAY GROSS-PAY
a.1250
b.01000250
c.01250
d.1.250
02.consider two data items
77 W-A PIC 9(3)V99 VALUE 23.75
77 W-B PIC ZZ9V99 VLAUE 123.45
after the statement
MOVE W-A TO W-B
what will be W-B’s value?
a.123.75
b.b23.75 (where b indicates space)
c.023.75
d.invalid move
03.what is the result of the following?
DIVIDE A INTO B GIVING C.
a.C=A/B
b.the reminder of B/A is stored in C
c.C=B/A
d.the reminder of A/B is stored in C
04.consider the statement (incomplete)
IF(A NUMERIC)
DISPLAY A
the variable A can be
a.NUMERIC
b.ALPHABETIC
c.ALPHANUMERIC
d.NUMERIC OR ALPHANUMERIC
05.which of the following can be used as a check protection symbol
a.Z
b.S
c.*
d.+
06.what if any ,is the syntex error in the following piece of code
01 B PIC A(7)
02 C PIC 9(4)
……..
IF(B NUMERIC)
ADD 10 TO C
a.the condition in the if statement is wrong
b.noting is wrong
c.because C is initialised.ADD 10 TO C is wrong
d.both B and C shoud have same size.
07.study the following code
01 A1
05 B PIC 99
05 C PIC X(4)
01 A2
05 B PIC 99V99
05 C PIC A(4)
pick out the valid statement from the following
a.A1 and A2 can not have sub-ordinates
b.A1 and A2 can have the same sub-ordinates but must have same PIC clause
c.there is nothing wrong
d.A1 and A2 can have same sub-ordinates provided they are not at 01 level
08.study the following
01 A PIC 99V0 VALUE 5
01 B PIC 9V9 VALUE 6
01 C PIC 99V9 VALUE 2.5
01 D PIC 99 VALUE 3
COMPUTE A ROUNDED B C = A+B*C/D
ON SIZE ERROR PERFORM PRINT-ERROR
the comments of A.B.C after execution of the above statement are
a.A=10 B=0 C=10
b.A=10 B=9.9 C=9.9
c.A=10 B=0 C=9.9
d.A=10 B=6 C=10
09.how many times PARA-A is performed :
PERFORM PARA-A VARYING TIMES-COUNTER FROM 1 BY 1
UNTIL TIMES-COUNTER >0
PARA-A
MOVE P TO Q
MOVE H TO TIMES COUNTER
a.10
b.1
c.11
d.0
10.consider the following piece of code
01 GROUP-ITEM
05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50
05 AMOUNT-2 PIC 9(4)V99 USAGE COMP
MOVE ZERO TO GROUP-ITEM
ADD 50 TO AMOUNT-1
what will be the content of AMOUNT-1?
a.50
b.100
c.0
d.unpredictable
11.consider the following progrm statements
MOVE 0 TO SW.NO.OF.REC
PERFORM PRI-OUT UNTIL SW=1
DISPALY NO.OF.REC
STOP RUN
PRE-OUT
READ IN-FILE AT END
MOVE 1 TO SW
WRITE OUO-REC FROM IN-REC
ADD 1 TO NO.OF REC
if the IN-FILE contains 1000 records what value will be displayedafter the
PERFORM is over?assume that N0.OF.REC has PIC 9(4)
a.1000
b.1001
c.1
d.none of the above since there is a syntex error
12.study the data discriptions and answer the questions given below
i)01 ORDER RECORD
05 OUT-HEADER PIC X(50)
05 ITEM-COUNT PIC 99
05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING ON ITEM-COUNT
ii)01 NAME-AND-ADDRESS
05 N-AND-A-LINE OCCURES 5
05 LINE-LENGTH PIC P9
05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON LINE-LENGTH
iii)01 SALES-LIST
05 SALESMAN-COUNT PIC 99
05 SALES PIC 9(6) OCCURS 1 TO 100 DEPENDING ON
SALESMAN-COUNT
iv)01 ORDER-RECORD
05 NO-OF-BRANDS PIC 99
05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON NO-OF-BRANDS
which of the following is true?
a.i) and iii) are valid
b.i) and iv) are valid
c.i) and iii) are not valid
d.all are valid
13.C1 C2 C3 are three conditions whose TRUTH values are as folloes.
C1-TRUE C2-FALSE C3-TRUE
A,B,C are defined as given below
A:C1 AND(NOT C2) OR C3
B.(NOT C1) OR (NOT C2 AND NOT C3)
C.(C1 OR C2)AND C3
D.C1 AND C2 OR C3
given the above information which of the following statements are valid?
a.only A,B and C are TRUE
b.only A,C and D are TRUE
c.A,B,C and D are TRUE
d.only C and D are TRUE
14.consider the following
FD FILE-1
01 REC-1 PIC X(80)
……
WORKING-STORAGE SECTION
01 W-REC PIC X(90)
……..
PROCEDURE DIVISION
FIRST-PARA
…….
READ FILE-1 INTO W-REC AT END MOVE 1 TO EOF-FLAG
which of the following is true with respect to the above?
a.REC-1 will contain nothing and W-REC will contain the contains of the
record read
b.REC-1 and W-REC contain the same data
c.syntex is invalid and error will occur
d.REC-1 and W-REC must be of same size
15.PERFORM ACCUMULATE-TOTALS
VARYING A FROM 1 BY 2 UNTIL A >2
AFTER B FROM1 BY 1 UNTIL B>2
AFTER C FROM 2 BY -1 UNTIL C<2
the paragraph ACCUMULATE-TOTALS would be exicuted
a.18 times
b.4 times
c.8 times
d.24 times
16.there is a file whose ORGANISATION is INDEXED.you want to read the records
from the file in RANDOM fashion as well as sequentially.then which of the
access mode would you specify?
a.SEQUENTIAL
b.RANDOM
c.DYNAMIC
D.ACCESS MODE has nothing to do with it
17.consider the following PROCEDURE DIVISION entry
OPEN EXTEND IN-FILE
identify the correct statement
a.organization of IN-FILE is sequential and records can be added in the
beginning
b.organization of IN-FILE is sequential and records can be added in the
end
c.organization of IN-FILE is indexed and records can be added in the
beginning
d.organization of IN-FILE is indexed and records can be added in the end
18.what is the size of W-REC in the following
01 W-REC
05 A PIC 9(4)V99
05 B READLINES A
10 C PIC XX
10 D PIC S9(4)
05 E OCCURS 7 PIC ZZ.ZZ
05 F OCCURS 5
10 G PIC ZZ.ZZZ99
10 H OCCURS 3
15 J PIC 9(3)
15 K PIC V99
a.177
b.161
c.180
d.none of yhe above
19.consider the following two IF statements:
IF X AND NOT Y MOVE A TO B
IF Z=1 OR 9 MOVE A TO B
select one of the following data divusion entries which gives identical
results for both the above IF statements
a.01 Z PIC 9
88 X VALUE 1.9
88 Y VALUE 0.2 THRU 8
b.01 Z PIC 9
88 X VALUE 0.2 THRU 8
Y VALUE 1.9
c.01 Z PIC 9
88 X VALUE 1.9
88 NOT-Y VALUE 0.2 THRU 1.9
d.none of yhe above
20.consider the following two statements
MOVE 10 TO N
PERFORM PARA-X N TIMES
STOP RUN
PARA-X
MOVE 5 TO N
how many times PARA-X willbe exicuted?
a.10
b.5
c.infinate
d.execution error
21.given the following:
77 A PIC 9V9 VALUE 9.5
77 B PIC 9 VALUE 9.
77 C PIC V9 VALUE 0.8
77 D PIC 9
77 E PIC 9
77 F PIC 9V999
what are the contenta of D E nad F after teh following statements are
executed:
COMPUTE F ROUNDED=A+C/B
MULTIPLY A BY C GIVING E
ADD B C A GIVING D ROUNDED
a.F=9.589 E=8 D=1
b.F=9.589 E=8 D=9
c.F=9.589 E=7 D=9
d.F=9.589 E=7 D=1
22. Consider the follwoing IF condition:
IF A LESS 1200 IF B GREATER 25 MOVE 47 TOC
ELSE MOVE 57 TO C
IF A GREATER 249 MOVE 67 TO C
ELSE NEXT SENTENCE ELSE IF B LESS 67
MOVE 27 TO C
What will be the value of C, when A is 137 and b is 25
(a) 27
(b) 57
(c) 67
(d) none
23. Consider the following:
77 W-NUM PIC 9 VALUE 0
——
MOVE 1 TO W-NUM
PERFORM PARA-X UNTIL W-NUM > 9.
——
PARA-X
ADD 1 TO W-NUM
How many times PARA-X is executed ?
(a) 10
(b) 9
(c) 11
(d) Infinite loop
24. Consider the following code:
77 A PIC 99V99 VALUE 55.35
77 B PIC 99V999 VALUE 32.754
ADD B TO A ON SIZE ERROR DISPLAY “ERROR!!!”
What will be the result ?
(a) A=88.10, B=32.754
(b) A=87.00 B=32.754
(c) A=87.10 B=32.754
(d) ERROR!!! will be DISPLAYed on the screen.
25. Consider the following:
77 A PIC 9(10)
77 B PIC 9(10)
77 C PIC 9(19)
MULTIPLY AB BY B GIVING C
Which of the following is true ?
(a) The execution of the above may result in size error.
(b) The execution of the above will result in size error.
(c) The definition of C is invalid resulting in compilation error.
(d) No error will be thee and the program would proceed correctly.
26. A paragraph PARA-X is to be executed when none oof the data names
A, B and C have value of 1. Which of the following will achieve this ?
(a) IF A NOT = 1 OR B NOT = 1 OR C NOT = 1 PERFORM PARA-X
(B) IF NOT A= 1 AND B= 1 AND C = 1 PERFORM PARA-X
(C) IF A NOT =1 IF NOT B = 1 OR C= 1 PERFORM PARA-X
(C) IF A NOT = 1 AND B NOT = 1 AND C NOT = 1 PERFORM PARA-X
27. Study the five expressions and the class to which they belong:
S.N. Expression Class
1 “SPACES” Figurative constant
2. “Depreciation Schedule Non-numeric literal
3. “12%” Non-numeric literal
4. INTEREST-DUE Non-numeric literal
5. ZEROES Figurative constant
Which of the following statement is true?
(a) 1 and 3 are incorrect
(b) 1 and 4 are incorrect
(c) 3 and 4 are incorrect
(d) All are correct
28. Identify the invalid dataname from the following:
(a) SAVINGS-ACCOUNT
(b) ANNUAL-ALLOCATION-FOR-OVERHEAD
(c) SAMOUNT250
(d) 12DEMAND
29. Study the DATA DIVISION entries and the three PROCEDURE DIVISION entries
given below:
01 END-OF-FILE-SWITCH PIC XXX.
88 NO-MORE-RECS VALUE “YES”.
88 MORE-RECS VALUE “NO”.
(i) READ SAMPLE-FILE AT END MOVE “YES” TO NO-MORE-RECS.
(ii) IF NO-MORE-RECS = “YES” GO TO LAST-PARA.
(iii) IF NO-MORE-RECS GO TO LAST-PARA.
Which are wrong?
(a) (i) and (ii)
(b) (ii) and (iii)
(c) (i) and (iii)
(d) all
30. The following entries appear in the WORKING-STORAGE SECTION:
01 DATE-TODAY.
05 YY PIC XX VALUE “90″.
05 MM PIC XX VALUE “12″.
05 DD PIC XX VALUE :31″.
01 DATE-EDIT PIC XX/XX/XX.
MOVE DATE-TODAY TO DATE-EDIT.
(a) 901231
(b) 90/12/31
(c) 31/12/90
(d) 311290
31. How many bytes will be allocated for the following record description
entries?
01 REC-A.
05 A PIC S9(4).
05 B PIC XXXBXXX.
05 C PIC ____9.99.
05 D PIC S9(5) COMP-3.
05 E PIC 9(3) COMP.
(a) 29
(b) 26
(c) 25
(d) 28
32. What is wrong with the following data declaration?
01 W-DATE PIC X(6).
05 DD PIC 99.
05 MM PIC 99.
05 YY PIC 99.
(a) Nothing is wrong.
(b) Under W-DATE all level 05 items are having a PIC 99 but level
01 has PIC X(6).
(c) PIC can’t be specified for a group item.
(d) DD, MM, and YY are invalid datanames.
33. What is the output generated by the following code?
01 GRP-I.
05 SUBFLD1 PIC XX VALUE “AB”.
05 FILTER PIC X(6) VALUE SPACES.
01 GRP-2 REDEFINED GRP-1.
05 SUB-FLD2 PIC XX.
05 SUB-FLD3 PIC XX.
05 FILTER PIC X(4).
IF SUB-FLD1 NOT = SPACES
DISPLAY “SUBFLD1″
MOVE “ABBCCD” TO GRP-1
IF SUB-FLD3 = SPACES
DISPLAY “SPACES”
ELSE
DISPLAY “SUBFLD3″
DISPLAY “END”
ELSE
DISPLAY “SPACES”
DISPLAY “END”.
(a) SUBFLD1
SUBFLD3
END
(b) SPACES
END
(c) SUBFLD1
END
(d) SUBFLD1
SPACES
34. 88 level entry is used for
(a) data items in WORKING-STORAGE SECTION
(b) items with RENAMES clause
(c) condition-names
(d) None of the above
35. ZEROES and SPACES are _______ constants
(a) Figurative
(b) Numeric
(c) Non-numeric
(d) Alphabete
36. COMPUTE X = A * B – C * D and
COMPUTE X = (A * B) – (C * D)
(a) Are not the same
(b) Are same
(c) Syntactically wrong
(d) Will yield a run time error
37. OCCURS clause is used in the DATA DIVISION on data names at
(a) 01 level
(b) 77 level
(c) 88 level
(d) any level from 02 to 49
38. Consider the following COBOL entries:
05 X PIC 99 VALUE 10.
SUBTRACT 20 FROM X.
The resultant value of X wil be
(a) 10
(b) 00
(c) compile-time error
(d) none of these
39. Consider the following COBOL entries
05 X PIC 99 VALUE 10.
ADD 40 X TO X.
COMPUTE X = 3 * X – 40.
The result in X is
(a) 10
(b) 40
(c) Compile or Run time error
(d) none of these
40. given the following piece of code:
CALL SUB-PGM USING A, B, C.
CALL SUB-PGM USING A, C, C.
(a) Both CALL statements will always produce same result.
(d) Both CALL statements may produce different result.
(c) Compile-time error because SUB-PGM is a dataname.
(d) Compile-time error because A, B, C are used twice.
41. The hierarchy of the execution of logical operators is
(a) NOT AND OR
(b) AND OR NOT
(c) OR AND NOT
(d) OR NOT AND
42. The order of precedence of arithmetic operators in an expression can be
overridden with the use of
(a) []
(b) ()
(c) {}
(d) Any of the above
Consider the following passage for answering questions 43 to 47.
A program is written to accept an answer to the query “enough fo the Day?”
If the respons is “N” then the program accepts quantity purchased and rate
of the item and displays the amount to be collected. Then the above query
is again displayed and the loop continues. At the end of the day, when
the response to the above query is “Y”, the day collections are displayed.
The program checks that the quantity purchased is between 25 and 125 and the
rate of the item is between 10.00 and 75.00. If any of these two conditions
are violated, the program displays an appropriate message and asks for next
input. The amounts are displayed with proper editing. The program is written
assuming that there can be a maximum of 1000 transactions a day.
43. How many variables would you declare for the above problem?
(a) 3
(b) 4
(c) 5
(d) 7
44. What should be the PICTURE clause of the variable used to calculate
end of the day collections?
(a) 9(9)v99
(b) 9(8)v99
(c) 995)v99
(d) Information given is insufficient to arrive at the answer
45. What should be the PICTURE clause of the variable used to calculate
to be collected.
(a) 9(9)v99
(b) 9(8)v99
(c) 9(5)v99
(d) Information given is insufficient to arrive at the answer
46. Assuming that the above program is being executed in a Department
Stores in MADRAS which of the following PICTURE clause will be
suitable for DISPLAYing the end of the day collections?
(a) Z(5)V99
(b) Z(5).99
(c) ZZ,ZZ,ZZ,ZZ9.99
(d) Information given is insufficient to arrive at the answer
47. How many _____ statements do you think will be there in the program?
(a) 3
(b) 4
(c) 5
(d) Information given is insufficient to arrive at the answer
48. Which of the following paragraphs is compulsory in every COBOL program?
(a) SPECIAL-NAMES
(b) PROGRAM-ID
(c) FILE-CONTROL
(d) OBJECT-COMPUTER
49. Which of the following files can be OPENed in all the 4 modes? The four
modes are INPUT, I-O, OUTPUT and EXTEND.
(a) INDEXED
(b) RELATIVE
(c) SEQUENTIAL
(d) All of the above
50. Which of the following EDITind and PICTURE symbols is to be used if a
minus(-) is to appear before the value if the value is -ve and a plus(+)
is to appear before the value if the value is +ve?
(a) +
(b) -
(c) + OR
(d) It is not possible
solutions
b,b,c,c,c,a,d,a,b,a,c,c,b,b,b,c,b,d,a,a,c,b,d,a,d,d,b,c,d,b,a,c,a,c,a,b,d,
a,c,b,a,b,b,b,c,c,a,b,c,a
01.consider the following piece of code
01 GROSS-PAY
05 BASIC-PAY PIC 9(5)
05 ALLOWENCES PIC 9(3)
if BASIC-PAY has a value 1000 and ALLOWENCES has a value of 250,what will be
displayed by the statement
DISPLAY GROSS-PAY
a.1250
b.01000250
c.01250
d.1.250
02.consider two data items
77 W-A PIC 9(3)V99 VALUE 23.75
77 W-B PIC ZZ9V99 VLAUE 123.45
after the statement
MOVE W-A TO W-B
what will be W-B’s value?
a.123.75
b.b23.75 (where b indicates space)
c.023.75
d.invalid move
03.what is the result of the following?
DIVIDE A INTO B GIVING C.
a.C=A/B
b.the reminder of B/A is stored in C
c.C=B/A
d.the reminder of A/B is stored in C
04.consider the statement (incomplete)
IF(A NUMERIC)
DISPLAY A
the variable A can be
a.NUMERIC
b.ALPHABETIC
c.ALPHANUMERIC
d.NUMERIC OR ALPHANUMERIC
05.which of the following can be used as a check protection symbol
a.Z
b.S
c.*
d.+
06.what if any ,is the syntex error in the following piece of code
01 B PIC A(7)
02 C PIC 9(4)
……..
IF(B NUMERIC)
ADD 10 TO C
a.the condition in the if statement is wrong
b.noting is wrong
c.because C is initialised.ADD 10 TO C is wrong
d.both B and C shoud have same size.
07.study the following code
01 A1
05 B PIC 99
05 C PIC X(4)
01 A2
05 B PIC 99V99
05 C PIC A(4)
pick out the valid statement from the following
a.A1 and A2 can not have sub-ordinates
b.A1 and A2 can have the same sub-ordinates but must have same PIC clause
c.there is nothing wrong
d.A1 and A2 can have same sub-ordinates provided they are not at 01 level
08.study the following
01 A PIC 99V0 VALUE 5
01 B PIC 9V9 VALUE 6
01 C PIC 99V9 VALUE 2.5
01 D PIC 99 VALUE 3
COMPUTE A ROUNDED B C = A+B*C/D
ON SIZE ERROR PERFORM PRINT-ERROR
the comments of A.B.C after execution of the above statement are
a.A=10 B=0 C=10
b.A=10 B=9.9 C=9.9
c.A=10 B=0 C=9.9
d.A=10 B=6 C=10
09.how many times PARA-A is performed :
PERFORM PARA-A VARYING TIMES-COUNTER FROM 1 BY 1
UNTIL TIMES-COUNTER >0
PARA-A
MOVE P TO Q
MOVE H TO TIMES COUNTER
a.10
b.1
c.11
d.0
10.consider the following piece of code
01 GROUP-ITEM
05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50
05 AMOUNT-2 PIC 9(4)V99 USAGE COMP
MOVE ZERO TO GROUP-ITEM
ADD 50 TO AMOUNT-1
what will be the content of AMOUNT-1?
a.50
b.100
c.0
d.unpredictable
11.consider the following progrm statements
MOVE 0 TO SW.NO.OF.REC
PERFORM PRI-OUT UNTIL SW=1
DISPALY NO.OF.REC
STOP RUN
PRE-OUT
READ IN-FILE AT END
MOVE 1 TO SW
WRITE OUO-REC FROM IN-REC
ADD 1 TO NO.OF REC
if the IN-FILE contains 1000 records what value will be displayedafter the
PERFORM is over?assume that N0.OF.REC has PIC 9(4)
a.1000
b.1001
c.1
d.none of the above since there is a syntex error
12.study the data discriptions and answer the questions given below
i)01 ORDER RECORD
05 OUT-HEADER PIC X(50)
05 ITEM-COUNT PIC 99
05 OUT-ITEM PIC X(20) OCCURS 1 TO 20 DEPENDING ON ITEM-COUNT
ii)01 NAME-AND-ADDRESS
05 N-AND-A-LINE OCCURES 5
05 LINE-LENGTH PIC P9
05 N-AND-A-CHAR PIC X OCCURS 1 TO 20 DEPENDING ON LINE-LENGTH
iii)01 SALES-LIST
05 SALESMAN-COUNT PIC 99
05 SALES PIC 9(6) OCCURS 1 TO 100 DEPENDING ON
SALESMAN-COUNT
iv)01 ORDER-RECORD
05 NO-OF-BRANDS PIC 99
05 BRAND-PURCHASED OCCURS 1 TO 15 DEPENDING ON NO-OF-BRANDS
which of the following is true?
a.i) and iii) are valid
b.i) and iv) are valid
c.i) and iii) are not valid
d.all are valid
13.C1 C2 C3 are three conditions whose TRUTH values are as folloes.
C1-TRUE C2-FALSE C3-TRUE
A,B,C are defined as given below
A:C1 AND(NOT C2) OR C3
B.(NOT C1) OR (NOT C2 AND NOT C3)
C.(C1 OR C2)AND C3
D.C1 AND C2 OR C3
given the above information which of the following statements are valid?
a.only A,B and C are TRUE
b.only A,C and D are TRUE
c.A,B,C and D are TRUE
d.only C and D are TRUE
14.consider the following
FD FILE-1
01 REC-1 PIC X(80)
……
WORKING-STORAGE SECTION
01 W-REC PIC X(90)
……..
PROCEDURE DIVISION
FIRST-PARA
…….
READ FILE-1 INTO W-REC AT END MOVE 1 TO EOF-FLAG
which of the following is true with respect to the above?
a.REC-1 will contain nothing and W-REC will contain the contains of the
record read
b.REC-1 and W-REC contain the same data
c.syntex is invalid and error will occur
d.REC-1 and W-REC must be of same size
15.PERFORM ACCUMULATE-TOTALS
VARYING A FROM 1 BY 2 UNTIL A >2
AFTER B FROM1 BY 1 UNTIL B>2
AFTER C FROM 2 BY -1 UNTIL C<2
the paragraph ACCUMULATE-TOTALS would be exicuted
a.18 times
b.4 times
c.8 times
d.24 times
16.there is a file whose ORGANISATION is INDEXED.you want to read the records
from the file in RANDOM fashion as well as sequentially.then which of the
access mode would you specify?
a.SEQUENTIAL
b.RANDOM
c.DYNAMIC
D.ACCESS MODE has nothing to do with it
17.consider the following PROCEDURE DIVISION entry
OPEN EXTEND IN-FILE
identify the correct statement
a.organization of IN-FILE is sequential and records can be added in the
beginning
b.organization of IN-FILE is sequential and records can be added in the
end
c.organization of IN-FILE is indexed and records can be added in the
beginning
d.organization of IN-FILE is indexed and records can be added in the end
18.what is the size of W-REC in the following
01 W-REC
05 A PIC 9(4)V99
05 B READLINES A
10 C PIC XX
10 D PIC S9(4)
05 E OCCURS 7 PIC ZZ.ZZ
05 F OCCURS 5
10 G PIC ZZ.ZZZ99
10 H OCCURS 3
15 J PIC 9(3)
15 K PIC V99
a.177
b.161
c.180
d.none of yhe above
19.consider the following two IF statements:
IF X AND NOT Y MOVE A TO B
IF Z=1 OR 9 MOVE A TO B
select one of the following data divusion entries which gives identical
results for both the above IF statements
a.01 Z PIC 9
88 X VALUE 1.9
88 Y VALUE 0.2 THRU 8
b.01 Z PIC 9
88 X VALUE 0.2 THRU 8
Y VALUE 1.9
c.01 Z PIC 9
88 X VALUE 1.9
88 NOT-Y VALUE 0.2 THRU 1.9
d.none of yhe above
20.consider the following two statements
MOVE 10 TO N
PERFORM PARA-X N TIMES
STOP RUN
PARA-X
MOVE 5 TO N
how many times PARA-X willbe exicuted?
a.10
b.5
c.infinate
d.execution error
21.given the following:
77 A PIC 9V9 VALUE 9.5
77 B PIC 9 VALUE 9.
77 C PIC V9 VALUE 0.8
77 D PIC 9
77 E PIC 9
77 F PIC 9V999
what are the contenta of D E nad F after teh following statements are
executed:
COMPUTE F ROUNDED=A+C/B
MULTIPLY A BY C GIVING E
ADD B C A GIVING D ROUNDED
a.F=9.589 E=8 D=1
b.F=9.589 E=8 D=9
c.F=9.589 E=7 D=9
d.F=9.589 E=7 D=1
22. Consider the follwoing IF condition:
IF A LESS 1200 IF B GREATER 25 MOVE 47 TOC
ELSE MOVE 57 TO C
IF A GREATER 249 MOVE 67 TO C
ELSE NEXT SENTENCE ELSE IF B LESS 67
MOVE 27 TO C
What will be the value of C, when A is 137 and b is 25
(a) 27
(b) 57
(c) 67
(d) none
23. Consider the following:
77 W-NUM PIC 9 VALUE 0
——
MOVE 1 TO W-NUM
PERFORM PARA-X UNTIL W-NUM > 9.
——
PARA-X
ADD 1 TO W-NUM
How many times PARA-X is executed ?
(a) 10
(b) 9
(c) 11
(d) Infinite loop
24. Consider the following code:
77 A PIC 99V99 VALUE 55.35
77 B PIC 99V999 VALUE 32.754
ADD B TO A ON SIZE ERROR DISPLAY “ERROR!!!”
What will be the result ?
(a) A=88.10, B=32.754
(b) A=87.00 B=32.754
(c) A=87.10 B=32.754
(d) ERROR!!! will be DISPLAYed on the screen.
25. Consider the following:
77 A PIC 9(10)
77 B PIC 9(10)
77 C PIC 9(19)
MULTIPLY AB BY B GIVING C
Which of the following is true ?
(a) The execution of the above may result in size error.
(b) The execution of the above will result in size error.
(c) The definition of C is invalid resulting in compilation error.
(d) No error will be thee and the program would proceed correctly.
26. A paragraph PARA-X is to be executed when none oof the data names
A, B and C have value of 1. Which of the following will achieve this ?
(a) IF A NOT = 1 OR B NOT = 1 OR C NOT = 1 PERFORM PARA-X
(B) IF NOT A= 1 AND B= 1 AND C = 1 PERFORM PARA-X
(C) IF A NOT =1 IF NOT B = 1 OR C= 1 PERFORM PARA-X
(C) IF A NOT = 1 AND B NOT = 1 AND C NOT = 1 PERFORM PARA-X
27. Study the five expressions and the class to which they belong:
S.N. Expression Class
1 “SPACES” Figurative constant
2. “Depreciation Schedule Non-numeric literal
3. “12%” Non-numeric literal
4. INTEREST-DUE Non-numeric literal
5. ZEROES Figurative constant
Which of the following statement is true?
(a) 1 and 3 are incorrect
(b) 1 and 4 are incorrect
(c) 3 and 4 are incorrect
(d) All are correct
28. Identify the invalid dataname from the following:
(a) SAVINGS-ACCOUNT
(b) ANNUAL-ALLOCATION-FOR-OVERHEAD
(c) SAMOUNT250
(d) 12DEMAND
29. Study the DATA DIVISION entries and the three PROCEDURE DIVISION entries
given below:
01 END-OF-FILE-SWITCH PIC XXX.
88 NO-MORE-RECS VALUE “YES”.
88 MORE-RECS VALUE “NO”.
(i) READ SAMPLE-FILE AT END MOVE “YES” TO NO-MORE-RECS.
(ii) IF NO-MORE-RECS = “YES” GO TO LAST-PARA.
(iii) IF NO-MORE-RECS GO TO LAST-PARA.
Which are wrong?
(a) (i) and (ii)
(b) (ii) and (iii)
(c) (i) and (iii)
(d) all
30. The following entries appear in the WORKING-STORAGE SECTION:
01 DATE-TODAY.
05 YY PIC XX VALUE “90″.
05 MM PIC XX VALUE “12″.
05 DD PIC XX VALUE :31″.
01 DATE-EDIT PIC XX/XX/XX.
MOVE DATE-TODAY TO DATE-EDIT.
(a) 901231
(b) 90/12/31
(c) 31/12/90
(d) 311290
31. How many bytes will be allocated for the following record description
entries?
01 REC-A.
05 A PIC S9(4).
05 B PIC XXXBXXX.
05 C PIC ____9.99.
05 D PIC S9(5) COMP-3.
05 E PIC 9(3) COMP.
(a) 29
(b) 26
(c) 25
(d) 28
32. What is wrong with the following data declaration?
01 W-DATE PIC X(6).
05 DD PIC 99.
05 MM PIC 99.
05 YY PIC 99.
(a) Nothing is wrong.
(b) Under W-DATE all level 05 items are having a PIC 99 but level
01 has PIC X(6).
(c) PIC can’t be specified for a group item.
(d) DD, MM, and YY are invalid datanames.
33. What is the output generated by the following code?
01 GRP-I.
05 SUBFLD1 PIC XX VALUE “AB”.
05 FILTER PIC X(6) VALUE SPACES.
01 GRP-2 REDEFINED GRP-1.
05 SUB-FLD2 PIC XX.
05 SUB-FLD3 PIC XX.
05 FILTER PIC X(4).
IF SUB-FLD1 NOT = SPACES
DISPLAY “SUBFLD1″
MOVE “ABBCCD” TO GRP-1
IF SUB-FLD3 = SPACES
DISPLAY “SPACES”
ELSE
DISPLAY “SUBFLD3″
DISPLAY “END”
ELSE
DISPLAY “SPACES”
DISPLAY “END”.
(a) SUBFLD1
SUBFLD3
END
(b) SPACES
END
(c) SUBFLD1
END
(d) SUBFLD1
SPACES
34. 88 level entry is used for
(a) data items in WORKING-STORAGE SECTION
(b) items with RENAMES clause
(c) condition-names
(d) None of the above
35. ZEROES and SPACES are _______ constants
(a) Figurative
(b) Numeric
(c) Non-numeric
(d) Alphabete
36. COMPUTE X = A * B – C * D and
COMPUTE X = (A * B) – (C * D)
(a) Are not the same
(b) Are same
(c) Syntactically wrong
(d) Will yield a run time error
37. OCCURS clause is used in the DATA DIVISION on data names at
(a) 01 level
(b) 77 level
(c) 88 level
(d) any level from 02 to 49
38. Consider the following COBOL entries:
05 X PIC 99 VALUE 10.
SUBTRACT 20 FROM X.
The resultant value of X wil be
(a) 10
(b) 00
(c) compile-time error
(d) none of these
39. Consider the following COBOL entries
05 X PIC 99 VALUE 10.
ADD 40 X TO X.
COMPUTE X = 3 * X – 40.
The result in X is
(a) 10
(b) 40
(c) Compile or Run time error
(d) none of these
40. given the following piece of code:
CALL SUB-PGM USING A, B, C.
CALL SUB-PGM USING A, C, C.
(a) Both CALL statements will always produce same result.
(d) Both CALL statements may produce different result.
(c) Compile-time error because SUB-PGM is a dataname.
(d) Compile-time error because A, B, C are used twice.
41. The hierarchy of the execution of logical operators is
(a) NOT AND OR
(b) AND OR NOT
(c) OR AND NOT
(d) OR NOT AND
42. The order of precedence of arithmetic operators in an expression can be
overridden with the use of
(a) []
(b) ()
(c) {}
(d) Any of the above
Consider the following passage for answering questions 43 to 47.
A program is written to accept an answer to the query “enough fo the Day?”
If the respons is “N” then the program accepts quantity purchased and rate
of the item and displays the amount to be collected. Then the above query
is again displayed and the loop continues. At the end of the day, when
the response to the above query is “Y”, the day collections are displayed.
The program checks that the quantity purchased is between 25 and 125 and the
rate of the item is between 10.00 and 75.00. If any of these two conditions
are violated, the program displays an appropriate message and asks for next
input. The amounts are displayed with proper editing. The program is written
assuming that there can be a maximum of 1000 transactions a day.
43. How many variables would you declare for the above problem?
(a) 3
(b) 4
(c) 5
(d) 7
44. What should be the PICTURE clause of the variable used to calculate
end of the day collections?
(a) 9(9)v99
(b) 9(8)v99
(c) 995)v99
(d) Information given is insufficient to arrive at the answer
45. What should be the PICTURE clause of the variable used to calculate
to be collected.
(a) 9(9)v99
(b) 9(8)v99
(c) 9(5)v99
(d) Information given is insufficient to arrive at the answer
46. Assuming that the above program is being executed in a Department
Stores in MADRAS which of the following PICTURE clause will be
suitable for DISPLAYing the end of the day collections?
(a) Z(5)V99
(b) Z(5).99
(c) ZZ,ZZ,ZZ,ZZ9.99
(d) Information given is insufficient to arrive at the answer
47. How many _____ statements do you think will be there in the program?
(a) 3
(b) 4
(c) 5
(d) Information given is insufficient to arrive at the answer
48. Which of the following paragraphs is compulsory in every COBOL program?
(a) SPECIAL-NAMES
(b) PROGRAM-ID
(c) FILE-CONTROL
(d) OBJECT-COMPUTER
49. Which of the following files can be OPENed in all the 4 modes? The four
modes are INPUT, I-O, OUTPUT and EXTEND.
(a) INDEXED
(b) RELATIVE
(c) SEQUENTIAL
(d) All of the above
50. Which of the following EDITind and PICTURE symbols is to be used if a
minus(-) is to appear before the value if the value is -ve and a plus(+)
is to appear before the value if the value is +ve?
(a) +
(b) -
(c) + OR
(d) It is not possible
solutions
b,b,c,c,c,a,d,a,b,a,c,c,b,b,b,c,b,d,a,a,c,b,d,a,d,d,b,c,d,b,a,c,a,c,a,b,d,
a,c,b,a,b,b,b,c,c,a,b,c,a
What is an object in C++?
An object is a package that contains related data and instructions. The data relates to what the object represents, while the instructions define how this object relates to other objects and itself.
What is a message?
A message is a signal from one object to another requesting that a computation take place. It is roughly equivalent to a function call in other languages.
What is a class?
A class defines the characteristics of a certain type of object. It defines what its members will remember, the messages to which they will respond, and what form the response will take.
What is an instance?
An individual object that is a member of some class.
What is a super-class?
Given a class, a super-class is the basis of the class under consideration. The given class is defined as a subset (in some respects) of the super-class. Objects of the given class potentially posses all the characteristics belonging to objects of the super-class.
What is inheritance?
Inheritance is property such that a parent (or super) class passes the characteristics of itself to children (or sub) classes that are derived from it. The sub-class has the option of modifying these characteristics in order to make a different but fundamentally related class from the super-class.
To what does message protocol refer?
An object’s message protocol is the exact form of the set of messages to which the object can respond.
What is polymorphism?
Polymorphism refers to the ability of an object to respond in a logically identical fashion to messages of the same protocol, containing differing types of objects. Consider 1 + 5 and 1 + 5.1. In the former, the message “+ 5″ is sent to an object of class integer (1). In the later, the message “+ 5.1″ is sent to the same integer object. The form of the message (its protocol) is identical in both cases. What differs is the type of object on the right-hand side of these messages. The former is an integer object (5) while the later is a floating point object (5.1). The receiver (1) appears (to other objects) to respond in the same way to both messages. Internally, however, it knows that it must treat the two types of objects differently in order to obtain the same overall response.
What are instance variables?
These represent an object’s private memory. They are defined in an object’s class.
What are class variables?
These represent a class’s memory which it shares with each of its instances.
What is a method?
A method is a class’s procedural response to a given message protocol. It is like the definition of a procedure in other languages.
In C++ what is a constructor? A destructor?
A constructors and destructors are methods defined in a class that are invoked automatically when an object is created or destroyed. They are used to initialize a newly allocated object and to cleanup behind an object about to be removed.
Compare and contrast C and C++.
Comparison: C++ is an extension to the C language. When C++ is used as a procedural language, there are only minor syntactical differences between them.
Contrast: When used as a procedural language, C++ is a better C because:
It vigorously enforces data typing conventions.
It allows variables to be defined where they are used.
It allows the definition of real (semantically significant) constants.
It allows for automatic pointer dereferencing.
It supports call-by-reference in addition to call-by-value in functions.
It supports tentative variable declarations (when the type and location of a variable cannot be known before hand.
As an object oriented language, C++ introduces much of the OOP paradigm while allowing a mixture of OOP and procedural styles.
What is operator overloading?
It is the process of, and ability to redefine the way an object responds to a C++ operator symbol. This would be done in the object’s class definition.
What is cin and cout?
They are objects corresponding to a program’s default input and output files.
What are the differences between a C++ struct and C++ class?
The default member and base class access specifiers are different.
This is one of the commonly misunderstood aspects of C++. Believe it or not, many programmers think that a C++ struct is just like a C struct, while a C++ class has inheritance, access specifiers, member functions, overloaded operators, and so on. Some of them have even written books about C++. Actually, the C++ struct has all the features of the class. The only differences are that a struct defaults to public member access and public base class inheritance, and a class defaults to the private access specifier and private base class inheritance. Getting this question wrong does not necessarily disqualify you because you will be in plenty of good company. Getting it right is a definite plus.
What is a default constructor?
A constructor that has no arguments or one where all the arguments have default argument values.
If you don’t code a default constructor, the compiler provides one if there are no other constructors. If you are going to instantiate an array of objects of the class, the class must have a default constructor.
What is a conversion constructor?
A constructor that accepts one argument of a different type.
The compiler uses this idiom as one way to infer conversion rules for a class. A constructor with more than one argument and with default argument values can be interpreted by the compiler as a conversion constructor when the compiler is looking for an object of the type and sees an object of the type of the constructor’s first argument.
What is the difference between a copy constructor and an overloaded assignment operator?
A copy constructor constructs a new object by using the content of the argument object. An overloaded assignment operator assigns the contents of an existing object to another existing object of the same class.
First, you must know that a copy constructor is one that has only one argument, which is a reference to the same type as the constructor. The compiler invokes a copy constructor wherever it needs to make a copy of the object, for example to pass an argument by value. If you do not provide a copy constructor, the compiler creates a member-by-member copy constructor for you.
You can write overloaded assignment operators that take arguments of other classes, but that behavior is usually implemented with implicit conversion constructors. If you do not provide an overloaded assignment operator for the class, the compiler creates a default member-by-member assignment operator.
What is a virtual destructor?
The simple answer is that a virtual destructor is one that is declared with the virtual attribute.
The behavior of a virtual destructor is what is important. If you destroy an object through a pointer or reference to a base class, and the base-class destructor is not virtual, the derived-class destructors are not executed, and the destruction might not be complete.
When is a template a better solution than a base class?
When you are designing a generic class to contain or otherwise manage objects of other types, when the format and behavior of those other types are unimportant to their containment or management, and particularly when those other types are unknown (thus the genericity) to the designer of the container or manager class.
Prior to templates, you had to use inheritance; your design might include a generic List container class and an application-specific Employee class. To put employees in a list, a ListedEmployee class is multiply derived (contrived) from the Employee and List classes. These solutions were unwieldy and error-prone. Templates solved that problem.
What is the difference between C and C++ ? Would you prefer to use one over the other ?
C is based on structured programming whereas C++ supports the object-oriented programming paradigm.Due to the advantages inherent in object-oriented programs such as modularity and reuse, C++ is preferred. However almost anything that can be built using C++ can also be built using C.
What are the access privileges in C++ ? What is the default access level ?
The access privileges in C++ are private, public and protected. The default access level assigned to members of a class is private. Private members of a class are accessible only within the class and by friends of the class. Protected members are accessible by the class itself and it’s sub-classes. Public members of a class can be accessed by anyone.
What is data encapsulation ?
Data Encapsulation is also known as data hiding. The most important advantage of encapsulation is that it lets the programmer create an object and then provide an interface to the object that other objects can use to call the methods provided by the object. The programmer can change the internal workings of an object but this transparent to other interfacing programs as long as the interface remains unchanged.
What is inheritance ?
Inheritance is the process of deriving classes from other classes. In such a case, the sub-class has an ‘is-a’ relationship with the super class. For e.g. vehicle can be a super-class and car can be a sub-class derived from vehicle. In this case a car is a vehicle. The super class ‘is not a’ sub-class as the sub- class is more specialized and may contain additional members as compared to the super class. The greatest advantage of inheritance is that it promotes generic design and code reuse.
What is multiple inheritance ? What are it’s advantages and disadvantages ?
Multiple Inheritance is the process whereby a sub-class can be derived from more than one super class. The advantage of multiple inheritance is that it allows a class to inherit the functionality of more than one base class thus allowing for modeling of complex relationships. The disadvantage of multiple inheritance is that it can lead to a lot of confusion when two base classes implement a method with the same name.
What is polymorphism?
Polymorphism refers to the ability to have more than one method with the same signature in an inheritance hierarchy. The correct method is invoked at run-time based on the context (object) on which the method is invoked. Polymorphism allows for a generic use of method names while providing specialized implementations for them.
What do the keyword static and const signify ?
When a class member is declared to be of a static type, it means that the member is not an instance variable but a class variable. Such a member is accessed using Classname.Membername (as opposed to Object.Membername). Const is a keyword used in C++ to specify that an object’s value cannot be changed.
How is memory allocated/deallocated in C ? How about C++ ?
Memory is allocated in C using malloc() and freed using free(). In C++ the new() operator is used to allocate memory to an object and the delete() operator is used to free the memory taken up by an object.
What is an explicit constructor?
A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. Its purpose is reserved explicitly for construction.
What is the Standard Template Library?
A library of container templates approved by the ANSI committee for inclusion in the standard C++ specification.
An applicant who then launches into a discussion of the generic programming model, iterators, allocators, algorithms, and such, has a higher than average understanding of the new technology that STL brings to C++ programming.
Describe run-time type identification.
The ability to determine at run time the type of an object by using the typeid operator or the dynamic_cast operator.
What problem does the namespace feature solve?
Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The name-space feature surrounds a library’s external declarations with a unique namespace that eliminates the potential for those collisions.
This solution assumes that two library vendors don’t use the same namespace, of course.
Are there any new intrinsic (built-in) data types?
Yes. The ANSI committee added the bool intrinsic type and its true and false value keywords and the wchar_t data type to support character sets wider than eight bits.
Other apparent new types (string, complex, and so forth) are implemented as classes in the Standard C++ Library rather than as intrinsic types.
An object is a package that contains related data and instructions. The data relates to what the object represents, while the instructions define how this object relates to other objects and itself.
What is a message?
A message is a signal from one object to another requesting that a computation take place. It is roughly equivalent to a function call in other languages.
What is a class?
A class defines the characteristics of a certain type of object. It defines what its members will remember, the messages to which they will respond, and what form the response will take.
What is an instance?
An individual object that is a member of some class.
What is a super-class?
Given a class, a super-class is the basis of the class under consideration. The given class is defined as a subset (in some respects) of the super-class. Objects of the given class potentially posses all the characteristics belonging to objects of the super-class.
What is inheritance?
Inheritance is property such that a parent (or super) class passes the characteristics of itself to children (or sub) classes that are derived from it. The sub-class has the option of modifying these characteristics in order to make a different but fundamentally related class from the super-class.
To what does message protocol refer?
An object’s message protocol is the exact form of the set of messages to which the object can respond.
What is polymorphism?
Polymorphism refers to the ability of an object to respond in a logically identical fashion to messages of the same protocol, containing differing types of objects. Consider 1 + 5 and 1 + 5.1. In the former, the message “+ 5″ is sent to an object of class integer (1). In the later, the message “+ 5.1″ is sent to the same integer object. The form of the message (its protocol) is identical in both cases. What differs is the type of object on the right-hand side of these messages. The former is an integer object (5) while the later is a floating point object (5.1). The receiver (1) appears (to other objects) to respond in the same way to both messages. Internally, however, it knows that it must treat the two types of objects differently in order to obtain the same overall response.
What are instance variables?
These represent an object’s private memory. They are defined in an object’s class.
What are class variables?
These represent a class’s memory which it shares with each of its instances.
What is a method?
A method is a class’s procedural response to a given message protocol. It is like the definition of a procedure in other languages.
In C++ what is a constructor? A destructor?
A constructors and destructors are methods defined in a class that are invoked automatically when an object is created or destroyed. They are used to initialize a newly allocated object and to cleanup behind an object about to be removed.
Compare and contrast C and C++.
Comparison: C++ is an extension to the C language. When C++ is used as a procedural language, there are only minor syntactical differences between them.
Contrast: When used as a procedural language, C++ is a better C because:
It vigorously enforces data typing conventions.
It allows variables to be defined where they are used.
It allows the definition of real (semantically significant) constants.
It allows for automatic pointer dereferencing.
It supports call-by-reference in addition to call-by-value in functions.
It supports tentative variable declarations (when the type and location of a variable cannot be known before hand.
As an object oriented language, C++ introduces much of the OOP paradigm while allowing a mixture of OOP and procedural styles.
What is operator overloading?
It is the process of, and ability to redefine the way an object responds to a C++ operator symbol. This would be done in the object’s class definition.
What is cin and cout?
They are objects corresponding to a program’s default input and output files.
What are the differences between a C++ struct and C++ class?
The default member and base class access specifiers are different.
This is one of the commonly misunderstood aspects of C++. Believe it or not, many programmers think that a C++ struct is just like a C struct, while a C++ class has inheritance, access specifiers, member functions, overloaded operators, and so on. Some of them have even written books about C++. Actually, the C++ struct has all the features of the class. The only differences are that a struct defaults to public member access and public base class inheritance, and a class defaults to the private access specifier and private base class inheritance. Getting this question wrong does not necessarily disqualify you because you will be in plenty of good company. Getting it right is a definite plus.
What is a default constructor?
A constructor that has no arguments or one where all the arguments have default argument values.
If you don’t code a default constructor, the compiler provides one if there are no other constructors. If you are going to instantiate an array of objects of the class, the class must have a default constructor.
What is a conversion constructor?
A constructor that accepts one argument of a different type.
The compiler uses this idiom as one way to infer conversion rules for a class. A constructor with more than one argument and with default argument values can be interpreted by the compiler as a conversion constructor when the compiler is looking for an object of the type and sees an object of the type of the constructor’s first argument.
What is the difference between a copy constructor and an overloaded assignment operator?
A copy constructor constructs a new object by using the content of the argument object. An overloaded assignment operator assigns the contents of an existing object to another existing object of the same class.
First, you must know that a copy constructor is one that has only one argument, which is a reference to the same type as the constructor. The compiler invokes a copy constructor wherever it needs to make a copy of the object, for example to pass an argument by value. If you do not provide a copy constructor, the compiler creates a member-by-member copy constructor for you.
You can write overloaded assignment operators that take arguments of other classes, but that behavior is usually implemented with implicit conversion constructors. If you do not provide an overloaded assignment operator for the class, the compiler creates a default member-by-member assignment operator.
What is a virtual destructor?
The simple answer is that a virtual destructor is one that is declared with the virtual attribute.
The behavior of a virtual destructor is what is important. If you destroy an object through a pointer or reference to a base class, and the base-class destructor is not virtual, the derived-class destructors are not executed, and the destruction might not be complete.
When is a template a better solution than a base class?
When you are designing a generic class to contain or otherwise manage objects of other types, when the format and behavior of those other types are unimportant to their containment or management, and particularly when those other types are unknown (thus the genericity) to the designer of the container or manager class.
Prior to templates, you had to use inheritance; your design might include a generic List container class and an application-specific Employee class. To put employees in a list, a ListedEmployee class is multiply derived (contrived) from the Employee and List classes. These solutions were unwieldy and error-prone. Templates solved that problem.
What is the difference between C and C++ ? Would you prefer to use one over the other ?
C is based on structured programming whereas C++ supports the object-oriented programming paradigm.Due to the advantages inherent in object-oriented programs such as modularity and reuse, C++ is preferred. However almost anything that can be built using C++ can also be built using C.
What are the access privileges in C++ ? What is the default access level ?
The access privileges in C++ are private, public and protected. The default access level assigned to members of a class is private. Private members of a class are accessible only within the class and by friends of the class. Protected members are accessible by the class itself and it’s sub-classes. Public members of a class can be accessed by anyone.
What is data encapsulation ?
Data Encapsulation is also known as data hiding. The most important advantage of encapsulation is that it lets the programmer create an object and then provide an interface to the object that other objects can use to call the methods provided by the object. The programmer can change the internal workings of an object but this transparent to other interfacing programs as long as the interface remains unchanged.
What is inheritance ?
Inheritance is the process of deriving classes from other classes. In such a case, the sub-class has an ‘is-a’ relationship with the super class. For e.g. vehicle can be a super-class and car can be a sub-class derived from vehicle. In this case a car is a vehicle. The super class ‘is not a’ sub-class as the sub- class is more specialized and may contain additional members as compared to the super class. The greatest advantage of inheritance is that it promotes generic design and code reuse.
What is multiple inheritance ? What are it’s advantages and disadvantages ?
Multiple Inheritance is the process whereby a sub-class can be derived from more than one super class. The advantage of multiple inheritance is that it allows a class to inherit the functionality of more than one base class thus allowing for modeling of complex relationships. The disadvantage of multiple inheritance is that it can lead to a lot of confusion when two base classes implement a method with the same name.
What is polymorphism?
Polymorphism refers to the ability to have more than one method with the same signature in an inheritance hierarchy. The correct method is invoked at run-time based on the context (object) on which the method is invoked. Polymorphism allows for a generic use of method names while providing specialized implementations for them.
What do the keyword static and const signify ?
When a class member is declared to be of a static type, it means that the member is not an instance variable but a class variable. Such a member is accessed using Classname.Membername (as opposed to Object.Membername). Const is a keyword used in C++ to specify that an object’s value cannot be changed.
How is memory allocated/deallocated in C ? How about C++ ?
Memory is allocated in C using malloc() and freed using free(). In C++ the new() operator is used to allocate memory to an object and the delete() operator is used to free the memory taken up by an object.
What is an explicit constructor?
A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. Its purpose is reserved explicitly for construction.
What is the Standard Template Library?
A library of container templates approved by the ANSI committee for inclusion in the standard C++ specification.
An applicant who then launches into a discussion of the generic programming model, iterators, allocators, algorithms, and such, has a higher than average understanding of the new technology that STL brings to C++ programming.
Describe run-time type identification.
The ability to determine at run time the type of an object by using the typeid operator or the dynamic_cast operator.
What problem does the namespace feature solve?
Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The name-space feature surrounds a library’s external declarations with a unique namespace that eliminates the potential for those collisions.
This solution assumes that two library vendors don’t use the same namespace, of course.
Are there any new intrinsic (built-in) data types?
Yes. The ANSI committee added the bool intrinsic type and its true and false value keywords and the wchar_t data type to support character sets wider than eight bits.
Other apparent new types (string, complex, and so forth) are implemented as classes in the Standard C++ Library rather than as intrinsic types.