arkadaşlar yapamadım bu soruyu yardım eder misiniz
You should create the following files:
myParameters.h
linux.h
windows.h
hostSelect.h
main.c
Expected contents of these files are specified below:
myParameters.h: Define two macros named WINDOWS and LINUX. Depending on whether
values of these macros are one or zero, the output will change.
linux.h: Define a macro called HOST with the value of “Linux”.
windows.h: Define a macro called HOST with the value of “Windows”.
hostSelect.h: Implement a conditional macro structure. If WINDOWS is 1, windows.h will be
included. If LINUX is one, linux.h will be included. If both WINDOWS and LINUX are zero,
define the macro HOST with the value of “hostUndefined”.
main.c: Create a main function where the value of macro HOST is displayed. Depending on the
values of macros (WINDOWS and LINUX) you are expected to observe the output for three
different cases as below:
Host is Linux (if LINUX is one and WINDOWS is zero)
Host is Windows (if WINDOWS is one and LINUX is zero)
Host is hostUndefined (if both WINDOWS and LINUX are zero)
Generate expanded version of your C code by using -E flag in gcc (gcc -E main.c). There should
be three different versions of the expanded code depending on the values of the macros described
above. What are the differences between original file and the expanded version and why are
there any differences? You should include your answer in a file named report.txt. Send your
original C file, along with the screenshot of the differences in the expanded version.
__________________
linux cok basit bir soruda takıldım
Android & IOS Uygulama Geliştirme0 Mesaj
●32 Görüntüleme
- ReadBull.net
- Programlama ve Yazılım
- Android & IOS Uygulama Geliştirme
- linux cok basit bir soruda takıldım