EmbLogic's Blog

data type conversion

float f=55;
printf(“value of f is %d\n”,f);
printf(“value of f is %f\n”,f);
printf(“value of f is %c\n”,f);

what will this print–> with explaination please

One Response to data type conversion

  1. 0
    55.000
    nothing
    why?
    first of all there is need to get ouput of firt printf u must cast it into int.
    and last printf print nothing because it has the value 0 ascii so it cant print any thing.
    we can not see the memory one by onebyte of the float value.how it stores inot the memory

Leave a Reply to Kuldeep Dhanotia Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>