1) What is Pascal?
Pascal is a high-level and Algol-based language that was developed by Niklaus Wirth.
It is used to develop efficient and reliable programs.
2) What are the features of Pascal?
Features of Pascal are:
- It is a strongly typed language and offers extensive error checking
- It offers a variety of programming structures and several data types
- It supports structured programming and object oriented programming
3) What are the most amazing implementations of Pascal?
The most amazing implementations of Pascal are:
- Skype
- Apple Lisa
- Total Commander
- Various PC Games
- Embedded Systems
4) Write a program in Pascal to print "Pascal Expert"?
Example:
program PascalExpert;
uses crt;
begin
writeln('Pascal Expert');
readkey;
end.
OUTPUT:
5) What are the types of pointers used in Pascal?
There are three types of pointers used in Pascal are:
- Record Pointer
- Associate Pointer
- Reference Pointer
6) What are the types of data types used in Pascal?
Types of data types are:
- Integers
- Real Numbers
- Char Data Type
- Boolean Data Types
7) What is the usage of Extension in Pascal?
It is used to make the program portable and clean.
8) What are the list of reserved words available in Pascal?
List of reserved words available in Pascal are:
array |
div |
packed |
program |
set |
var |
begin |
const |
repeat |
label |
procedure |
with |
until |
function |
case |
for |
type |
downto |
else |
while |
9) What are the types of constants declared in Pascal?
Types of constants declared in Pascal are:
- Char
- String
- Set types
- Real types
- Ordinal types
- Pointer types
10) What is the syntax to declare constants?
Syntax to declare constants:
const
identifier = constant_value;
11) What is function in Pascal?
It is a group of statements which is used to perform a task.
It is defined by using the function keyword.
12) What are the different ways to define a string in Pascal?
Different ways to define a string:
- ANSI Strings
- Short Strings
- Character Arrays
- String Variables
- Null Terminated Strings
13) What is Constructors and Destructors in Pascal?
Constructor: It is a method which is automatically called whenever an object is formed.
Destructor: During the destruction of the object, destruction method is called. It is used to destroy memory allocation created by constructors.
14) What is Pascal units?
Modules referred as units in Pascal and Pascal consists many built in units also.
Here, modules consists code blocks and code blocks consists of variables, type declarations and statement procedures etc.
15) What is the extension supported by Pascal?
Pascal supports
.pas extension.
16) What is the difference between Turbo and Standard Pascal?
The difference between Turbo and Standard Pascal:
Turbo Pascal |
Standard Pascal |
It uses dynamic variables and pointers to show the standard procedures. |
It doesn't use dynamic variables and uses procedures. |
It doesn't use the Get and Put methods. |
It supports the use of Get and Put methods. |
It uses recursion for their subprograms. |
It doesn't use the recursion for their subprograms. |
17) What is Pascal Sets?
Pascal Sets: It is a collection of elements of the same type. It allows defining the set data type. Here, the set elements are enclosed within square brackets.
18) Why semicolons are used as statement separators in Pascal?
In Pascal, semicolons are used as statement separator or statement terminator so that other statements can be executed.
19) Is float a Pascal data type?
No.
20) When was Pascal Developed?
In
1971.
21) What is IP Pascal?
IP Pascal (Interplatform Pascal): It is an implementation of the Pascal programming language using the IP portability platform, operating system, and a multiple machine.
22) How to declare constants in Pascal?
Syntax used to declare constants in Pascal is:
Const
identifier = constant_value;
23) What is the difference between Modern Pascal and Standard Pascal?
The difference between Modern Pascal and Standard Pascal are:
Modern Pascal |
Standard Pascal |
It is more secure and less ambiguous while coding. |
It is less secure and more ambiguous while coding. |
It provides backward compatibility by the use of functions and procedures. |
It doesn't follow the backward compatibility. |
It allows the removal of the length of the symbol. |
It doesn't allow the removal of the length of the symbol. |
24) What is Pascal's TimeToString?
It is a function in Pascal which is used to get the current time in a colon delimited form.
25) What is getmem in Pascal?
getmem: It is a function or procedure that is used to define a pointer with specific number of bytes and also allocate new memory on the heap.
26) How to release the getmem function allocated memory?
By using the
freemem function.
27) What are the Set Operations used in Pascal?
The Set Operations used in Pascal are:
- In
- Union
- Inclusion
- Difference
- Intersection
- Symmetric difference
28) How to declare a variant type in Pascal?
The syntax of declaring a variant type is:
29) What is With Statement in Pascal?
With Statement: This statement is used to access the members of a record. The
With Statement is the alternative way of
member access operator.