100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
FORTRAN EXAM QUESTIONS AND VERIFIED ANSWERS $10.99   Add to cart

Exam (elaborations)

FORTRAN EXAM QUESTIONS AND VERIFIED ANSWERS

 1 view  0 purchase
  • Course
  • FORTRAN
  • Institution
  • FORTRAN

FORTRAN EXAM QUESTIONS AND VERIFIED ANSWERS...

Preview 2 out of 7  pages

  • October 31, 2024
  • 7
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • fortran
  • fortran exam
  • FORTRAN
  • FORTRAN
avatar-seller
luzlinkuz
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.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller luzlinkuz. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $10.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75323 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$10.99
  • (0)
  Add to cart