Q:

Write a program in c to type casting implicit explicit

0

Write a program in c to type casting implicit explicit

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Program:

#include<stdio.h>
#include<conio.h>
void main()
{
int x=10;
float y=10.4;
int z;
float w;
z=x+y;//implicit
w=(float)x+y;// explicit
printf(“%d\n”,z);
printf(“%f”,w);
getch();
}

Output:

20
20.400000

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now