notes/education/software development/ECE1400/Chapter 2 Exercises.md
2024-09-07 13:20:57 -06:00

826 B

#2

Directives:

#include <stdio.h>

Statements:

	printf("Parkinson's Law: \nWork expands so as to ");
	printf("fill the time\n");
	printf("available for its completion.\n");
	return 0;

Output:

Parkinson's Law: 
Work expands so as to fill the time
available for its completion.

#5

(A): 100_bottles is not a legal C identifier because C identifiers cannot start with a number.

#6

Double underscores are typically used to denote statements reserved by the compiler, and in C++, double underscores are used in name mangling and so they cannot be used entirely. More subjectively, it can be hard to tell how many underscores are present.

#7

(A): for (E): while

#8

Work:

  1. answer
  2. =
  3. (
  4. 3
  5. *
  6. q
  7. -
  8. p
  9. *
  10. p
  11. `)
  12. /
  13. 3
  14. ;