473,511 Members | 16,888 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Get the Limit of a Data type

46 New Member
Hi all,

Is there any way to get the Limit of Data type in C. Let us take for character data type have 255 is the Limit. so for each and every data type certain limits are there..... so how to get those types at run time.... is it possible means how?????

With Regards,
VELMURUGAN.H
Dec 21 '06 #1
3 4279
Banfa
9,065 Recognized Expert Moderator Expert
The limits for integer types (char, short, int long plus unsigned varieties) are all #defined in limits.h

float.h contains similar information for float, double and long double.


Oh and 255 is only the limit for char on systems where char is unsigned. On systems where char is signed (which is quite a lot of them) the limit is 127.
Dec 21 '06 #2
sanjay123456
125 New Member
dear ,

There r anoher type of solution that we take a array of any data type and and store the any number them .after this we have difference betwween second and first address of array and print it it will be range of data type in byte

Hope this is help to undrstand u

sanjay
Dec 22 '06 #3
Velhari
46 New Member
The limits for integer types (char, short, int long plus unsigned varieties) are all #defined in limits.h

float.h contains similar information for float, double and long double.


Oh and 255 is only the limit for char on systems where char is unsigned. On systems where char is signed (which is quite a lot of them) the limit is 127.
Thank you Mr.Banfa for your valuabel information
Dec 22 '06 #4

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

Similar topics

0
3079
by: Ed | last post by:
------=_NextPart_000_001D_01C34FCC.1D2B5E50 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable There seems to be a significant penalty imposed by the...
1
3029
by: Steve | last post by:
I've run in to a problem with a query I'm trying to write. I have attached a sample SQL script at the end of this post to show an overview of what I'm working with. I want to be able to use...
5
12120
by: Jesper Rønn-Jensen | last post by:
I have a textarea that must be limited to 70 characters. No big deal -- at least so I thought. * Textarea must not exceed 70 characters * Exceeding content must be cut off * Must work on input by...
0
5750
by: D. Dante Lorenso | last post by:
I need to know that original number of rows that WOULD have been returned by a SELECT statement if the LIMIT / OFFSET where not present in the statement. Is there a way to get this data from PG ?...
3
10150
by: JOSHUA JACKS | last post by:
I receive data from a web form in csv (comma and quote) form which I import into Access. The data include some long narratives (three fields of two to three paragraphs). Access seems to cut off...
2
1317
by: akki | last post by:
Hi all, i am creating an ASP.net web appln which was working fine till now but suddenly I developed a new problem. when i am trying to insert data in a new row in one of my tables,it gave an...
1
6648
by: Jan | last post by:
Is there a 2GB size limit on Access2003/XP ? If so, is there an easy way to span across more than one MDB file?
5
4740
by: - | last post by:
I have only 1m records in my database running on a laptop of speed 1.6GHz, memory 512MB ram, and Toshiba MK8032GAX hard disk. I use 'LIMIT x,10' for the query to utilise record paging. When the...
6
4849
by: howa | last post by:
Suppose the file is stored in "upload_tmp_dir ", so why I need to increase the memory limit? If I want to upload 100 MB, how large should I set? Thanks.
0
7355
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3213
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
447
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.