Consider following program:
#include <stdio.h>
int main()
{
short a=9;
//printf("%hi\n",a);
printf("%d",a); // LINE 6
}
According to this the format specifier for short type (signed) is %hi
Is the short type variable always gets promoted automatically to int before performing any operation on it? Is it undefined behavior ,
If I use %d format specifier to print the value of variable in this program? I compiled it using gcc -Wall -Wextra -WFormat
options but still
compiler isn't showing any single warning. Why?