Monday, March 7, 2016

Working of a floating point data type

Working of a floating point data type 


Look  and understand the program and output shown below  simple understand what will
happen there




#include
#include

 int main(){

float far = 10;
         
       printf("%1.0f\n", far );
  printf("%2.0f\n", far);
  printf("%3.0f\n", far);
  printf("%4.0f\n", far);
  printf("%5.0f\n\n", far);

   printf("%1.1f\n", far );
  printf("%1.2f\n", far);
  printf("%1.3f\n", far);
  printf("%1.4f\n", far);
  printf("%1.5f\n", far);
   
getch();
return 0;
}







No comments:

Post a Comment