h*****g 发帖数: 944 | 1 Q1) which of the following statements causes the execution of a program to exit
from the innermost loop?
a) abort
b) break
c) continue
d) exit
是应该选break还是exit?
Q2) which of the following is the correct form for a macro to find the maximum of two variables?
a) #define MAX(A,B) ((A>B)?A:B)
b) #define MAX(A,B)=((A>B)?A:B)
c) #define MAX(A,B)=((A>B)?A:B);
d) #define MAX(A,B)==((A>B)?A:B); | S**I 发帖数: 15689 | 2
exit
break only exits one loop, so......
maximum of two variables?
none, though a) seems correct, but it will fail under certain circumstances
【在 h*****g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Q1) which of the following statements causes the execution of a program to exit : from the innermost loop? : a) abort : b) break : c) continue : d) exit : 是应该选break还是exit? : Q2) which of the following is the correct form for a macro to find the maximum of two variables? : a) #define MAX(A,B) ((A>B)?A:B) : b) #define MAX(A,B)=((A>B)?A:B)
| h*****g 发帖数: 944 | 3 谢谢
circumstances
【在 S**I 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : exit : break only exits one loop, so...... : maximum of two variables? : none, though a) seems correct, but it will fail under certain circumstances
| l*******y 发帖数: 1498 | 4
exit
b,c肯定不是了, a 和 d 不知道有什么区别,exit没用过
maximum of two variables?
b,c,d肯定是不对的了,哪里有这样定义macro的。a在某些情况下也不对,比如MAX(a++
, b)
【在 h*****g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Q1) which of the following statements causes the execution of a program to exit : from the innermost loop? : a) abort : b) break : c) continue : d) exit : 是应该选break还是exit? : Q2) which of the following is the correct form for a macro to find the maximum of two variables? : a) #define MAX(A,B) ((A>B)?A:B) : b) #define MAX(A,B)=((A>B)?A:B)
| S**I 发帖数: 15689 | 5 exit termiates the process normally, abort aborts the process with abnormal
termination.
++
【在 l*******y 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : exit : b,c肯定不是了, a 和 d 不知道有什么区别,exit没用过 : maximum of two variables? : b,c,d肯定是不对的了,哪里有这样定义macro的。a在某些情况下也不对,比如MAX(a++ : , b)
| s*****e 发帖数: 16824 | 6 d, a
exit
maximum of two variables?
【在 h*****g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Q1) which of the following statements causes the execution of a program to exit : from the innermost loop? : a) abort : b) break : c) continue : d) exit : 是应该选break还是exit? : Q2) which of the following is the correct form for a macro to find the maximum of two variables? : a) #define MAX(A,B) ((A>B)?A:B) : b) #define MAX(A,B)=((A>B)?A:B)
| e********s 发帖数: 248 | | t*****j 发帖数: 1105 | 8 Q1 应该选b吧...退出最里面的循环。 d是直接退出程序
exit
maximum of two variables?
【在 h*****g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Q1) which of the following statements causes the execution of a program to exit : from the innermost loop? : a) abort : b) break : c) continue : d) exit : 是应该选break还是exit? : Q2) which of the following is the correct form for a macro to find the maximum of two variables? : a) #define MAX(A,B) ((A>B)?A:B) : b) #define MAX(A,B)=((A>B)?A:B)
| h********0 发帖数: 27 | 9
to exit
maximum of two variables?
Q1. b
Q2. a
【在 h*****g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Q1) which of the following statements causes the execution of a program to exit : from the innermost loop? : a) abort : b) break : c) continue : d) exit : 是应该选break还是exit? : Q2) which of the following is the correct form for a macro to find the maximum of two variables? : a) #define MAX(A,B) ((A>B)?A:B) : b) #define MAX(A,B)=((A>B)?A:B)
| b******n 发帖数: 592 | 10 Q1: b) break
Q2: a)
I think you reall need to read a C book.
exit
maximum of two variables?
【在 h*****g 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Q1) which of the following statements causes the execution of a program to exit : from the innermost loop? : a) abort : b) break : c) continue : d) exit : 是应该选break还是exit? : Q2) which of the following is the correct form for a macro to find the maximum of two variables? : a) #define MAX(A,B) ((A>B)?A:B) : b) #define MAX(A,B)=((A>B)?A:B)
|
|