473,327 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

When do we use float

Since i am a new learner of c language so pleaseguide me through.for declaring which kind of variables do we use float
Jul 12 '07 #1
1 1810
Since i am a new learner of c language so pleaseguide me through.for declaring which kind of variables do we use float
Float is used for real numbers.
int data type can store only integers. When you need to use decimal numbers, use float.
Double is used for bigger floating point/real numbers. It has a wider range and larger precision
Jul 12 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Asfand Yar Qazi | last post by:
Sorry about this, but its driving me up the wall. First some code: typedef unsigned int size_t; struct AddOp { template<class I1, class I2> static inline float call(size_t i, const I1&...
3
by: Koen | last post by:
Hi, first of all, the machine setup server 1: - UDB2 7.2.5; COUNTRY=1, location = US, IBM1250 codepage - Locale: US English; Regional Settings: English; Keyboard: Dutch; decimal separator: ....
10
by: jeff regoord | last post by:
A user inputs a float value. The scanf() function gets the value. However, I need to create an error handler with an if else statement saying invalid input if the input is not a number. Does...
2
by: dd | last post by:
Hi, all, I found many limitation of C in the process of porting some matlab files to C, but I'm going to stick to it this time. One problem is the variadic function. C doesn't have overload...
5
by: Mr. Ken | last post by:
I am calculating the phase of an IQ signal, which are polluted by AWGN gaussian noise. Thus, near pi/2, direct division of atan(Q/I) may yield outputs either +pi/2 or -pi/2. How do I handle this...
3
by: ehabaziz2001 | last post by:
When I rename the variables d,p TO : do,po in all the module of : void convert_meter(float *me,float *d,float *p) I got an error of that line of : void convert_meter(float *me,float *d,float *p)...
6
by: trevor | last post by:
Incorrect values when using float.Parse(string) I have discovered a problem with float.Parse(string) not getting values exactly correct in some circumstances(CSV file source) but in very similar...
9
Death Slaught
by: Death Slaught | last post by:
I'm working on a web site, and every thing is fine except when I added the navagation bar......for some reason it pushes my navagation bar away from the border, which is odd because there's no reason...
1
by: Sinan Alkan | last post by:
Hi All, I have a method to resize any image file to the specific dimensions and save this new image to a path. I found it on a web page(By Joel Neubeck) and i changed it for my project. The...
6
MrPickle
by: MrPickle | last post by:
I have a struct like so defined like so: //vector3.h struct Vector3 { float x, y, z; Vector3(); Vector3(float _x, float _y, float _z); Vector3(const Vector3 &v); };
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.