LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-23-2010, 07:41 PM   #1
lesca
Member
 
Registered: Sep 2010
Posts: 58

Rep: Reputation: 0
Smile About the 'unsigned long long' type


Hello

I am reading stdio.h to learn more functions and stardard declarations.

When I see atoll function, I find its return type is odd: long long int

And there are more functions return odd types, such as unsigned long int, unsigned long long int

What do they mean? Take 'long long' type for example, if long is 32 bits, does long long has 64-bit precision?

And I try to find some type like 'double double' but find nothing. Will it work if I use double double?

Thanks!
 
Old 10-23-2010, 08:08 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by lesca View Post
Hello

I am reading stdio.h to learn more functions and stardard declarations.

When I see atoll function, I find its return type is odd: long long int

And there are more functions return odd types, such as unsigned long int, unsigned long long int

What do they mean? Take 'long long' type for example, if long is 32 bits, does long long has 64-bit precision?

And I try to find some type like 'double double' but find nothing. Will it work if I use double double?

Thanks!
How about reading C99 standard ( http://www.open-std.org/JTC1/SC22/wg...docs/n1124.pdf ) first ?
 
1 members found this post helpful.
Old 10-23-2010, 08:11 PM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
In both x86 and x86_64 int is 32 bit and long long is 64 bit. I don't know what you can assume in other architectures.

I don't think there is a type double double. There is a type long double that might be a higher precision double, but it also might have the same precision as an ordinary double.
 
1 members found this post helpful.
Old 10-24-2010, 06:49 AM   #4
lesca
Member
 
Registered: Sep 2010
Posts: 58

Original Poster
Rep: Reputation: 0
I think I understand your meanning.

And I will read the pdf!

Thank you very much!
 
Old 10-24-2010, 06:49 AM   #5
lesca
Member
 
Registered: Sep 2010
Posts: 58

Original Poster
Rep: Reputation: 0
I think I understand your meanning.

And I will read the pdf!

Thank you very much!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unsigned long int uint32_t to unsigned char and back MicahCarrick Programming 2 08-02-2009 01:39 AM
printf unsigned long long int? blackzone Programming 9 03-04-2008 12:41 PM
How to convert "unsigned long long" to "char pointer"? novicehacker Linux - Kernel 1 11-20-2006 12:57 AM
How to print unsigned long int alaios Programming 6 07-14-2005 10:27 AM
convert unsigned char * to unsigned long int linux_lover2005 Programming 3 04-26-2005 11:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration