德尔福软件类笔试题和面试题答案目(2)

招聘笔试题2018-11-22李天扬老师

  c) Within a module: A static function can only be called by other functions within that module

  6. Embedded systems always require the user to manipulate bits in registers or variables. Given an integer variable a, write two code fragments.

  The first should set bit 5 of a. The second shnuld clear bit 5 of a. In both cases, the remaining bits should be unmodified.

  7. What does the following function return?

  char foo(void)

  {

  unsigned int a = 6;

  iht b = -20;

  char c;

  (a+b > 6) ? (c=1): (c=0);

  return c;

  }

  8. What values are printed when the following C program is executed?

  int i = 8;

  void main(void)

  (

  9. What will be the output of the following C code?

  main()

  {

  int k, num= 30;

  k =(num > 5 ? (num <=10 ? 100:200): 500);

  printf("%d", k);

  }

  10. What will the following C code do?

相关推荐

猜你喜欢

大家正在看

换一换