Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

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;
}
Source by developerinsider.co #
 
PREVIOUS NEXT
Tagged: #casting
ADD COMMENT
Topic
Name
4+1 =