Pascal Programming Interview Preparation Guide

Sharpen your Pascal interview expertise with our handpicked 17 questions. Each question is designed to test and expand your Pascal expertise. Suitable for all experience levels, these questions will help you prepare thoroughly. Access the free PDF to get all 17 questions and give yourself the best chance of acing your Pascal interview. This resource is perfect for thorough preparation and confidence building.
Tweet Share WhatsApp

17 Pascal Questions and Answers:

1 :: Why is the name pascal?

Pascal was named after the French mathematician Blaise Pascal, who created a calculating machine (not a true computer).
Download PDFRead All Pascal Questions

2 :: What is standard Pascal?

Pascal is one of a series of languages put forth by one of the most prolific computer language creators, Niklaus Wirth, a professor at Institut fur informatik, ETH, Zurich, Switzerland. Professor Wirth participated in various versions of Algol, a language put forth by international cooperation that introduced the basic concepts of structured programming to the world. Wirth terms Pascal as a descendant of Algol 60 (for Algol, 1960 standard). The "official" descendant of Algol 60 was Algol 68, famous for having assignment as an expression operator (a basic feature of the later language C). Wirth felt that the design committee for Algol, after Algol 60, was losing focus and creating an unnecessarily complex language.

While Algol W has had it's fans, the language Pascal was considered to be a new high of consistent language design. The first draft of Pascal was created in 1968. The first compiler was operational in 1970, and the language was generally published in 1971. In 1973, after two years of testing and use, the language was revised into it's final form. That was detailed by "The Pascal User Manual and Report".

3 :: What is the history of Pascal?

Pascal is in the Algol family of languages. Algol, whose first version was called IAL or "International Algebraic Language", was the first language created by international committee. The resulting language was rather odd for its time. The committee had the goal of designing a unified computer language, but also saw Algol as a way to cleanly express computer algorithms, and so was not directly concerned with creating a practical language for compilation. That is, the language would serve a purpose even if it was only used for publishing algorithms, not running them.

This resulted in Algol not having many data types, or built in I/O. Also, Algol was generally free of the limits common to programming languages of that time, such as number of array dimensions. One of the goals of Algol was for it to be as close to mathematical notation as possible. In particular, Algol used a special operator for assignment, ':=', because '=' had a different meaning in mathematics.

4 :: What are the different Pascal standards?

The original Pascal standard was an unofficial standard documented by the author, Niklaus Wirth, in "The Report". The first official standard was ISO 7185 issued in 1983. This was followed by the extended standard, ISO 10206, in 1990. Another standard was the Object-Oriented Extension to Pascal. However, this standard was never finished, and was basically abandoned for lack of interest.

5 :: What is the current status of Pascal standards?

In 1989, ISO 7185 was revised to correct various errors and ambiguities found in the original document. This resulted in ISO 7185:1990.
Download PDFRead All Pascal Questions

6 :: What are the major dialects of Pascal in use today?

There have been many implementations of Pascal, both those that follow and those that don't follow the ISO 7185 standard. For the most part, ISO 7185 was followed on large computer installations during the early days of Pascal (1973-1990), and some installations on microcomputers. The other dialect that became popular was the UCSD (University of California at San Diego) Pascal, followed by Borland's Turbo Pascal. Although there are virtually no current implementations of UCSD Pascal, Borland's products exist today for advanced IBM-PC compatibles under Borland's Delphi name.

When the IBM-PC became 32 bit with the introduction of the Intel 80386, virtually all of the 32 bit implementations of Pascal on the PC were ISO 7185 conforming. However, there was a large shakeout of compiler vendors in the early 1990's that removed many of these installations from the market.

7 :: What is IP Pascal?

A. IP is an interplatform Pascal. It supports the following platforms in its current configuration:

1. Windows/95/98/ME/NT/2000/XP.
2. Linux/86.

A port for Mac OS X is under way, and a port for Sun Solaris/Sparc is planned.

IP both provides, and itself is run, on a set of porting modules that allow IP, and its client programs, to run on any of the supported platforms without source change. To move within operating systems on the same machine type, only a relink is required. To move within different CPU based systems, a recompile and link is required.

8 :: Can IP Pascal compile my Turbo/think/MWP Program?

A few Turbo Pascal "units" that aid program porting have been created, and these have shown to dramatically simplify porting from that language. Similar procedures will be used for other Pascals. However, these are just rapid porting aids, and these Pascals do not enjoy full language compatibility. There will always be a minimum amount of work required to change programs to work under IP. Further, porting using these units won't give you a program that takes advantage of the features of IP, and I consider it to be only a step in the process of fully porting a program to IP.

IPs main focus is to be a language that is not tied to any operating system or hardware, and IP will, therefore, always be unable to fully emulate the machine dependent features of many Pascal implementations. The failure of many Pascals that are single machine based has shown that the future lies in very portable Pascal languages and compilers.

9 :: Why use the standard version of the language (when other dialects are more widely used)?

ISO 7185 standard is the original language as created by N. Wirth, more precisely defined and more secure than the original. The standard makers refrained from making large improvements or extensions to the language. In fact, because Pascal is one of the most carefully designed languages and also one of the most carefully standardized, there is a high degree of ability to determine, unambiguously, if a given program construct is legal according to ISO 7185 rules.

Pascal, almost from the first of its use, was widely extended and changed. One reason for this may be that the language was also very popular in compiler classes, and tended to produce many experimental versions.

The original language, Pascal/1972 or J&W Pascal, has been around since 1972, standardized in 1982, and only minor changes were required to programs to bring them into compliance with it (see below). The basis of the language is still very strong, and the ISO 7185 standard is freely available. Further, there are many books written with the standard in mind.

10 :: Why is nOt IP Pascal compatible with Turbo/Borland®/Dephi®/Kylix Pascal ?

A. IP Pascal was designed to follow the original Pascal standard since 1980, following Niklaus Wirth's "The Pascal User Manual and report" [Jensen and Wirth] from 1974. In 1983, the ISO 7185 standard was released, and the minor changes to J&W Pascal were implemented in IP Pascal.

Unfortunately, none of the Borland products followed either the "User Manual and Report" nor the ISO 7185 Pascal standard, even though it preceeded Borland® implementations by a decade. Borland® products have a large user base, and we respect that, and hope to provide tools to convert user's Borland® compatible products to IP Pascal for interoperation.

For IP Pascal to have been compatible with Borland® products, considerable changes away from standard Pascal would have been required. Also, since there is no official published Borland® language standard, there would be no way to guarantee perfect compatibility with Borland® products. Finally, IP Pascal is directed at a long term standard implementation. Borland® products have traditionally been machine and operating system dependent. The different Borland® products, Turbo Pascal, Borland® Pascal, Borland® Windows Pascal, Delphi® and Kylix, are not completely compatible with each other, and would have been a moving target during the many years IP Pascal has been in operation.
Download PDFRead All Pascal Questions