您的位置:首页 > 编程语言 > C语言/C++

Question 4: Which of the following statements correctly describe the code below in C++?

2010-11-30 10:24 1356 查看
#define language 437 //Line 1
#if language < 400
#undef language //Line 2
#else //Line 3
#define language 850 //Line 4
#ifdef language //Line 5
printf("%d", language); //Line 6
#endif
#endif

A. An error or warning will occur on Line 6 because a macro cannot be used as
part of a preprocessor directive.
B. An error or warning will occur on Line 2 because #undef is not a valid preprocessor directive.
C. An error or warning will occur on Line 4 because language has already been defined.
D. If Line 1 is changed to #define language 300, Line 6 will print "850".
E. An error or warning will occur on Line 3 because #else can only be used as the last conditional in the chain.

A C
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐