Reference no: EM133240274
Question: Need help with a coding problem that is in C where it asks for a program to check odd or even with a function that is this.
int isOdd(int num) the output is 0 (even number) or 1 (odd number)
Please show the code for this and explain how it works.
to input a number (type: integer, in the main function) from screen and also display segment address information by using etext, edata, end display the addresses of main, isOdd, your identifiers (variables) used in main function and isOdd function, num (in isOdd(int num)).
This is being done in putty.
This is what the result should look like.
Input an integer
5
adr etext: 40075D adr edata: 60103C adr end: 601040
the id main is at adr: 4005CD
the id isOdd is at adr: 40069F
the id n is at adr: 3DC92EFC
the id num is at adr: 3DC92EDC
5 is odd number