473,322 Members | 1,566 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,322 software developers and data experts.

limits.h question

Hey, I'm learning about the limits header, and I don't understand one
snippit of code. If I code:

#include <limits.h>
#include <stdio.h>
int main()
{
printf("Smallest signed long long: %lld\n", LLONG_MIN);
return 0;
}
I get the output:
Smallest signed long long: 0

Why is this? I even check in my limits.h file, where I see:
#define LLONG_MIN 0x8000000000000000 /*minimum signed __int64 value */

Why won't it print the limit?
Nov 17 '05 #1
2 1170
> printf("Smallest signed long long: %lld\n", LLONG_MIN);

Iam not sure, but what if you try %i64 as format specifier?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 17 '05 #2
"codymanix" <do*********************@gmx.de> wrote in message
news:eY**************@TK2MSFTNGP11.phx.gbl...
printf("Smallest signed long long: %lld\n", LLONG_MIN);


Iam not sure, but what if you try %i64 as format specifier?


I'm learning about standard C and %i64 makes assumptions about long long
being 64 bit so that probably is not standard C.
I guess the latest VC has implemented long long as an afterthought.
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: Maurice LING | last post by:
Hi, I think I've hit a system limit in python when I try to construct a list of 200,000 elements. My error is malloc: vm_allocate (size = 2400256) failed...... Just wondering is this...
1
by: Alan J. Flavell | last post by:
What are the theoretical and practical limits on the length of a GET query string, currently? Strange to say, I found this rather simple question hard to answer, possibly because of searching...
16
by: Mark Bruno | last post by:
Hey, I'm learning about the limits header, and I don't understand one snippit of code. If I code: #include <limits.h> #include <stdio.h> int main() { printf("Smallest signed long long:...
37
by: Carol Depore | last post by:
How do I determine the maximum array size? For example, int a works, but a does not (run time error). Thank you.
2
by: Rami | last post by:
Hello, I’m using userdata.save to save sum info. I have found that there are size and number limits for the userdata storage area. What will happen if I will try to save and userdata storage...
7
by: weg22 | last post by:
Hi all, I need to impose maximum and minimum numerical limits on a textbox. I'd prefer not to code these in (since I have many textboxes and the limits on each are different) and was wondering...
88
by: santosh | last post by:
Hello all, In K&R2 one exercise asks the reader to compute and print the limits for the basic integer types. This is trivial for unsigned types. But is it possible for signed types without...
7
by: copx | last post by:
Do the standards say anything about size limits for string literals (min size, max size)? I want to know this to make sure that my code is portable. The program in question is ANSI C89, but I would...
13
by: Josip | last post by:
I'm trying to limit a value stored by object (either int or float): class Limited(object): def __init__(self, value, min, max): self.min, self.max = min, max self.n = value def...
44
by: vippstar | last post by:
n1256.pdf (C99 TC3), 5.2.4.1 Translation limits p1 says: Does that mean that *any* program using an array of two or more elements other than char is allowed to be rejected by an implementation?...
0
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...
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: 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
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.