delphi interview questions

Delphi Interview Questions and Answers

We have listed of Delphi Interview Questions and Answers that have been designed for Delphi professionals who are preparing interviews on Delphi. The Delphi 6 IDE includes large and small changes that will really improve a programmer’s productivity. Among the key features are the introduction of the Object TreeView for every designer, an improved Object Inspector, extended code completion, and loadable views including diagrams and HTML.

Best Delphi Interview Questions and Answers

The Delphi IDE allows programmers to customize it in various ways—typically, opening many windows, arranging them, and docking them to each other. However, programmers often need to open one set of windows at design time and a different set at debug time.

Below we have provided best Delphi Interview Questions that are specially designed for Delphi Programmers.

What versions of Delphi are there?

Delphi has been available in beta-test for many months now, and Borland has also given away a large number of “prerelease” copies. As far as the official release is concerned, though, there are two packages: Delphi (sometimes referred to as Delphi Desktop) and Delphi Client/Server. Both are version 1.0.

What operating systems does Delphi support?

The only version of Delphi that has been released is for Windows 3.1. There is no reason why it should not run correctly under systems that provide Windows 3.1 emulation, like OS/2 Warp, Windows NT, etc. Borland has announced plans for a 32-bit version to coincide with Windows 95. It is rumored that this might be a free upgrade to users of Delphi 1.0, but I wouldn’t count on it. It is also known that Delphi 1.0 does not run correctly on the prerelease version of Windows 95.

Applications built in Delphi are Windows 3.1, 16-bit applications. However, Borland has stated that existing Delphi applications will compile unmodified in 32-bit Delphi.

What is Delphi?

Delphi is a product of Borland International. It is a native code compiler that runs under Windows 3.1 and provides visual programming tools somewhat similar to those found in Microsoft Visual Basic 3.0. The underlying language is Object Pascal, which is an extension of the object-oriented Pascal found in Turbo/Borland Pascal starting with version 5.5.

How much disk space, memory, etc, do I need to run Delphi?

The minimum installation of Delphi takes about 30Mb, and the full install takes 80Mb. In order to run it well, you’ll need a 486 with a minimum of 8Mb of RAM, though I personally wouldn’t try to run it in less than about 12Mb. I use a 486DX2/66 at home and a Pentium-90 at work, and to be honest, there’s not much difference between them–Delphi’s compiles are so fast that the

CPU is really not a bottleneck.

How tough is it to learn Delphi?

If you’re lucky, you already have lots of experience with both Object Pascal (or, as it used to be called, Borland Pascal With Objects–essentially, Turbo Pascal v5.5 or later) and with Visual Basic. If you fit this description, then Delphi will be a breeze for you.

Okay, now for everyone else. In order to make full use of the Delphi environment, you have to know Pascal, you have to have some grasp of object orientation, and you have to understand event-driven programming. Once you’re over those three hurdles, you’ve pretty much got it. See section 5 for more information.

Can we write multi-user database applications in regular Delphi?

Using regular, non-client/server Delphi, I have developed an application that talks to a Sybase server using ODBC drivers. I didn’t have to go to any serious trouble getting it to work, and data access speed is quite acceptable, better than it was under Visual Basic.

What is the history of Delphi?

Delphi is the descendant of Turbo Pascal, which was first released in 1983 for the CP/M operating system. Turbo Pascal was ported to MS-DOS in early 1984. During the early history of the IBM PC, Turbo Pascal was arguably the most popular language for serious development work–mostly because it was a real compiler, including the program editor and everything, that cost $19.95 and would run on a 64k machine.


Where can I get a copy of Delphi?

If you are in the US, You can order Delphi Desktop on CD-ROM for an introductory price of $199 by calling Borland’s credit card order desk at 1-800-331-0877. If you are a registered user of any version of Turbo Pascal or Borland Pascal, you qualify for an upgrade price of $149, and you can also buy the Visual Component Library Source Code for $49.

Can I use DLLs developed in C or C++ from Delphi?

Delphi is capable of making calls to and receiving callbacks from any standard Windows DLL. In addition, it is said to be possible (though rather tricky) to get Delphi to access classes within C++ DLLs. Borland’s WWW server has instructions on how to do this. I wasn’t able to get it to work, but I think that’s because I have weird DLLs.

Can I make calls to Delphi code from C or C++?

Delphi can generate DLLs, which can be called from C, C++, Visual Basic, PowerBuilder, or anything else that understands standard Windows DLLs. There is an example of a database-capable DLL in the DEMOS\DB\DLL directory.

What if I do not have a CD-ROM drive?

Borland will ship Delphi on 3.5″ floppy diskettes, but they charge extra for them. The resellers I have spoken to only carry the CD-ROM version because they don’t want to have to stock two different items. I got my copy on CD, but the CD has directories on it called DISK1 through DISK15, so I assume it would be 15 diskettes if you got it that way. If you don’t get the CD, you won’t get the stuff they use to fill up space on the CD, like an AVI file of an animated spinning Delphi logo.

What technical support do we get with Delphi?

You get access to the “up and running” line, which will only answer questions related to installing Delphi and getting it to run on your machine. The long hold times that were common when Delphi was first released seem to have improved–the current average seems to be about five minutes or so.

In order to get what Borland calls “consultative” tech support (I.E. someone with whom you can discuss reasons why a program is not working), you have to pay $2/minute. You can call (900) 555-1015 and have the charges put on your phone bill, or else (800) 330-3372 and use a credit card. I have called twice, and they couldn’t answer my question either time; however, they didn’t charge me for the calls.

I just bought Delphi. Where are the language and library reference manuals?

They don’t ship those manuals with Delphi because of their size. The component library reference is over 1000 pages. You can get all this information from the on-line help, or you can ftp the manuals from Borland in Acrobat format, or you can order the actual books for an additional charge.

How do we get access to a database from Delphi?

In general, you have to go to “BDE Config” and define an alias for the database you want to connect to. This allows you to avoid hard-coding a directory path into your application; you just refer to the alias. Then, you create a minimum of three objects on the desktop: A Query or Table object that actually talks to the alias and gets some data; a Data Source object that links between the data and the controls, and at least one data-aware control.

If you’ve been trying for hours to get this to work, and no matter what you do you just don’t see anything happening, try setting the “active” property on the Table or Query to “True.” This will open the database. I have seen many people get caught out by this the first time they try it.

Does Delphi support the back-end?

Delphi Desktop does not directly support any back-ends except for Local InterBase, and of course the BDE (Borland Database Engine) itself. Delphi Client/Server directly supports Oracle, Sybase, Informix, and InterBase. In both cases, you can use third-party ODBC drivers to connect to any system you want.

Can I use the ODBC drivers that I got with?

Yes, generally. I have not encountered any ODBC drivers that don’t work with Delphi, but on the other hand, I haven’t tried any really exotic ones.

How do I write a change password function for a Paradox table?

There is no way to do this within the Delphi VCL. Seems like a pretty serious omission to me. However, it is possible to do it by talking directly to the Borland Database Engine through the interface provided by the DBIPROCS and DBITYPES units.

Do I have to know a lot about the Windows API to use Delphi?

There seems to be a feeling that you need to know more about Windows to use Delphi than you do to use Visual Basic. This isn’t really true; you can get by in both environments with a very minimal understanding of Windows internals. However, in both environments, you have to know at least a little about the Windows API in order to really make the most of what you have.

How does Delphi handle Windows callbacks?

Just like C: You can get a far pointer to your callback procedure (you have to remember to declare it with the “far” qualifier, unless you have {F$+} in effect to force all calls to be far), pass the pointer to the Windows callback function, and there it is.

I am trying to call from Delphi and it GPFs. Whats up?

Based on the number of postings to comp.lang.pascal, it would seem that by far the largest number of problems calling Windows API functions or non-Delphi DLLs are caused by passing Pascal-style strings to functions that expect null-terminated (PChar) strings. This is the first thing you should check if you get a GPF or other strange results when calling an external function. See section 6.11 for more information on which type of strings go where.

How do I write a global error handler?

Use the Application.OnException event. Look in the help under “application events” for details of how to create and attach an event handler to the application variable.

Why do I get exception messages even though I am in protected code?

By default, the internal debugger will halt any time there is an exception, even if the exception is trapped by code. This can often be useful for debugging purposes. If it offends you, turn it off You control it from the Options/Environment menu.

When I use the Glyph property, how do I know which color is transparent?

Delphi always assumes that the color of the bottom left-hand corner pixel is the background color and should be displayed as transparent. Yes, it took me a while to figure this out. It’s not documented anywhere, but if you have the VCL source, you can look at the code in

BUTT ONS . PAS .

Thus, the compilation of these questions includes some of the major points that can be asked during an interview. The Delphi interviewers generally check the base knowledge of a candidate, which can be gained by practicing these Delphi Interview questions prior interview.

So if you have finally found your dream job in Delphi Programming but are wondering how to crack the Delphi Interview and what could be the probable Delphi Interview Questions. Every interview is different and the scope of a job is different too. Hope above assist you to get a dream Job. Keep Learn.

Online Training Tutorials

  • XML Interview QuestionsXML Interview Questions and AnswersBelow is the list of latest and updated XML interview questions and their answers for fresher’s as well as experienced users. These interview question covers basic and latest version of […]
  • VBScript Interview Questions and AnswersVBScript Interview Questions and AnswersVBScript is a powerful but easy-to learn scripting language that you can use to perform a number of useful activities, including enhancing your web pages and automating repetitive or […]
  • Siebel Interview Questions and AnswersSiebel Interview Questions and AnswersSiebel is a CRM (Customer Relationship Management) application. It is mainly deployed by companies which have huge customer base and expect regular interaction with them. There are other […]
  • Ruby Interview QuestionsRuby Interview Questions and AnswersProgramming Ruby is known to Rubyists. It is a tutorial and reference for the Ruby programming language. Before we start talking about the Ruby language, it’d be useful if we helped you […]
  • PHP Interview QuestionsPHP Interview Questions and AnswersBelow is the list of latest and updated PHP interview questions and their answers for fresher’s as well as experienced users.  The combination of PHP and MySQL is the most convenient […]
  • OOP Interview Questions and AnswersOOP Interview Questions and AnswersThere are still people, for instance, that call Artificial Intelligence to any program that is written in Prolog or Lisp. In the same way, there are those who maintain that any program […]
  • OOAD Interview QuestionsOOAD Interview Questions and AnswersOOAD -Object-Oriented Design: The emphasis in programming methods is primarily on the proper and effective use of particular language mechanisms. By contrast, design methods emphasize the […]
  • MySQL Interview Questions and AnswersMySQL Interview Questions and AnswersMySQL is a relatively recent entrant into the well-established area of relational database management systems (RDBMs), a concept invented by IBM researcher Edgar Frank Codd in 1970. […]