Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Test expression



Specifer



Working with switch case



" ; " after loop



Comment




Pointer_ convert floating point number into integer and vice versa




// AHF C PROGRAM SOLVING

//solving here POINTER	programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { float n,*n1=&n,q,*q1=& q; int p,m,*m1=&m,*p1=& p; pf("Enter any floating point number: "); scanf("%f",n1); *p1=(int)*n1; pf("Enter any integer number: "); scanf("%d",m1); *q1=*m1; pf("\nThe conversion in integer= %d",*p1); pf("\nThe conversion in floating point = %f",*q1); return 0; }
OUTPUT:


© 2018 - All rights reserved