What is the output of this program?
#include
struct
{
int i;
float ft;
}decl;
int main(){
decl.i = 4;
decl.ft = 7.96623;
printf("%d %.2f", decl.i, decl.ft);
return 0;
}
Answer: A
In the above program the float variable ft is intialised to 7.96623, and it rounded of to 7.97 because of %.2f that we have mentioned in printf statement.