Академический Документы
Профессиональный Документы
Культура Документы
30.04.2013 17:40
There are 30 questions (each 3.4 points) for a total of 100 points.
Exam Type: A
All questions are multiple choice, no points will be lost for wrong answers.
Name:
Student ID:
Section:
Signature:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
7) What is printed by the following Fortran
1) Which operator below has highest
program?
precedence in a fortran expression?
a=2 ; b=3
if(a-3)10,20,10
a).AND. b).OR c).EQV. d).NOT. e) .NEQV.
10 if(a-2)40,50,40
.
50 print*,'a' ; goto 60
20 print*,'b' ; goto 60
2) What is the result of the following
40 print*,a,b
expression?
60 stop
(2*7/3+mod(7,3)+ 2**1**3)/50
End
a)0
b) 7
c) 13
d) 7.33333
e) 13.33333
4.0
b)
5.0
c) 5
d) 2.0
e) 10.0
b) -2
d) i/j*i
e) i-i/j*i
6) What is the FORTRAN equivalent of the
following algebraic assignment statement?
y = a1/2
a)
b)
c)
d)
e)
y
y
y
y
y
=
=
=
=
=
a ** 1.0 / 2.0
a ** (1 / 2)
a ** (1.0/2)
(a ** 1.0) / 2.0
(a ** 1)**2
a) a
b) 2
c) b
d) 3
e) 2
b) -1
c) -2
d) -3
e) 1
b) 5
c) Error
d) F
e) T
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
11) What is the output of the following
program?
integer x,y,z
x=5; y=50; z=500
if(.NOT.(x.NE.y))then
x=50
else if(3<=4.OR.y.EQ.z)then
y=500
else if(.NOT.y/=z/10)then
z=5000
endif
print*,x+y+z
end
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
15) What is the output produced by the
following program?
i=5
goto(1,2,3)1-i
1 print*,1
2 print*,2
3 print*,3
End
a) 1250
16)An algorithm is
b) 5550
c) 1005
d) 5505
e) 600
HAnkara
6HAnkara
An .AND. kara
Han//Hkara
2Han//4Hkara
b)3 8
5 5
c)3 6 5 5
d) 3 6
5 5
e) 5 5
1 7
b)0.0 0
e)0.5 0.5
c)0 0.0
a)No Output b) 1
2
3
c) 2
3
d) 3
e)
-4
a) 0.0 b)0
c)0.5
d)12.5
e) Error
a)
0.0
b) 0
c) Error d) 12.5 e)
0.5
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
20) What is the content of variable N after
the execution of the following code?
integer X
real N
X=5
N=X/(2.0/X)
print*,N; end
a)
0.0 b)
c) 0.5 d) Error e)
a)
b)
c)
d)
e)
12.5
b) 0.5
c)
d)
e)
i=5
if(1-i)1,2,3
1 print*,1
2 print*,2
3 print*,3
End
b) 1
2
3
c) 2
3
d) 3
b) 3.142 314.16
739
c) 3.14 314.16
739-55
d) 3.14 314.16
739-558
e) 3.14 314.16
739***
a)
b)
c)
d)
e)
BB23***BB729
23BB****BB729
BB23****729
BB23***xx729
BB23-1572x729
Write(*,20)x1,x4,x3,x2
20 format(f6.1,f5.3,f6.3,f2.1)
-4
a) 3.14 1x 314.15
739****
<1,2>
1+2i
1.0+2.0*sqrt(-1)
<1.0 , 2.0>
Error
read(*,75) K1,K2,K3,K4
75 format(I3,4x,I3,2I4)
Write(*,86)K1,K3,K4,K2
86 format(I4,I3,I4,2x,I3)
a)No
Output
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
24) What will be printed by the following
program?
complex a
a=(1,2)
print*,a
end
a)
b)
c)
d)
e)
0367.22.32B-0.3673.
B367.33.32B**.367**
B367.32.320-0.367**
0367.33.320-0.368***
B367.23.320-0.368****
-25.63E+01
-256.300
-2.563E+02
-2563.E-01
0.256E+03
A A A A A A A A A A A A A A A A A A A A A A A
28) What is the output produced by the
following program?
!integer pi
5 format("pi=",f6.4)
pi=3.14159
write(*,5)pi
end
a)
b)
c)
d)
e)
pi=3
pi=3.0000
pi=3.1415
pi=3.1416
pi=******
A A A A A A A A A A A A A A A A A A A A A A A