How do you decide which integer type to use, Computer Engineering

It depends on our requirement. When we are needed an integer to be stored in 1 byte (means less than or equal to 255) we use short int, for 2 bytes we use int, for 8 bytes we use long int.

 

A char is for 1-byte integers, a short is for 2-byte integers, an int is usually a 2-byte or 4-byte integer (though not necessarily), a long is a 4-byte integer, and a long long is a 8-byte integer. 

 

Posted Date: 4/8/2013 6:03:13 AM | Location : United States







Related Discussions:- How do you decide which integer type to use, Assignment Help, Ask Question on How do you decide which integer type to use, Get Answer, Expert's Help, How do you decide which integer type to use Discussions

Write discussion on How do you decide which integer type to use
Your posts are moderated
Related Questions
Engineering and Scientific Software Engineering  and  Scientific  software  has  been  characterized  with "number crunching" algorithms. Application starts from astronomy t

What are the advantages of Public Key Cryptography? Advantages of Public Key Cryptography are illustrated in below: a) Increased convenience and security and b) Electro

Hiding data within the class and making it available only by the methods. This method is used to protect your class against accidental changes to fields, which might leave the clas

Explain the functioning of Firewall Using Screening Router. Firewall Using Screening Router: The risk of break-within is large along with this form of firewall: Eve

As IPV6 contain multiple headers, how does it know where particular header ends and next item begins? Several headers types contain fixed size. For illustration a base header h

How to fetch random ID from table by SQL query Select * from Table_Name order by NewID()

Action implementing instruction's meaning are a actually carried out by ? Ans. By instruction execution, the meaning of action implementing instruction is actually carried out.

Q. Data Alignment in Arrays? Arrays are aligned to templates by ALIGN directive. ALIGN directive is used to align elements of various arrays with one another denoting that they

What techniques are used to increase the clock rate R? Ans: The 2 techniques used to increase the clock rate R are: 1. We can reduce the amount of processing done in one basi

Explain Real Time Operating System? Real time operating System: A real-time operating system has suitably-defined, fixed time constraints. Processing should be done in the d