Hey guys, going through tough phase of preparing for ADP recruitment? Don’t worry we are here with some useful thing to make things a bit easier for you. In this post we have come up with some important interview questions which will help you a lot in your prepration. So follow us till the end of this post to get clear understanding.
Important Interview Questions for ADP
Go through these below given questions and you assure you that you will feel this thing. We have arranged these questions after due research so that we can provide maximum benefit to you.
Question 1. Define context menu.
Answer. The menu that you get when you right-click is called the context menu.
– It is a modular piece of markup code that can move around the page.
– It consists of two distinct blocks – the user interface and the script code to connect the UI.
– It is a shortcut menu, which you can use to give context-specific menu options of a specified object item to the user.
– In some ways, it is simpler than MainMenu, because it is smaller and sometimes it contains only a list of menu items without any submenus.
– The menus appear in context of some specific controls, for example: cut, copy, paste.
– It can also be disabled, hidden or deleted.
Steps to create context menu:
- Drag and drop a ContextMenu onto your form from the toolbox.
- Drag and drop a ListView and a TextBox control onto your form.
- Set the ContextMenu property of each control to ContextMenu1.
Question 2. List out some keywords available in C language.
Answer. Below are some of keywords that C language offers.
auto, double, int, struct, break, else, long, switch, case, enum, register, typedef, char, extern, return, union, const, float, short, unsigned, continue, for, signed, void, default, goto, sizeof, volatile, do, , if, static, while
Question 3. Explain how to dynamically add items to a menu in .NET.
Answer. Following answer provides a very generalized idea of how this can be done:
– The first step would be locating the Assembly DLL.
– An appropriate plug-in can be indicated by publishing an interface residing in the remote DLL. This is the second step.
– Then, load the DLL using the LoadFrom method.
– Validate plug-in status using reflections.
– Create a new instance of the object in the class supporting your interface.
– Then use the GetMenuItem method to have the class to return a MenuItem object.
– And then add the MenuItem.
Question 4. What are the types of constants in C?
Answer. Integer constants
Real or Floating point constants
Octal & Hexadecimal constants
Backslash character constants
Question 5. What is garbage collection?
Answer. The applications created to acquire memory. Memory management includes deallocating this acquired resources and acquiring them. This is done by the garbage collector and this concept of automatically reclaiming the memory is called Garbage Collection.
– It manages the allocation and release of memory for your application.
– It performs a collection in order to free some memory.
– It determines the best time to perform a collection which is based upon the allocations being made.
– When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.
Advantages of Garbage Collection:
- It removes the unreferenced objects from heap memory. It makes the java memory efficient.
- Releasing the memory space is automatically done by the garbage collector.
– The garbage collector of JVM collects only those objects that are created by ‘NEW’ keyword. So if you have created any object without ‘NEW’, you can use finalize() method to perform cleanup processing.
– The gc() method (garbage collector() method) is used to invoke the garbage collector to perform cleanup processing.
– The gc() method is found in System and Runtime classes.
Question 6. What is the difference between constant and variable in C?
Answer. Constant values can’t be modified by the program once it is declared. But, variable values can be modified by the program.
Question 7. Define Dispose().
Answer. It is a method for releasing resources that an object acquires.
– The dispose method is called by the destructor.
– It helps to release unmanaged resources used by your application.
– It is provided by the ‘Idisposable’ Interface.
Question 8. What is the difference between variable declaration and variable definition in C?
Answer. Variable declaration tells the compiler about data type and size of the variable. Whereas, variable definition allocates memory to the variable
Variable can be declared many times in a program. But, definition can happen only one time for a variable in a program.
Variable declaration is for assignment of properties and identification to a variable. Whereas, variable definition is for assignments of storage space to a variable
Question 9. Explain how garbage collection deals with circular references.
Answer. Circular referencing issue happens when two objects refer to each other. Usually in a parent-child relationship, situations occur where a child interacts with the parent object and has a reference held to the parent object.
The .NET, the objects that are reachable from the root can be cleaned up easily. Thus, this can even be applied to circular reference and have the objects holding the resources cleaned up.
Question 10. What is local variable in C?
Answer. The variables which are having scope/life only within the function are called local variables.
These variables are declared within the function and can’t be accessed outside the function.
Question 11. What is Break mode?
Answer. When changes are made to the code in an application, the way to be able to view how those changes have changed the way of execution is Break Mode. In break mode, a snapshot of the running application is taken in which the status and values of all the variables is stored.
Question 12. What is environment variable in C?
Answer. Environment variable is a variable that will be available for all C applications and C programs.
Once environment variables are exported, we can access them from anywhere in a C program without declaring and initializing in an application or C program.
Question 13. Define Trace Switches.
Answer. Trace switches are used to configure tracing behavior.
There are two kinds of trace switches: BooleanSwitch and TraceSwitch.
BooleanSwitch: It is either on or off.
TraceSwitch: It has property to determine trace behaviour.
Trace switches can be configured through application’s .config file even after the application is compiled.
Question 14. What are the different types of operator in C?
Answer. C language offers many types of operators. They are,
Bit wise operators
Conditional operators (ternary operators)
Question 15. Explain how to implement properties.
Answer. You can either use fields or property procedure to add properties.
It is convenient to use fields when the values associated with the properties are less in number. eg: boolean which can have only two values associated with it.
If property procedure has to be used to add a property, then three steps need to be followed:
– Declare a private variable to store the value of the property
– Write a get procedure to retrieve the value of the variable and
– Write a set procedure to set the value of the variable.
Question 16. What is arithmetic operator in C?
Answer. C Arithmetic operators are used to perform mathematical calculations like addition, subtraction, multiplication, division and modulus in C programs.
Arithmetic operators are +, -, *, /, %
Question 17. Describe .NET form.
Answer. t is a bit of screen real estate, that can use to represent information to the user and to accept input from the user.
– Forms can be standard windows, multiple document interface (MDI) windows, dialog boxes or display surfaces that expose routines.
– The easiest way to define the user interface for a form is to place controls on its surface.
– Forms provide a User Interface (UI) to give the applications a look and feel.
– Forms provide properties, methods, and events for the controls they contain.
– In Microsoft Visual Studio .NET, there is drag-and-drop facility for creating Web applications.
Forms have two components associated with them:
- The UI with controls
- The code behind the form
Features of .NET Forms:
- Server controls:
– Server controls are objects on .NET web pages that run when the page is requested and that render markup to the browser.
- Master pages:
– Master pages allow to create a consistent layout for the pages in your application.
- Working with data:
– It provides many options for storing, retrieving and displaying data.
– Developing a more secure application to understand the threats.
- Debugging and error handling:
– Helps you to diagnose the problems that might arise in your web forms application.
Advantages of .NET Forms:
– It supports an event model that preserves state over HTTP.
– It uses view state or server based forms, which can make managing state information easier.
– It uses a Page Controller pattern.
– It works for small teams of web developers and designers.
– It is less complex for application development.
Question 18. What is the relational operator in C?
Answer. Relational operators are used to find the relation between two variables. i.e. to compare the values of two variables in a C program.
Relational operators are >, <, >=, <=, ==, !=
Question 19. What is the use of SN.EXE?
Answer. SN stands for Strong Name.
– Strong Name Tool (Sn.exe) is used to sign assemblies with strong names.
It provides an option for security issues like:
- Key management
- Signature generation
- Signature verification
– It is automatically installed with Visual studio.
– It can be used for several purposes when working with shared components.
– It can be used to generate a new public-private key pair and to write that pair to a file.
Question 20. What is the bitwise operator in C?
Answer. Bitwise operators are used to perform bit operations. Decimal values are converted into binary values which are the sequence of bits and bit wise operators work on these bits.
Bit wise operators in C language are & (bitwise AND), | (bitwise OR), ~ (bitwise OR), ^ (XOR), << (left shift) and >> (right shift).
We have given some very important questions of Interview above. If you have still any queries then you can comment below. We here at Alpigni are always happy to help you.