I was studying about formatted input output functions and found out that i could actually use printf() in a variety of ways, so I started trying out how to use flags in printf() . I was trying to understand # flag , it was stated that if I use it with e,E,f format specifier it "forces the written output to contain a decimal point even if no digits would follow ". So I thought what would happen if i did it with integer but with float formating and also + flag .
main()
{
int b = 0 , c = 4.53 , d = 3 ;
float a = 1 ;
double e = 5.32 ;//please dont mind a,b,c they are remanents from previous testing
printf("%+#f" , d);
return 0 ;
}
Output - -1.#QNAN0
Your Help would be highly appreciated . Thanx in advance for taking your time to help me