give an example of type casting by a simple c program

Answer Posted / ola

#include<stdio.h>
void main()
{
float a;
a = (float)15 / 3;
printf("%f\n",a);
}

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is wrong with this program statement? void = 10;

1024


Why c language is called c?

745


How can I sort more data than will fit in memory?

883


Explain what are global variables and explain how do you declare them?

839


Explain what is the difference between far and near ?

862


What is getch () for?

884


What does %c mean in c?

846


What is c mainly used for?

818


can we implement multi-threads in c.

876


What is volatile, register definition in C

895


Why is extern used in c?

830


what is the function of pragma directive in c?

879


What is use of null pointer in c?

746


What does p mean in physics?

806


Explain a file operation in C with an example.

889