Answers for "int typecast in c"

C
2

casting in c

#include <stdio.h>
#include <stdlib.h>
int main(){
  int x = 7, y = 5;
  float z;
  z = (float)x / (float)y;   /*Here the value of z is 1.400000*/
  return 0;
}
Posted by: Guest on May-17-2020
-1

Typecast Operator in C language

int i =10;                             //integer value
int f =3.147;                      //float value
//implicit conversion
f = i;
//explicit conversion
i = (int)f;
Posted by: Guest on January-08-2022

Code answers related to "C"

Browse Popular Code Answers by Language