give an example of type casting by a simple c program

Answers were Sorted based on User's Feedback



give an example of type casting by a simple c program..

Answer / guest

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

Is This Answer Correct ?    7 Yes 4 No

give an example of type casting by a simple c program..

Answer / 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

More C Interview Questions

Explain union. What are its advantages?

0 Answers  


can we declare a variable in different scopes with different data types? answer in detail

3 Answers   TCS,


What is hungarian notation? Is it worthwhile?

0 Answers  


What is optimization in c?

0 Answers  


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

0 Answers  






Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

0 Answers  


When should volatile modifier be used?

0 Answers  


Explain what is wrong with this statement? Myname = ?robin?;

0 Answers  


Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June

0 Answers  


Why is c faster?

0 Answers  


Can a pointer point to null?

0 Answers  


plz let me know how to become a telecom protocol tester. thank you.

0 Answers  


Categories