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
One way of demonstrating the importance of good ID is by showing tangible benefits that can be talked about in cash terms. Within a business, good ID can lead to benefits such as h

how does a ohms law c++ programming works

Heart disease is the number-one killer in the United States, and in a cardiac crisis, each minute matters. Indiana Heart Hospital (IHH) is a new cardiac hospital that saves life b

Can we specify the next screen number with a variable:- Yes, we can specify the next screen number with a variable.

How to use messages in lists? ABAP/4  permits you to react to incorrect or doubtful user input by displaying messages that influence the program flow depending on how serious

Q. What is Collective Message Passing? In collective message passing all the processes of a group take part in communication. MPI offers a number of functions to apply the coll

Q. What is disk access time? The disk access time has two key components: Seek Time: Seek time is the time for disk arm to move heads to the cylinder comprising the desi

Hardware Implementation for signed-magnitude data When multiplication  is  implemented  in  digital  computer,  we  change  process lightly. Here, in place of providing registe

What is electronic cash? E-cash is cash which is shown by two models. One is the on-line form of e-cash which permits for the completion of all types of internet transactions.

Why Gateways are used during mail transfer? Email using SMTP effort best while both the sender and the receiver are on the internet and can hold TCP connections in between send