大学FORTRAN考试试题1

大学FORTRAN考试试题1
大学FORTRAN考试试题1

1.下列叙述中,正确的是(D )

A.语句标号的大小影响程度执行的顺序

B.程序完全按语句出现的先后顺序执行

C.不同程序单位不能有相同的语句标号

D.同一程序单位不能有相同的语句标号

2.下列标识符中,不能作为合法的FORTRAN90标识符的是( C)

A.A3_B3 B.VOID C._123 D.IF

3.下列哪一个为正确的常量( D )

A.123,000 B. 3.5E+2.5 C. TRUE D. “HELLO”

4.若A=2,B=2,I=3,则表达式A**B**I的值为( C )

A. 64

B.12

C.256 D16.

5.圆的直径存放在整型变量D之中,下列计算圆面积的表达式中正确的是( D )

A. 3.14159*(D/2)*(D/2)

B. 3.14159*(D*D/4)

C. 3.14159*(D/2)**2

D. 3.14159*D*D/4

6.下列运算符中,运算优先级最高的是(B )

A. 关系运算

B. 算术运算

C. 逻辑非运算

D. 逻辑与运算

7.下列FORTRAN的表达式中值为0.5的是( C)

A.MOD(4.8,0.5) B.100/20/10 C.50.0/4/25 D.MOD(15,10)/10

8.下列是完整的FORTRAN程序,编译时出错的语句是( C )

A.PROGRAM PRINT B.PARAMETER (PI=3.1415926)

C.PI=PI+1 D.WRITE(*,*)SIN(PI+0.5)

END

9.变量的类型定义中,优先级由高到低的顺序为( A )

A.类型说明语句、IMPLICIT 说明语句、隐含约定

B.隐含约定、IMPLICIT 说明语句、类型说明语句

C.IMPLICIT 说明语句、类型说明语句、隐含约定

D.隐含约定、类型说明语句、IMPLICIT 说明语句

10.“两整数M与N不能同时小于零”的FORTRAN表达式( D )

A.M>=0.AND.N>=0

B.(M.GE.0.AND.N.LT.0).OR.(M.LT.0.AND.N.GE.0)C.(M.LE.0.AND.N.LE.0).OR.(M.LE.0.AND.N.GE.0)D.M.GE.0.OR.N.GE.0

11.下列逻辑表达式描述的是(不会) X.GT.3.AND.X.LT.10.AND.MOD(X,3).NE.0.OR.X.EQ.2.OR.X.EQ.3 A.10以内的素数B.10以内的合数

C.10以内的奇数D.10以内的偶数

12.下面正确的逻辑IF语句是(C )

A.IF(X.EQ.Y)THEN GOTO 10 B.IF M.LT.N PRINT*,M C.IF(ABS(X).LT.1E-6) A=1 D.IF(A.AND.(A.LE.0.0) A=3

13.下列语句中正确的是( C )

A.DATA A,B,C/3*(-10.0)/ B.READ(*,*)(N,A(K),K=1,N)

C.WRITE(*,*)(10,A(K),K=1,10) D.READ(*,*)N,N+1

14. 如果J是整型变量,则循环语句:DO J=5.5,-1.5,-2.5 所执行的循环次数是(C)

A.4 B.3 C.2 D.1

15.如有语言:INTEGER B (-1:-2,3:7),则数组B 中所含的元素个数为( 无答案) A.0 B.10 C.12 D.21

16. 关于FORTRAN90 的CASE结构,SELECT CASE(表达式)中的表达式的数据类型

不允许为( A)

A. 实型

B. 字符型

C. 实型

D. 逻辑性

17.下面符号在FORTRAN90 中表示续行符的是( B)

A.! B. & C. # D. %

18. 下列程序段中,错误的语句是( D)

A.PARAMETER(N=10)

B. INTEGER:: M=20

C.M=M+N

D.PRINT(*, *)M, N

19.

A. FUNCTION

B. SUBROUTINE

C. BLOCK DA TA

D. SUB

20.下列语句中,错误的语句是( D)。

A. PARAMETER(PI=3.1415)

B. DIMENSION A(-5 : 0)

C. INTEGER : : A=10

D. SELECT CAE(3.0)

21. 执行语句:WRITE(* ,‘(1X,A,‘=’,I2)’)“2+3”,2+3后,屏幕上显示的结果

是( 不会)。

A. □5

B. 2+3=□5

C.5=□5 D. 语句不正确

22. 能得到一下数据正确输出结果的FORTRAN 语句是( A )

X=1.34

M=3

Y=1.25

A.100 FORMAT(1X, F6.3,I3,E9.4)

B.100 FORMAT(1X, 2F8.3,I3)

C.100 FORMAT(1X, F8.4,I3,F3.1)

D.100 FORMAT(1X, F8.4,2(1X, I3))

23.设有如下程序,下面描述正确的是( 一次也不循环)

K = 10;DO WHILE(K==0); K=K-1; ENDDO

A.循环执行10次 B. 循环是无限循环

24.C

A, READ(*, *)(I, A(I), I=1, 10)

B, READ(*, *)(B(I, J), I=1, 10, J=1, 10)

C, READ(*, *)N, ( A(I), I=1, N)

D, READ(*, *)(I=1, 10,A(I))

25.为了保证正确的输出数据,格式编辑符Ewd中w与d的关系应该是( B )

A.w>d B.w>d+2 C.w>d+4 D.w>d+6

26.若定义了语句函数S(X, Y, Z)=X+Y+Z 后,S(2.0 1.0 3.0)的值为( 6.0)

A.17.0

B.11.0

C.20.0

D.29.0

27.下列说法中正确的是( D)

A.块IF结构中的THEN块或ELSE块不能是空块

B.块IF结构中至少要有一个ELSEIF语句或ELSE语句

C.每一个ELSE语句要有一个对应的ENDIF语句

D.一个块IF结构中只能有一个ENDIF语句

28.在子程序SUB中,下列各语句的正确顺序是(A )1. ④要放③前2.见P129:①为语句函数,语句函数是非执行语句,语句函数的定义语句要放在一个程序单位的所有其他说明语句之后,放在所有可执行语句之前,所以②在①前

①F(A, B, C)=A*A+B*C ②IMPLICIT INTEGER(F, A, B, C)

③REAL D(M), E(N) ④PARAMETER(M=4)

⑤SUBROUTINE SUB(E, N)

A.⑤④③②①

B.⑤②④③①

C.⑤③②④①

D.⑤②③④①

答案应该正确,有异议可以大家一起讨论,或Q我,树连

大学英语B级考试练习题

一、交际英语 1.--Have a cup of tea, ? --Thanks a lot. A don’t you B haven’t you C shall me D will you 2.-- ? --He is not very well. A Who is he B What is he C How is he D Who he is 3.—Why didn’t you come to my birthday party yesterday? -- . A Excuse me, my frie nd sent me a flower B Fine, I never go to birthday parties C Well, I don’t like birthday parties D Sorry, but my wife had a car accident 4.—This box is too heavy for me to carry upstairs. -- A You may ask for help B I’ll give you a hand C Please do me a favor D I’d come to help 5. -Could I ask you a rather personal question? -Of course, . A good idea B that’s right C never mind D go ahead 二、词汇与结构 6.I don’t know the park, but it’s to be quite beautiful. A.said B.old C.spoken D.talked 7.Mike is better than Peter swimming. A.for B.at C.on D.in 8.The young lady coming over to us our English teacher; the way she walks tells us that! A.must be B.can be C.woul be D.could be 9.Had you come five minutes earlier, you the train to Birmingham. But now you missed it. A.Would catch B.would have caught C.Could catch D.Should catch 10.Eggs, though rich in nourishments, have of fat. A.a large number of B.the large number C.a large amount D.the large amount 三、阅读理解 Passage 1 Snowflakes look like white stars falling from the sky. But there have been times when snow has looked red, green, yellow, or black. There have been snowflakes of almost every color. Think how it would seem to have colored snowflakes coming down all around you. Black snow fell in France one year. Another year grey snow fell in Japan. It was found that the snow was mixed with ashes. his made it look dark. Red snow had come down in other countries. When this happened, the snow was mixed with red dust. Most snow looks white, but it is really the color of ice. Snow is ice that comes from snow cloud. Each snowflake begins with a small drop of frozen water. More water forms around this drop. The way the water freezes gives the snowflakes its shape. No two snowflakes are ever just the same size or shape. Sometimes the snowflakes are broken when they come down. Other snowflakes melt as they fall. All snowflakes are flat and have six

大学英语一期末考试题以及答案(完整版)

精心整理 大学英语(一) 行政班级分级班级姓名学号 I II III IV V 总分 (请将答案写在答题卡上) 得分 PartⅠListening Comprehension (15%) 听力题(共15题,每题1分,共15分) Directions: This part is to test your listening ability. It consists of 3 sections. Section A Directions:There are 5 recorded questions in it. After each question, there is a pause. The question will be spoken only once. 1. A. A testing system. B. A monitor system. C. A measuring system. D. A control system. 2. A. Car prices. B. Car services.

C. The company’s business. D. The company’s culture. 3. A. It’s easy to do. B. It’s challenging. C. He can get a high pay. D. He did the same job before. 4. A. She’ll meet a friend. B. She’ll take a flight. C. She’ll attend an interview at 5:00. D. She’ll see a doctor before 5:00. 5. A. She will report the complaint to the manager. B. The manager refused to talk to the man. C. The manager was on a business trip. D. She will deal with the complaint. Section B Directions:There are 2 recorded dialogues in it. After each dialogue, there are some recorded questions. Both the conversations and questions will be spoken two times. Conversation 1

MATLAB 与C C + + 、FORTRAN语言混合编程

MATLAB 与C/ C + + 、FORTRAN语言混合编程摘要:对MATLAB 与C/ C + + 和FORTRAN 语言进行混合编程的常用方法进行了介绍,分析了其实现方式和各自的利弊,并用实例对MEX 文件实现方式进行了较详细的论述. 关键词: MATLAB ; C/ C + + ; FORTRAN ; 混合编程 中图分类号: TP313 文献标识码: A 文章编号:16722948X(2004) 0620547205 1 混合编程的意义及其实现方式 1. 1 混合编程的意义 MATLAB 语言具有功能强大、开发效率高等诸 多优点, 已在工程实际中得到广泛应用, 但是与 FORTRAN、C/ C + + 等语言相比,其执行效率较低, 特别是当程序中含有大量循环语句(例如迭代计算) 时,MATLAB 就有些力不从心, 速度很慢, 而运用 FORTRAN 等擅长数值计算语言进行编程,其运行效 率高. 一方面,如果放弃MATLAB 强大功能和数量 众多的应用工具箱,无疑是资源的极大浪费. 另一方 面,针对工程实际,人们用FORTRAN、C/ C + + 语言 已编写了大量实用程序,如果将其重新改写成M 文 件移植到MATLAB 环境中,不仅要花费大量的时间 和精力,而且有时还降低了其运行效率. 可否将二者 优势互补呢? 混合编程就是其有效的解决途径. 1. 2 混合编程的实现 正是考虑到上面这些原由,MATLAB 系统提供 了其应用程序接口(Application Program Interface) 来 解决这些问题. API 主要包括3 部分:MEX 文件——— 外部程序调用接口,用来在MATLAB 环境下调用 FORTRAN、C/ C + + 语言编写的程序;MAT 文件应 用程序———数据输入输出接口,用于MATLAB 系统 与外部环境之间互传数据; 计算引擎函数库——— MATLAB 处于后台作为一个计算引擎,与其它应用 程序建立客户机/ 服务器关系,在其它应用程序中调 用[1 ,2 ] . 1. 2. 1 MEX 文件 MEX 文件是按照一定格式,用FORTRAN 或C/ C + + 语言编写的源程序,在MATLAB 下借助相应 的编译器,生成的动态链接函数的统称. 在Windows 操作系统下,是用MATLAB 附带的批处理mex. bat 来编译生成文件后缀名为. dll (Dynamic Link Li2 brary) 动态链接库文件,该文件可在MATLAB 环境 下,像命令函数一样直接运行和调用,使用起来极为 方便. 采取MEX 文件方式,是重复利用已有FOR2 TRAN、C/ C + + 程序,让MATLAB 和FORTRAN、

大学英语3级考试真题

大学英语 3 级考试真题 一、听力测试(本大题满分25 分,每小题 1 分 ) 做题时,先将答案划在试卷上。录音内容结束后再将试卷上的答案转涂到答题卡上。 第一节 听下面的 8 段短对话。每段对话后有一个小题,从每小题 A 、B 、 C 三个选项中选出一个最佳答案。 听每段对话只读一遍。 1.What color skirt does Linda like? A. Red. B. Green. C. Blue. 2. How is the weather now? A. Sunny. B. Cloudy. C. Rainy. 3. How did they spend their weekend? A. They had a school trip. B. They cleaned up the street. C. They studied for a test. 4. Where will Peter go on vacation? A. To Canada. B. To Australia. C. To Japan. 5. What does Mike’ s father want him to be? A. A soldier. B. A pilot. C. A doctor. 6. Who will repair the bicycle? A. Bill's brother. B. Mrs. Brown's brother. C. Bill. 7. How much is the jacket now? A. 60 dollars. B. 90 dollars. C. 120 dollars. 8. What do we know about Jenny from the conversation? A. She is worried about a coming test. B. She is working hard at physics. C. She didn't pass the recent test. 第二节 下面你将听到 5 段对话或独白。每段对话或独白后有几个小题,从每小题A、B、C 三个选项中,选出一个与你听到的对话或独白内容相符的问题的答案。对话或独白读两遍。 听第一段材料回答 9 至 11 小题。 9. How many people will sit at the table? Xk b https://www.360docs.net/doc/0110295799.html, A. Two. B. Three. C. Four. 10. What is the restaurant famous for? A. Noodles. B. Chicken soup. C. Dumplings. 11. What would they like to drink? A. Fish soup. B. Beer and coke. C. Milk. 听第二段材料回答第12 至 14 小题。 12. Have the speaker ever seen each other? A. Yes, they have. B. No, they haven't. C. We don't know. 13. How often does Lucy play tennis? A. Twice a week. B. Every morning. C. Never. 14. When may they meet again? A. Next morning. B. Next weekend. C. Next weekday. 听第三段材料回答第15 至 17 小题。 15. What's the relationship ( 关系 ) between the two speakers? A. Friends. B. Teacher and student. C. Father and daughter

大学英语B级期末考试题与答案

Test Seven, Part Ⅰ Listening Comprehension (15 minutes) Directions: This part is to test your listening ability. It consists of 3 sections. Section A Directions: This section is to test your ability to give proper answers to questions. There are 5 recorded dialogues in it. After each dialogue, there is a pause. The questions will be spoken two times. When you hear a question, you should decide on the correct answer from the 4 choices marked A) , B) , C) and D) given in your test paper. Then you should mark the corresponding letter on the Answer Sheet with a single line through the center. 1. A) Mary is not here, because she is ill. B) No, it isn't. C) Yes, it is. D) We are ready. 2.A) I am not hungry. B) But the price is too high. C) I like doing some cooking. D) I want to have a rest. 3.A) No, you can't. B) Yes, you can. C) I want a seat near the window. D) That's all right. 4. A) Thank you. B) I agree with you. C) Me, too. D) A little better. 5.A) It's snowing now. B) I like it. C) Yes, the grounds are white. D) it sounds good. Section B Directions: This section is to test your ability to understand short dialogues. There are 5 recorded dialogues in it. After each dialogue, there is a recorded question. Both the dialogues and questions will be spoken two times. When you hear a question, you should decide on the correct answer from the 4 choices marked A) , B) , C) and D) given in your test paper. Then you should mark the corresponding letter on the Answer Sheet with a single line through the center. 6.A) $16. B) $32. C) $8. D) $64. 7.A) Patient and doctor. B) Waitress and customer. C) Wife and husband. D) Secretary and boss. 8. A) Worried and frightened. B) Quite unhappy. C) Very relaxed. D) Angry with the professor. 9. A) The woman was late for coming. B) The woman asked the man to wait. C) The man was annoyed by her late coming. D) The man was quite all right. 10. A) Young people are quick in making decisions. B) They seldom stay long on one job. C) They are easy to lose jobs. D) They are too eager to succeed. Section C Directions: In this section you will hear a recorded passage. The passage is printed in the test paper, but with some words or phrases missing. The passage will be read three times. During the second reading, you are required to put the missing words or phrases on the Answer Sheet in order of the numbered blanks according to what you have heard. The third reading is for you to check your writing. Now the passage will begin. Dick was a sailor on a big ship. It went to Japan and Australia, so Dick was often on the ship for some months at a time. When he (11) up in the morning and looked out, he only (12) the sea, or sometimes a port. When he was twenty-three, Dick married and bought a small (13) with a garden in his wife's town. It was (14) away from the sea. Then he had to go back to his ship, and was away (15) home for two months. He went from the port to the town by bus, and was very happy to see his wife again.

2016年度大学英语三级考试精选题

2016年大学英语三级考试真题-英语三级考试A级及答案 Part II Structure (15 minutes) 第二部分结构(15分钟) Directions: This part is to test your ability to construct grammatically correct sentences. It consists of 2 sections. 方向:这部分是测试你的语法正确的句子的能力建设。它由2个部分组成。 Section A 第1课时 Directions: In this section, there are 10 incomplete sentences. You are required to complete each one by deciding on the most appropriate word or words from the 4 choices marked A), B), C) and D). Then you should mark the corresponding letter on the Answer Sheet with a single line through the center. 方向:在这一节,有10个不完整的句子。您需要完成每一个决定的最适当的词或词的4个选择标记为A,B),C和D)。这个你应该在答题纸上用中间一行标出相应的字母。 16. We must find a way to cut prices ________ reducing our profits too much. A) without B) despite C) with D) for 16。我们必须找到一个方法来降低价格________减少我们的利润太多。 a)没有b)尽管c)与d) 17. She didn’t know ________ to express her ideas in English clearly in public. A) which B) why C) what D) how 17。她不知道________表达自己的想法用英语清楚的公共。A)B)为什么C)什么D)如何 18. ________ the weather improves, we will suffer a huge loss in the tourist industry. A) As B) Since C) While D) Unless 18。________天气好转,我们会在旅游业的巨大损失。a)作为b)由于c)d,除非 19. We are happy at the good news ________ Mr. Black has been awarded the Best Manager. A) that B) which C) what D) whether 19。我们很高兴听到这个好消息,________布莱克先生被授予“最佳经理。A),B),C)D)是什么 20. It is important that we ________ the task ahead of time. A) will fish B) finished

大学英语一级期末考试试题

大学英语一级期末考试试题(B卷) 课程名称:《大学英语读写I 》任课教师签名: 大学英语教学部(一教) 出题教师签名: 题库审题教师签名: 张文君_____ 考试方式(闭)卷适用专业 07级化工与制药学院、材料学 院、理学院、经管学院和 法学院共58个班 考试时间( 120 )分钟 Part I. Reading Comprehension (2’X20=40’) Directions: Read the following three passages carefully and do the multiple-choice questions. Passage One Dogs are social animals and without proper training, they will behave like wild animals. They spoil your house, destroy your belongings, bark excessively, fight other dogs and even bite you. Nearly all behavior problems are perfectly normal dog activities that occur at the wrong time or place or are directed at the wrong things. The key to preventing or treating behavior problem is learning to teach the dog to redirect its normal behavior problems, but it is the foundation for solving just about any problem. Training opens up a line of communication between you and your dog. Effective communication is necessary to instruct your dog about what you want it to do. Training is also an easy way to establish the social rank order. When your dog obeys a simple request of “come here, sit”, it is showing obedience and respect for you. It is necessary to establish yourself as top dog or leader of the dog pack by using extreme measures. You can teach your dog its subordinate role by teaching it to show submission to you. Most dogs love performing tricks for you pleasantly if they accept that you are in charge. Tainting should be fun and rewarding for you and your dog. It can enrich your relationship and make living together more enjoyable. A well-trained dog is more confident and more safely allowed a greater amount of freedom than an untrained animal. 1. Behavior problems of dogs are believed to _______. A) worsen in modern society B) be just part of their nature C) occur when they go wild D) present at threat to the community 2. The primary purpose of obedience training is to ________. A) enable the dog to regain its normal behavior B) teach the dog to perform clever tricks C) make the dog aware of its owner’s authority D) provide the dog with outlets for its wild behavior 3. Effective communication between a dog and its owner is _______. A) an extreme measure in obedience training B) a good way to teach the dog new tricks C) the foundation for dogs to perform tasks D) essential to solve the dog’s behavior problems 4. Why do pet dogs love performing tricks for their masters? A) To show their willingness to obey. B) To show their affection for their masters. C) To avoid being punished. D) To win leadership of the dog pack. 5. When a dog has received effective obedience training, its owner________. A) will enjoy a better family life. B) can give the dog more freedom C) can give the dog more rewards D) will have more confidence in himself Passage Two: Once upon a time there was a wise man that used to go to the ocean to do his writing. He had a habit of walking on the beach before he began his work. One day he was walking along the shore. As he looked down the beach, he saw a human figure moving like a dancer. He smiled to himself at the thought of someone who would dance on the beach. So he began to walk faster to catch up. As he got closer, he saw that it was a young man and the young man wasn't dancing, but instead he was reaching down to the shore, picking up something and

大学生心理健康案例分析

大学生心理健康案例分析 案例一: 前不久,江西中医学院科技学院2006级临床专业的学生李某,在其学校附近与男友发生争执并提出分手,遭男友割断喉管后死亡。据目击者称,事发时,杨某拿着一把十余厘米的刀追死者,并朝其喉咙处割去,杀死女友后,杨某抱着死者久久不肯离去,直到110民警来到现场,将其带走。 大学生心理发展尚未稳定,踏入大学,就相当于踏入半个社会,从而他们感到不适应,害怕失败、害怕拒绝,心理上的矛盾冲突尤为突出。这些矛盾解决不好,就可能成为大学生犯罪的心理基础。目前,大学生犯罪心理复杂多样,其突出表现在犯罪动机、价值观念、人格障碍、个体心理偏差等方面。种种原因表明,这些障碍与偏差导致的犯罪心理与社会就业、家庭经济、个人恋爱所造成的心态失衡、心理变态、心理疾病有关。近几年来,大学生打架斗殴、杀人伤害、强奸之类的人身伤害犯罪案件时有发生并呈上升趋势,目前已是仅次于大学生盗窃犯罪的第二大类案件,这种现象值得关注和警惕。心病终需心药医,心理专家呼吁:学校、家庭乃至社会都要在学习、生活、恋爱、就业等方面,更多地给予大学生一些心理关照和疏导,才能减缓和化解大学生的心理。大学生心理发展尚未稳定,踏入大学,就相当于踏入半个社会,从而他们感到不适应,害怕失败、害怕拒绝,心理上的矛盾冲突尤为突出。这些矛盾解决不好,就可能成为大学生犯罪的心理基础。目前,大学生犯罪心理复杂多样,其突出表现在犯罪动机、价值观念、人格障碍、个体心理偏差等方面。种种原因表明,这些障碍与偏差导致的犯罪心理与社会就业、家庭经济、个人恋爱所造成的心态失衡、心理变态、心理疾病有关。 案例二: 小A与小B是某艺术院校大三的学生,同在一个宿舍生活。入学不久,两个人成了形影不离的好朋友。A活泼开朗,小B性格内项,沉默寡言,小B逐渐觉得自己像一只丑小鸭,而小A却象一位美丽的公主,心理很不是滋味,她认为A处处都比自己强,把风头占尽,时常以冷眼对小A。大学三年级,小A 参加了学院组织的服装设计大赛,并得了一等奖,小B得知这一消息先是痛不欲生,而后妒火中烧,趁小A不在宿舍之机将A的参赛作品撕成碎片,扔在小A的床上。小A发现后,不知道怎样对待小B,更想不通为什么她要遭受这样的 对待? 小A与小B从形影不离到反目为仇的变化令人十分惋惜。引起这场悲剧的根源,关键是个字—— 嫉妒 既然嫉妒心理是一种损人损己的病态心理,严重影响自己的身心健康,克服的方法有:1.认清嫉妒的危害,嫉妒别人的人一方面影响了自己的身心健康,另一方面由于整日沉溺与对别人的嫉妒之中,没有充沛的精力去思考如何提高自己,恰恰有继续延误了自己的前途。2.克服自私心理。要根除嫉妒心理,首先根除这种心态的“营养基”——自私。只有驱除私心杂念拓宽自己的心胸,才能正确地看待别人,悦纳自己。3.正确认知。客观公正地评价别人,也要客观公正地评价他人。一个人只要客观地认识自己的优势和

C语言转换为fortran语言

C/C++采用的是缺省调用约定是STDCALL约定.在C程序中,可以在函数原型的声明中使用_stdcall关键字来指明过程采用STDCALL调用约定。 Fortran过程采用的缺省标识符是,全部大写的过程名加上“_”前缀和“@n”后缀。在C程序中保留标识符的大小写。编译程序会给采用STDCALL约定的过程标识符加上“_”前缀和“@n”后缀。 Fortran过程缺省的参数传递方式是引用方式是。对于下面这个Fortarn过程:SUBROUTINE ForSub(ivar,rvar) INTEGER ivar REAL rvar WRITE(*,*) ivar,rvar END 在C语言程序中应给出过程的函数原型及调用方式为: void main() { extern void__stdcall FORSUB(int*I,float*f); int iCV AR=1; float rCV AR=2.0; FORSUB(&iCV AR,&rCV AR); } 在C++中调用Fortan的过程,在声明函数原型时需要用extern“C”语句,以避免C++编译程序对标识符的修饰;并且C++也可以通过引用方式传递参数。对于上面的Fortran过程,C++程序应给出的函数原型及调用方法是: void main() { extern “C”{void__stdcall FORSUB(int*I,float*f);} int iCV AR=1; float rCV AR=2.0; FORSUB(&iCV AR,&rCV AR); } 另外,也可以在Fortran中用!MS$ATTRIBUTES编译伪指令来改变Fortran子过程的调用约定,以便于被其他语言的程序调用。在下面的例子中,过程ForSub具有C语言的调用约定。 SUBROUTINE ForSub(ivar,rvar) !MS$ATTRIBUTES C::ForSub INTEGER ivar REAL rvar WRITE(*,*) ivar,rvar END 这样,这个过程使用的是C调用约定,并且参数传递方式也变为传值方式,过程的标识符变为全部小写且有_前缀而无后缀的方式。在C语言源程序中的函数原型及调用方法为:void main() { extern void FORSUB(int ivar,float rvar); int iVar=1;

大学英语三级考试试题[1]

16. The local government warned the citizens water directly from the tap unless it is boiled. A) not drink B) not drinking C) do not drink D) not to drink 17. His face looks but I can’t remember his name. A) similar B) alike C) likely D) familiar 18. I went to the dentist’s yesterday, and had two teeth . A) pulling B) pulled C) be pulled D) to pull 19. One man was instantly killed and three were in a traffic accident last night. A) damaged B) harmed C) injured D) ruined 20. This is your letter to me. Do you object to the whole class? A) to my reading it B) to read it C) me to read it D) me reading it 21. The economic study on market must lay an emphasis on the relationship between supply and . A) demand B) as great as C) shortage D) sale 22. The population of the region has doubled in the past ten years. A) larger than B) as great as C) more than D) as many as 23. The company decided to a new managing system for higher efficiency. A) adjust B) adapt C) adopt D) admit 24. This is Mr. Evans, invention has helped hundreds of deaf people. A) whose B) which C) that D) whom 25. There is always excitement at the Olympic Games when a previous record is . A) matched B) broken C) kept D) announced 26. the story, Mary decided that the new film was not really worth seeing. A) Have been told B) Having been told C) Being told D) Been told 27. We must our minds where to go for our holiday this year. A) make out B) make for C) make off D) make up 28. Only when he finished the task that he had made a mistake. A) he then realized B) did he realize C) does he realize D) he did realize 29. The policeman stopped my car because the engine heavy smoke. A) gave off B) gave out C) gave up D) gave away 30. I bought a new house last year, but I my old house yet, so at the moment I have two houses. A) didn’t sell B) hadn’t sold C) haven’t sold D) don’t sell 31. Our neighbor is a helpful person he would be right there when you need help. A) so … that B) such … as C) such … that D) so … as 32. He cannot play tennis here until the manager recommends that he a member of the club. A) is B) has been C) will be D) be 33. Take the raincoat with you it rains.

相关文档
最新文档