PASCAL in Tutorialspoint

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

variables

By default, _________ in Pascal are not initialized with zero.

>

Checks if the value of left operand is greater than the value of right operand, if yes, then condition becomes true. Example (A > B) is not true.

<>

Checks if the values of two operands are equal or not, if values are not equal, then condition becomes true. Example (A <> B) is true.

=

Checks if the values of two operands are equal or not, if yes, then condition becomes true. Example (A = B) is not true.

const

Constants can be declared in the declaration part of the program by specifying the _____ declaration.

/

Divides numerator by denominator. Example B / A will give 2

Pascal Statements

Each statement specifies a definite job of the program.

begin, end

Every block in Pascal is enclosed within a _____ statement and an ___ statement.

32, 64

Free Pascal compiler is a __- and __-bit Turbo Pascal and Delphi compatible Pascal compiler for Linux, Windows, OS/2, FreeBSD, Mac OS X, DOS and several other platforms.

Variable

It must begin with either a letter or an underscore.

Pascal

It was developed for teaching programming as a systematic discipline and to develop reliable and efficient programs.

%

Modulus Operator and remainder of after an integer division. Example B % A will give 0

*

Multiplies both operands. Example A * B will give 200

Facts about Pascal

Niklaus Wirth completed development of the original Pascal programming language in 1970.

assignment, relational

Only __________ operators and __________ operators are permitted on enumerated data type.

Character type constant

Operator = '+';

Pointer type constant

P = NIL;

Arithmetic, Relational, Boolean, Bit, Set, and String

Pascal allows the following types of operators −

not case-sensitive

Pascal is _______, so uppercase and lowercase letters mean same here.

Case Sensitivity

Pascal is a case non-sensitive language, which means you can write your variables, functions and procedure in either case.

Facts about Pascal

Pascal is based on the block structured style of the Algol programming language.

Pascal Statements

Pascal programs are made of statements.

begin, end, begin

Pascal variables are declared outside the code-body of the function which means they are not declared within the _____ and ___ pairs, but they are declared after the definition of the procedure/function and before the _____ keyword.

Facts about Pascal

Pascal was developed as a language suitable for teaching programming as a systematic discipline, whose implementations could be both reliable and efficient.

Facts about Pascal

Pascal was the primary high-level language used for development in the Apple Lisa, and in the early years of the Mac.

Subrange

Represents variables, whose values lie within a range.

Enumerated

Specifies a user-defined list.

Boolean

Specifies true or false logical values.

String

Stores an array of characters.

-

Subtracts second operand from the first. Example A - B will give -10

TRUE

TRUE or FALSE All constant declarations must be given before the variable declaration.

TRUE

TRUE or FALSE Each variable in Pascal has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable.

TRUE

TRUE or FALSE For global variables, Pascal variables are defined after the program header.

TRUE

TRUE or FALSE It is easy to understand and maintain the Pascal programs.

TRUE

TRUE or FALSE Special symbols and blanks must not be used in an identifier.

TRUE

TRUE or FALSE The end statement indicating the end of the main program is followed by a full stop (.) instead of semicolon (;).

TRUE

TRUE or FALSE The name of a variable can be composed of letters, digits, and the underscore character.

Facts about Pascal

The ISO 7185 Pascal Standard was originally published in 1983.

Facts about Pascal

The Pascal language was named for Blaise Pascal, French mathematician and pioneer in computer development.

variable name

The __ refers to the memory location where the value of the variable is going to be stored.

begin

The _____ statement of the main program block is where the program execution begins.

Pascal character set

The ________ consists of all upper case letters (A-Z), all lower case letters (a-z), all digits (0-9), and special symbols - + * / := , . ;. () [] = {} ` white space

scalar data types

The examples of _____ are integer, real, Boolean, character, subrange and enumerated.

end.

The last statement ____ ends your program.

comment

The lines within (*...*) will be ignored by the compiler and it has been put to add a _______ in the program.

Integer

The most natural size of integer for the machine.

readkey;

The statement ________ allows the display to pause until the user presses a key.

writeln();

The statement ________ uses the writeln function available in Pascal which causes the message to be displayed on the screen.

Boolean

This is also an integer type.

Pascal

This truly provides a great programming environment for learning programming as a systematic discipline based on the fundamental concepts.

Character

Typically a single octet (one byte). This is an integer type.

constants

Use of _________ makes a program more readable and helps to keep special quantities at one place in the beginning of the program.

Set type constant

Vowels = set of (A,E,I,O,U);

Embarcadero

_ is planning to build support for the Linux and Android operating system.

Turbo Pascal

__ provides an IDE and compiler for running Pascal programs on CP/M, CP/M-86, DOS, Windows and Macintosh.

Subrange Types

___ allow a variable to assume values that lie within a certain range.

Type declaration

____ indicates the category or class of the types such as integer, real, etc., whereas the variable specification indicates the type of values a variable may take.

Pascal

______ allows nested procedure definitions to any level of depth.

Pascal

______ allows numerical, logical, string and character constants.

Pascal

______ allows the programmers to define complex structured data types and build dynamic and recursive data structures, such as lists, trees and graphs.

Pascal

______ is Algol-based language and includes many constructs of Algol.

Pascal

______ is a general-purpose, high-level language that was originally developed by Niklaus Wirth in the early 1970s.

Pascal

______ is a procedural programming language, designed in 1968 and published in 1970 by Niklaus Wirth and named in honour of the French mathematician and philosopher Blaise Pascal.

Pascal

______ is a strongly typed language.

Pascal

______ offers a variety of programming structures.

Pascal

______ offers extensive error checking.

Pascal

______ offers features like records, enumerations, subranges, dynamically allocated variables with associated pointers and sets.

Pascal

______ offers several data types and programming structures.

Pascal

______ offers several data types like arrays, records, files and sets.

Delphi

______ provides compilers for running Object Pascal and generates native code for 32- and 64-bit Windows operating systems, as well as 32-bit Mac OS X and iOS.

Pascal

______ runs on a variety of platforms, such as Windows, Mac OS, and various versions of UNIX/Linux.

Pascal

______ supports object oriented programming.

Pascal

______ supports structured programming through functions and procedures.

Algol 60

_______ is a subset of Pascal.

Enumerated data types

_________ allow values to be specified in a list.

Variables

_________ are assigned a value with a colon and the equal sign, followed by a constant expression.

Structured data types

_________ are made of the scalar types; for example, arrays, records, files and sets.

Enumerated data types

_________ are user-defined data types.

Data types

_________ can be categorized as scalar, pointer and structured data types.

Variables

_________ can be initialized (assigned an initial value) in their declaration.

variables

_________ may contain rubbish values.

Data types

_________ of an entity indicates the meaning, constraints, possible values, operations, functions and mode of storage associated with it.

String type constant

president = 'Johnny Depp';

Ordinal(Integer)type constant

valid_age = 21;

e = 2.7182818;

velocity_light = 3.0E+10;

type

A ____ can be identified by a name or identifier.

constant

A ________ is an entity that remains unchanged during program execution.

variable

A ________ is nothing but a name given to a storage area that our programs can manipulate.

Real

A single-precision floating point value.

+

Adds two operands. Example A + B will give 30

var

All variable declarations are followed by the ___ keyword.

operator

An ________ is a symbol that tells the compiler to perform specific mathematical or logical manipulations.

identifier

An __________ is a sequence of letters and digits, beginning with a letter.

Facts about Pascal

In 1986, Apple Computer released the first Object Pascal implementation, and in 1993, the Pascal Standards Committee published an Object-Oriented Extension to Pascal.

procedure, function

In Pascal, a _________ is set of instructions to be executed, with no return value and a ________ is a procedure with a return value.

standard data types

Integer, real, Boolean and character types are referred as _______.

GNU Pascal (GPC)

It is a Pascal compiler composed of a front end to GNU Compiler Collection.

Turbo51

It is a free Pascal compiler for the 8051 family of microcontrollers, with Turbo Pascal 7 syntax.

Free Pascal

It is a free compiler for running Pascal and Object Pascal programs.

Oxygene

It is an Object Pascal compiler for the .NET and Mono platforms.


Ensembles d'études connexes

Life Insurance Exam Test Questions

View Set

Food Safety and Sanitation-Quiz 2

View Set

Introduction to Statistics Chapter 4-5

View Set

Final Exam pre tests broke down.

View Set