C Programming - Floating Point Issues - Discussion

Discussion Forum : Floating Point Issues - General Questions (Q.No. 9)
9.
What will you do to treat the constant 3.14 as a float?
use float(3.14f)
use 3.14f
use f(3.14)
use (f)(3.14)
Answer: Option
Explanation:

Given 3.14 is a double constant.
To specify 3.14 as float, we have to add f to the 3.14. (i.e 3.14f)

Discussion:
7 comments Page 1 of 1.

Anas khan said:   1 decade ago
Type casting is about changing the type of the variable (data type) or it is the way to convert the variable from one data type to another data type.

Syntax:- (type_name)expression.

Sahithi said:   1 decade ago
What is a type casting?

Rikin Mistry said:   1 decade ago
Hello guys.

Can we call this process is a "type casting"?

Vikash said:   1 decade ago
What is the syntax to use 3.14f function in C?

Preethu said:   1 decade ago
C# is works in the .Net framework.

Umapathi said:   1 decade ago
What is the difference between c# and ANSI C.....Please tell me

Tim said:   1 decade ago
This is C# not ANSI C.

Post your comments here:

Your comments will be displayed after verification.