Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6762027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:15:51+00:00 2026-05-26T14:15:51+00:00

I encountered this problem while solving a practice test Consider the following code written

  • 0

I encountered this problem while solving a practice test

Consider the following code written in a pass-by-reference language like
FORTRAN and these statements about the code

  subroutine swap(ix,iy)
    it = ix
    ix = iy    ! line L1
    iy = it    ! line L2
  end

  program main
    ia = 3
    ib = 8
    call swap (ia, ib+5)
    print *, ia, ib
  end program

Statements:

  1. The compiler will generate code to allocate a temporary nameless cell,
    initialize it to 13, and pass the address of the cell swap
  2. On execution the code will generate a runtime error on line L1
  3. On execution the code will generate a runtime error on line L2
  4. The program will print 13 and 8
  5. The program will print 13 and -2

Which of the above the above statement(s) is/are correct.

I think S1 and S4. Could anyone please confirm? TIA

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:15:52+00:00Added an answer on May 26, 2026 at 2:15 pm

    Yes, S1 and S4 are correct.

    Also,

    S0a: The file is not compilable as is because the L1: and L2: are syntax errors. 🙂

    S0b: Strictly speaking, speaking of FORTRAN as a pass-by-reference language is incorrect:

    • The name of the language is Fortran

    • Pass by reference is an implementation detail that is not specified in the standard. Copy-in, copy-out is another possible implementation. Also, some newer Fortran language features (F90+) in practice imply an implementation which is neither pass-by-reference nor copy-in-copy-out. See e.g. pointer as a dummy argument and http://software.intel.com/en-us/blogs/2009/03/31/doctor-fortran-in-ive-come-here-for-an-argument/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I encountered this problem while solving a practice test Consider this C code to
I've encountered this problem (while trying to add SQL Server Database (.mdf) file to
I encountered this problem while preparing for my exams. Given two arrays of numbers
I encountered a code design problem while working on a small application. In terms
I've encountered a problem while writing code in Delphi. Namely I can't get acces
I'm working on a practice problem set for C programming, and I've encountered this
While I was learning kohana and making single article, i encountered this problem. I
Hi i encountered this problem whereby when i initialized my String[], there seems to
Uhm I'm not sure if anyone has encountered this problem a brief description is
Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.