Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 2 fuera de 7 páginas
Examen

FORTRAN EXAM QUESTIONS AND VERIFIED ANSWERS

Document preview thumbnail
Vista previa 2 fuera de 7 páginas

FORTRAN EXAM QUESTIONS AND VERIFIED ANSWERS...

Vista previa del contenido

FORTRAN EXAM QUESTIONS AND VERIFIED
ANSWERS


Original Design Goal for original FORTRAN - ANSWER 1. Efficiency
2. A HLL for Numerical Engineering Applications

How is storage set in Fortran? - ANSWER All needed storage of the
program is decided at compile time, with minimal invocation of the OS

Fortran Typing System? - ANSWER Simple Typing system, static, and
few types: integer, real, complex, double, and arrays

Is there type definitions? - ANSWER No type definition or facilitating
user-defined data abstractions, only arrays and fixed size char string, in
addition to adding Subroutines and Functions abstraction.

What is put in the FORTRAN Declarative Section? - ANSWER i)
Allocating memory locations of specified sizes (based on the name
declared type) to hold the values of such declared names; and bind the
declared names to the assigned locations, statically (in FORTRAN), for
the entire life cycle of the program execution.

ii) Possibly, assigning initial value (if given) to the name's allocated
memory space.

What is put in the Imperative Section of FORTRAN? - ANSWER i)
Computational: X = Y/Z + F(4) + ARY(15)

ii) Control Flow: GO TO, DO .. CONTINUE, IF ( L1, L2, L3) I, CALL
SUB1(X,Y,Z),...

iii) Input/Output: READ, PRINT.

Unconditional GO TO - ANSWER GO TO label

Computed GO TO - ANSWER GO TO (L1, L2, ..., Ln), I

, If I = k, jump to Lk label in the label list, 1 <= k <= n; otherwise no jump.

Assigned GO TO - ANSWER GO TO N, (L1, L2, ..., Ln)

Go to the address placed in N, hence N must be pre-assigned some
label address, via the assign statement "ASSIGN <label> TO <id=N>",
that places the address of the label into the id N. It is the responsibility of
the programmer to do so (leads to insecurity).

FORTRAN's Security Loophole - ANSWER The similarity of the
computed and assigned "GO TO" above. In addition to the overworking
of the integer type to carry label's address and integers (weak typing),
and trusting the "user" to use the assign statement before any assigned
"GO TO" would introduce a great possibility of the CPU jumping to
execute at an unknown place in memory

Golden Rules learned from Fortran - ANSWER 1)"Different semantics
HLL's elements/structures should be expressed in Different syntax" (Not
always--> Exceptions? Why?).

2) The compiler should NOT trust the HLLs' users to do the right thing.

What is a Type - ANSWER A type of a variable is the set of values that
such variable can have and the set of operations that can work on such
values.

Why do we need Types in some HLLs? - ANSWER 1) Efficient
allocation of memory

2) Type Checking (security)

Two major Type Classifications - ANSWER 1) Built-in system: basic
types-- integer, real, etc, and structured—array, records, files,..

2) User defined: ADTs, Classes, Modules, Packets

Type "Coercion" - ANSWER Implicit type conversion based on the
context of use.

Información del documento

Subido en
31 de octubre de 2024
Número de páginas
7
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$11.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
luzlinkuz
3.8
(323)
Vendido
1577
Seguidores
852
Artículos
31659
Última venta
2 horas hace


Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes