ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
In a 32 bit CPU, the "unsigned long int" data type has a max value of
In a 64 bit CPU (AMD64 for example), will the "unsigned long int" data type
have a max value of (2^64)-1?
I am working on a Solaris Sparc III machine which consists of 64 bit CPUS. However, the unsigned long int number appears to be restricted to the legacy 2^32 size. This may be due to admin configuration (not my server). Any information would be appreciated.
According to the C standard, a long int has to be at least as big as an int. But it doesn't say anything about how big it will be on whatever architecture. If you need the int to be a certain size (64-bit) then I suggest #include'ing <stdint.h> and using the type uint64_t.
Originally posted by skie_knite007 It depends on the compiler u r using,I think so.
If u r using GCC,,its 32 bit compiler. So the unsigned int ll be only
Not true. These are compiler options for GCC:
Generate code for a 32-bit or 64-bit environment. The 32-bit environment sets int, long and pointer to 32 bits and generates code that runs on any i386 system. The 64-bit environment sets int to 32 bits and long and pointer to 64 bits and generates code for AMD's x86-64 architecture.