Virajsinh

A_PRM_08

Oct 7th, 2017
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. /* Write a Program to Convert Float Data Type To Intager Data Type.*/
  2.  
  3. #include<conio.h>
  4. #include<stdio.h>
  5.  
  6. void main()
  7. {
  8.     float a;
  9.     int b, *p;
  10.     clrscr();
  11.    
  12.     a=25.1234;
  13.     b=(int)a;
  14.     p=&b;
  15.     printf("\n Before Intager Value : %.2f",a);
  16.     printf("\n Floating Value to Intager : %d",*p);
  17.     getch();
  18. }
Add Comment
Please, Sign In to add comment