vault backup: 2024-11-05 11:43:30

This commit is contained in:
zleyyij
2024-11-05 11:43:30 -07:00
parent 5c37c59fa8
commit 0940db21c8
2 changed files with 12 additions and 1 deletions

View File

@ -34,6 +34,17 @@ int main(void)
> **15.** Suppose that a program needs to display messages in either English, French, or Spanish. Using conditional compilation, write a program fragment that displays one of the following three messages, depending on whether or not the specified macro is defined.
```c
#ifdef ENGLISH
#define MESSAGE "Insert Disk 1"
#endif
#ifdef FRENCH
#define MESSAGE "Inserez Le Disque 1"
#endif
#ifdef SPANISH
#define MESSAGE "Inserte El Disco 1"
#endif
printf(MESSAGE);
```