3
1 | Page ENG. Keroles Shenouda Eng. Mahmoud Farouk Eng. mina nagy bendary https://www.facebook.com/groups/embedded.system.KS/ Session 8 exercise 1. What will be output if you will compile and execute the following c code? void main(){ printf("%s",__DATE__); } (a) Current system date (b) Current system date with time (c) null (d) Compiler error (e) None of these 4. . 5.

Session 8-exersice

Embed Size (px)

Citation preview

Page 1: Session 8-exersice

1 | P a g e

ENG. Keroles Shenouda Eng. Mahmoud Farouk Eng. mina nagy bendary https://www.facebook.com/groups/embedded.system.KS/

Session 8 exercise

1. What will be output if you will compile and execute the following c code?

void main(){ printf("%s",__DATE__); } (a) Current system date (b) Current system date with time (c) null (d) Compiler error (e) None of these

4.

. 5.

Page 2: Session 8-exersice

2 | P a g e

ENG. Keroles Shenouda Eng. Mahmoud Farouk Eng. mina nagy bendary https://www.facebook.com/groups/embedded.system.KS/

6.

10. What is the Output

Page 3: Session 8-exersice

3 | P a g e

ENG. Keroles Shenouda Eng. Mahmoud Farouk Eng. mina nagy bendary https://www.facebook.com/groups/embedded.system.KS/

Answers 1. Answer: (a)

Explanation:

__DATE__ is global identifier which returns current system date.

2. Answer: (b)

Explanation:

If you want to write macro constant in new line the end with the character \.

3. B

4.

5. B 6. D

7.

9. A

9

88

1100