lab5 Flashcards

(9 cards)

1
Q

The length of the string can be specified by

A

len specifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Character constants are given between

A

a pair of double or single quotes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Concatenation

A

joins different strings in one (//)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

write a program that joins the words

I, love, apples

A

character(len=13)::a,b,c

a=’i’

b=’love’

c=’apples’

print*,a//b//c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

print the word apples in the following (i love apples)

A

character(len=40)::a

a=’i love apples’

print*,a(8:13)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

how to find a word in fortran

A

cword=’test’

n=index(cword,ch)

print*,n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

adjust the text to the right

A

adjustr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

adjust to the left

A

adjustl(a)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

adjust to the center

A

adjustc(a)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly