Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Fortran Logical and Control Structures Overview UPDATED ACTUAL Exam Questions and CORRECT Answers

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
30-03-2025
Written in
2024/2025

Fortran Logical and Control Structures Overview UPDATED ACTUAL Exam Questions and CORRECT Answers .TRUE. - CORRECT ANSWER .FALSE. - CORRECT ANSWER .TRUE - CORRECT ANSWER FALSE - CORRECT ANSWER of a logical constant. == - CORRECT ANSWER /= - CORRECT ANSWER - CORRECT ANSWER - A valid logical constant in Fortran. - A valid logical constant in Fortran. - Missing a period at the end, making it unbalanced. - Has no periods and will be treated as a variable instead

Show more Read less
Institution
Fortran
Course
Fortran

Content preview

Fortran Logical and Control Structures
Overview UPDATED ACTUAL Exam
Questions and CORRECT Answers
.TRUE. - CORRECT ANSWER - A valid logical constant in Fortran.



.FALSE. - CORRECT ANSWER - A valid logical constant in Fortran.



.TRUE - CORRECT ANSWER - Missing a period at the end, making it unbalanced.



FALSE - CORRECT ANSWER - Has no periods and will be treated as a variable instead
of a logical constant.


== - CORRECT ANSWER - A relational operator that means 'Equal to'.



/= - CORRECT ANSWER - A relational operator that means 'Not equal to'.



> - CORRECT ANSWER - A relational operator that means 'Greater than'.



< - CORRECT ANSWER - A relational operator that means 'Less than'.



>= - CORRECT ANSWER - A relational operator that means 'Greater than or equal to'.



<= - CORRECT ANSWER - A relational operator that means 'Less than or equal to'.



Relational operator return value - CORRECT ANSWER - Returns a logical value, either
.TRUE. or .FALSE.

, Relational operators functionality - CORRECT ANSWER - They compare two numerical
or character values and return .TRUE. if the condition is met, otherwise .FALSE.


Difference between == and = - CORRECT ANSWER - == is a relational operator used to
compare values, while = is an assignment operator that sets the value of a variable.


.AND. - CORRECT ANSWER - A logical operator that returns .TRUE. if both conditions
are true, otherwise returns .FALSE.


.OR. - CORRECT ANSWER - A logical operator that returns .TRUE. if at least one of the
conditions is true, otherwise returns .FALSE.


.NOT. - CORRECT ANSWER - A logical operator that negates a logical value, returning
.TRUE. if the condition is false and .FALSE. if the condition is true.


Real numbers comparison issue - CORRECT ANSWER - Real numbers should not be
directly compared using == in Fortran due to finite precision and small rounding errors.


Correct way to test equality of real numbers - CORRECT ANSWER - Use a tolerance
value and check if their absolute difference is smaller than this tolerance.


Comparing real numbers with tolerance - CORRECT ANSWER - Instead of using var_a
== var_b, use abs(var_b - var_a) < tol, where tol is a small number like 1.0e-6.


Order of operations in Fortran - CORRECT ANSWER - The sequence in which operations
are performed in expressions.


Parentheses - CORRECT ANSWER - Used to group expressions in programming.



Exponentiation - CORRECT ANSWER - A mathematical operation that raises a number to
the power of another.

Written for

Institution
Fortran
Course
Fortran

Document information

Uploaded on
March 30, 2025
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$10.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
MGRADES Stanford University
Follow You need to be logged in order to follow users or courses
Sold
1390
Member since
2 year
Number of followers
105
Documents
87389
Last sold
9 hours ago
MGRADES (Genius Brains)

Welcome to MGRADES Exams, practices and Study materials The work speaks for itself Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3.8

232 reviews

5
94
4
50
3
53
2
14
1
21

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions