-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int num[4] = {11, 12, 13, 14, 15};
int k;
for (k = 0; k < 4; k++)
if ((char)num[k] == '14')
{
printf("%d\n", num[k]);
}
else
{
printf("False\n");
}
}
-
- 14
- 15
- False
False
False
False - False
False - None of these
Correct Option: C
The char type-casted integral value 14 is 14 only.