RLHaides 2016-11-07 14:58 采纳率: 75%
浏览 978

这道题为什么这样使用p却没有报错

  1. What is the output of this C code?

  2. #include

  3. struct

  4. {

  5.    int k;
    
  6.    char c;
    
  7. } p;

  8. int p = 10;

  9. int main()

  10. {

  11.    p.k = 10;
    
  12.    printf("%d %d\n", p.k, p);
    
  13. }

a) Compile time error
b) 10 10
c) Depends on the standard
d) Depends on the compiler
View Answer

Answer:a

  • 写回答

3条回答 默认 最新

  • Dozemin 2016-11-07 15:26
    关注

    答案是A, 不就是说编译时错误么??

    评论

报告相同问题?