Horje
c type conversion Code Example
type change in c
#include <stdio.h>

main() {

   int sum = 17, count = 5;
   double mean;

   mean = (double) sum / count;
   printf("Value of mean : %f\n", mean );
}
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;
}
c type conversion
c - type casting




C

Related
find factors of a number in c Code Example find factors of a number in c Code Example
curl ftp upload file to directory Code Example curl ftp upload file to directory Code Example
random float number in C Code Example random float number in C Code Example
siteorigin shortcodes Code Example siteorigin shortcodes Code Example
online code runner .c Code Example online code runner .c Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9