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
What do you mean by underflow and overflow of data? Underflow and overflow of data: When the value of the variable is either too long or too small for the data type to hold,


What is parsing? Parsing is the process of analyzing a text, formed of a sequence of tokens, to find out its grammatical structure regarding a specified formal grammar. Parsing

Write shorts notes on Sliding Window Protocol To acquire high throughput rates, protocols employ a flow control technique termed as sliding window. Both, the sender and receive

Reduced Instruction Set Computer (RISC): As we discussed before most of the modern CPUs are of the GPR (General Purpose Register) type. A few instances of such type of CPUs ar

Q. Develop  a menu driven program to implement AND, OR, NOT gates using and without using  Bit wise operator. The menu  should  be  as follows: I.  Using Bit Wise operator I

illustration of Z80 instruction set Computer

Superscalar Processors In scalar processors, only one instruction is implemented per cycle. That means only single instruction is issued per cycle and only single instruction i

Conversion of fractional number 0.6875 into its equivalent binary number ? Ans. Multiply the fractional number 0.6875 with 2 until the remainder becomes 0 that is, Ther

How do I update an existing copy of the source to the current version? Ans) As the common code changes, you might need to update your copy to have the lastest version. To do tha