What will be the output of the following C code?
char ch[ ] = "0xC";
if(isxdigit(ch[ ]))
printf("ch = %s is hexadecimal character \n",ch);
else
printf("ch = %s is not hexadecimal character \n",ch);
char ch[ ] = "0xC";
if(isxdigit(ch[ ]))
printf("ch = %s is hexadecimal character \n",ch);
else
printf("ch = %s is not hexadecimal character \n",ch);
A. ch = 0xC is hexadecimal character
B. ch = 0xC is not hexadecimal character
C. compile error
D. run-time error
Answer: Option A
Related Questions on Arrays and Strings
Join The Discussion