Question: PLEASE EXPLAIN THIS PROBLEM: Let TOUPPER be the following macro: #define TOUPPER(c) ('a'
PLEASE EXPLAIN THIS PROBLEM:
Let TOUPPER be the following macro:
#define TOUPPER(c) ('a'<=(c)&&(c)<='z'?(c)-'a'+'A':(c)) Let s be a string and let i be an int variable. Show the output produced by each of the following program fragments.
(a)
strcpy(s, "abcd"); i = 0; putchar(TOUPPER(s[++i]));
(b)
strcpy(s, "0123"); i = 0; putchar(TOUPPER(s[++i]));
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
