Monday 9 February 2015

20 TOP Pascal Programming Interview Questions and Answers

Below are some important Pascal Programming interview questions which are asked in most MNC company interviews for beginners or professionals.

1. What are the differences between apple Pascal and the standard?
Early Apple Pascal was based entirely on the UCSD system, and the same comments apply to it as to UCSD Pascal above.

2. Is Pascal designed to be a teaching language?
This assertion has often been used to imply that Pascal is a toy language. I can't state the answer any better than Niklaus Wirth himself did:
"Occasionally, it has been claimed that Pascal was designed as a language for teaching. Although this is correct, its use in teaching was not the only goal. In fact, I do not believe in using tools and formalisms in teaching that are inadequate for any practical task." - Niklaus Wirth, from the 1984 ACM A.M. Turing award lecture.

3. What are the basic features of Pascal?
Pascal is a structured language, using if-then-else, while, repeat-until, and for-to/downto control structures. It differs primarily from proceeding languages in that data structures were also included, with records (a feature borrowed from COBOL), arrays, files, sets and pointers.
Pascal is also unusual for forging an effective compromise between language simplicity, power, and matching of language structures to underlying machine implementation.
Pascal also has many features for compiler writers. The language is constructed to have a minimum of ambiguity. Pascal, with few exceptions, can be processed "forward" with all of the smaller elements (like constants, types, etc) being defined before they are used. Pascal requires the types and exact sizes of operands to be known before they are operated on, again leading to simplified language processing and efficient output code (although this feature has often been called a problem). For this reason, Pascal still remains a popular language to implement compilers for as part of a compiler science class.

4. Should standard Pascal be used without extentions?
Recently, I have had some folks email me that they are surprised I am supporting advanced extentions for Pascal.
Pascal always had extentions. The original compiler created by Niklaus Wirth had extentions specific to the CDC 6000 series computers. The idea of the standard was never to forbid extentions, but rather that the basic implementation be as standardized across processors and implementations as possible.
In the old days of the mainframe and line printers, there was actually a chance that a program completely coded within the language standard would be all that was needed. Now, with advanced graphics and sound, and advanced devices like video editing, the general portable program is thought by many to be dead. I would say that nothing is further from the truth. We need clean and portable interfaces and programs more than ever. What has changed is that we rely more on library construction and interfaces. Windows, OS X and Linux/X Windows can be thought of as advanced intefaces with somewhat limited portability. Advanced graphics libraries such OpenGL are paving the way to new levels of functionality and portabilty.

5. What is the lifetime of IP Pascal?
Unlike many commercial products, IP Pascal is not designed according to the "hit software" mentality. I use IP Pascal here, I am its first customer. Because of this, I won't be creating phone support for the product. IP Pascal will be supported by email, web site, and usenet forum without charges or restrictions. Emails will be typically answered within 48 hours.
Because this support model does not require hiring large support staffs (and then firing them later as demand decreases), there is no plans to limit or charge for support.
More Questions & Answers :-

No comments:

Post a Comment