Saturday, 1 February 2014

Delphi Basic and Advanced Interview Questions and Answers

Delphi Basic and Advanced Interview Questions and Answers

Have you got a call for Delphi interview? Must prepare following Delphi interview questions and answers. These Delphi interview questions and answers cover basic as well as many advanced questions. Many of these interview questions can be asked from you depending upon your experience in Delphi and the projects you have done in Delphi. These Delphi interview questions cover basic introduction of Delphi, OOPS concepts in Delphi, database connectivity in Delphi, environment setup steps, handling with DLLs, Handling Indy clients and mail protocols, third party components like reporting tools, UI tools, error tracking tools etc., unicode support in Delphi, File handling concepts in Delphi and much more.

1. What do you know about Delphi Programming Language? Why and where Delphi is it used? What is happening new in Delphi nowadays? What are the latest versions of Delphi? What is new in latest versions of Delphi?

These are the introductory questions about Delphi programming language which every Delphi developer should know. You should remain updated what's happening latest in Delphi world. You can visit Embarcadero official website to gather more info about Delphi.


Delphi XE5 is the latest version. You can read about its features on Embarcadero website.

2. What is RAD Studio? What is VCL, Firemonkey, Object Inspector, StackTrace? What are the various short-cuts for Run, Step Over, Trace Into, Object Inspector, opening dfm files from pas file and vice-versa? 

RAD Studio is the IDE for Delphi programming language. Earlier it was Borland Studio. If you use Delphi intensively every day, you should be knowing about Visual Component Library (VCL), Firemonkey, Difference between VCL and Firemonkey, use of object inspector and all the short-cuts used in the IDE.


3. Write down a simple program in Delphi to show "Hello World" message with proper syntax.

The main motive behind this simple program is that the interviewer wants to know whether you know about various sections of units like uses, interface, implementation etc. Before going for interview, you should prepare some sample and simple programs in Delphi so that you can explain them well when asked. Uses after implementation - cyclic/circular reference


4. What are the various file extensions used in Delphi? or What are various types of files in Delphi?

Variuos file extensions in Delphi are .pas, .dfm, .dcu, .dpk, .dpr, .dproj, .bpl etc. You should also know the full forms and importance of these extensions in Delphi project. Read complete answer 

5. How do we put comments in Delphi for single line as well as for a block? Can we put comments in dfm file? If yes, then how?

Single line comments: //
Block comments: {  }
You cannot put comments in dfm file as it is meant for designing purpose only.

6. What are various access specifiers in Delphi? What is Published? Where is it used? What is the difference between Public and Published? 

Private, Public, Protected and Published are the various access specifiers in Delphi. Published access specifier is used to expose the data at design time in the Object Inspector.


7. How Constructors and Destructors are implemented in Delphi? What is Inherited keyword? Is it necessary for a class to have constructor or destructor?

Constructors are used to create the instances and destructors are used to destroy the instances and free up the memory. Read complete article 

8. How Inheritance, Polymorphism, Overloading, Abstraction concepts are implemented in Delphi? Does Delphi support Multiple Inheritance? How Multiple inheritance is implemented in Delphi? What is the difference between Abstract Class and Interfaces?

Prepare you general OOPS concepts and also relate them with Delphi. Do prepare sample Delphi programs to implement above OOPS concepts like Inheritance, types of inheritances, Polymorphism, Overloading and Overriding, Abstract classes and interfaces etc.

9. How Exception Handling is implemented in Delphi?

You should be able to write down a simple program to explain the try, except and finally blocks and their usage.

10. What are the packages in Delphi? What are design time and runtime packages in Delphi and what is the difference between them? What is difference between DLL and BPL?


11. What is TStringList? When and why is it used? What are its advantages? Explain with simple example.


12. What is datagrid, dataview, datasource, dataset and database components in Delphi and how they are linked to each other? Do you know how locking is done in Delphi? What is BeginUpdate and EndUpdate? What is EnableControls and DisableControls in Dataset? What is the difference between dbExpress, dbGo and BDE in Delphi? Why to use dbExpress?


13. How Query component is used in Delphi for SELECT, UPDATE, DELETE and INSERT queries? What do you mean by opening and closing a dataset? What is the difference between activating and opening a dataset? What is ExecSQL statement in Delphi? Where is it used?

You should prepare a sample program in which you fire a simple SQL query (Select, Insert, Update and Delete) and show how will these be executed. Google for more help.


14. What is the Transaction Component in Delphi? Why is it used? What is Commit, Rollback and Timeout in Transaction component?

When you have to fire multiple SQL commands at once, you use transaction. When all queries are fired successfully, fire commit else fire rollback. Timeout is the time in milliseconds given for execution of query. Google to read more.

15. How will you implement File Handling in Delphi? How can you open, close, read, write, append and delete files in Delphi? Explain the usage SaveToFile and LoadFromFile functions in Delphi? What is TFileStream and TMemoryStream? What is the difference between them.


16. How will you create LogFiles in Delphi? 


17. How will you read and write data from INI file in Delphi?


18. What are the various event of the Delphi Forms? In which sequence does these events fire? Explain complete life cycle of Delphi Forms?


19. What is OnCloseQuery event in Delphi Form? Why is it used?


20. What is the purpose of Anchors, Align, Margin and AlignWithMargins Form properties? What do you know about Docking?

These all are used for docking and alignments of the components in the Delphi Form. Google for more details. There are good videos available on YouTube to explain these concepts.

21. What is unicode? How does Delphi support unicode? When was the unicode concept introduced in Delphi? What is the difference between Unicode, UTF-8 and UTF-16? Have you migrated any older Delphi version application to unicode version of Delphi? What was your experience? Which problems did you face while code migration?


22. How does Delphi interact with DLLs? What are the various calling conventions in Delphi? How to call DLL functions from Delphi code? What is difference between directives like safecall and stdcall and cdecl? What is HRESULT?


23. How to handle CHM files or help files in Delphi? What is HTMLHelpViewer in Delphi?


24. How to create new process at runtime in Delphi? What is CreateProcess and ShellExecute API calls in Delphi? How these are implemented?



25. Have you ever used Indy Clients in Delphi? What do you know about Socket Programming in Delphi?


26. How to Send Email with Attachments in Delphi XE2 using Indy Clients?


27. How to run XPath Query in Delphi using MSXML DOM?


28. How to create and consume webservices in Delphi using HTTP and SOAP protocols?


29. What are Live Bindings in Delphi?

LiveBindings is a data-binding feature supported by both the VCL and FireMonkey frameworks in RAD Studio. LiveBindings is an expression-based framework, which means it uses bindings expressions to bind objects to other objects or to dataset fields. Read complete article on Embaracdero.

30. What is Oxygene Programming Language? How is it related to Delphi?


32. What steps will you take for Environment Setup in Delphi?

You should know that you can setup the paths for various library files and install packages from Project --> Options, Tools --> Options, Components --> Install Packages etc. 

33. What are the various Build Configurations in Delphi? What is the difference between Release and Debug mode?

Debug mode is used while developing the application and Release mode is used while deployment of the application. Google for more details.

34. Have you used any third party components in Delphi?

There are many third party tools which are used in complex Delphi application for UI, ErrorLog, Reporting etc. For example, QuickReport, Reportbuilder are used for reporting, Devexpress is used for layout and designing etc, Eurekalog is used for error tracking.


35. What can Delphi do that other languages cannot do? 

You can learn what latest is going on in Delphi and what features has Delphi acquired in its latest versions. Delphi can generate native codes for Windows, Linux, Mac OS, Android and iOS. This cross platform support of Delphi makes it a unique programming language. 

36. What should be the output of following conversion?

StrToInt('A') --error
StrToInt('2') --2

3 comments:

  1. With 5 out of 36 answers,do you think they will give me the job?
    I use Delphi quite frequently and every time I learn something new .
    Delphi compares to my brain ... only about 10 % of it is used

    ReplyDelete
  2. I have read all instructions you shared about Choosing Web Designs in this post. Thanks for sharing.
    Web Development Saudi Arabia

    ReplyDelete
  3. http://www.burbagssale2013.com/ Burberry Outlet
    http://www.airmaxshoesfactory.com/ Air Max Shoes
    http://www.coachblackfriday2014.com/ Coach Black Friday
    http://www.coach-storeoutletonline.com/ Coach Black Friday
    http://www.coachcoachoutlet.com/ Coach Cyber Monday
    http://www.coachxfactory.com/ Coach Factory
    http://www.coach-factoryoutletonline.net/ Coach Outlet Factory
    http://www.coach-outletonlineusa.com/ Coach Outlet USA
    http://www.coach-pursesfactory.com/ Coach Purses Factory
    http://www.coachpurseusa.com/ Coach Purses USA
    http://www.coach-storeoutlet.com/ Coach Store Outlet
    http://www.coach-pursesonline.com/ Coach Purses On Sale
    http://www.monsterbeatsbydres.com/ Monster Beats Outlet
    http://www.louis-vuittonblackfriday.com/ Louis Vuitton Outlet
    http://www.lv-guccishoesfactory.com/ Louis Vuitton Factory
    http://www.marcjacobsonsale.com/ Marc Jacobs On Sale
    http://www.mcmworldwides.com/ MCM Outlet
    http://www.mcmoutlet-jp.com/ MCM 店铺
    http://www.oakleysunglassesfactory.com/ cheap oakley sunglasses
    http://www.michaelkorsmas.com/ Michael Kors Outlet
    http://www.michaelkors.so/ Michael Kors Outlet
    http://www.michaelkorsfactory-store.com/ Michael Kors Factory
    http://www.michaelkorsoutletr.com/ Michael Kors Outlet
    http://www.michael-korsfactoryonline.com/ Michael Kors Factory Online
    http://www.newcoachfactoryoutlet.com/ Coach Factory Outlet
    http://www.north-faceoutletonlines.net/ North Face Outlet Online
    http://www.polo-outletstore.com/ Polo Outlet Store
    http://www.ralph-laurenhome.com/ Ralph Lauren UK
    http://www.saclongchamppairs.com/ Sac Longchamp Pairs
    http://www.tcoachoutletonline.com/ Coach Outlet Online
    http://www.the-coachfactoryoutlet.com/ Coach Factory Oultet
    http://www.barbour-jacketsoutlet.com/ Barbour Jackets Outlet Online
    http://www.canada-gooser.com/ Canada Goose Outlet
    http://www.guccishoesuk-2014.com/ Gucci Outlet Online
    http://www.michaelkorsstates.com/ Michael Kors Outlet
    http://www.moncler-clearance.com/ Moncler Clearance
    http://www.famousbagsmall.com/
    http://www.moncler-jacketsoutletonline.com/ Moncler Jackets Outlet Online
    http://www.northsclearance.com/ North Clearace Outlet
    http://www.polo-ralphlaurenonline.com/ Polo Ralph Lauren Outlet Online
    http://www.woolrich-clearance.com/ Woolrich Clearance
    http://www.cvshopfactory.com/ shop.coachfactory.com
    http://www.mksfactoryoutlet.com/ Michael Kors Factory Outlet
    http://www.zxcoachoutlet.com/ Coach Outlet Online USA
    http://www.thebeatsbydre.net/ Beats by Dre
    http://www.vipbagsmall.com/
    http://www.newoutletonlinemall.com/ Coach Purses Outlet Online
    http://www.clickmichaelkors.com/ Michael Kors USA

    ReplyDelete