Sign in
Please select an account to continue using cracku.in
↓ →
Consider the following code written in a pass-by-reference language like FORTRAN.
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Subroutine swap (ix,iy)
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β it = ix
Β Β Β Β Β Β Β Β Β Β Β Β Β Β L1:Β Β Β ix = iy
Β Β Β Β Β Β Β Β Β Β Β Β Β Β L2:Β Β Β iy = it
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β end
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ia = 3
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β ib = 8
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β call swap (ia, ib + 5)
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β print*, ia, ib
Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β end
S1: The compiler will generate code to allocate a temporary nameless cell, initialize it to 13, and pass the address of the cell to swap
S2: On execution the code will generate a runtime error on line L1
S3: On execution the code will generate a runtime error on line L2
S4: The program will print 13 and 8
S5: The program will print 13 and -2
Β Β Β Β Β Exactly the following set of statement(s) is correct:
Create a FREE account and get:
Educational materials for CAT preparation
Ask our AI anything
AI can make mistakes. Please verify important information.
AI can make mistakes. Please verify important information.