Computer Science, asked by kalasrikopparthi, 12 days ago

How are signed and unsigned integers stored? Explain with an example​

Answers

Answered by Radhaisback2434
9

Explanation:

Variables such as integers can be represent in two ways, i.e., signed and unsigned. Signed numbers use sign flag or can be distinguish between negative values and positive values. Whereas unsigned numbers stored only positive numbers but not negative numbers.

Hope its help...

Answered by qwcricket10
8

Q) How are signed and unsigned integers stored in C? Explain with an example.

To represent variables such as integers two-mode is used, which is signed and unsigned.

  • Mainly two ways are there to denote integers in the C program.
  • Signed and unsigned are those two ways.
  • When using signed for representing integers it means that both the positive and negative values can be stored in the variable declared as  a signed variable
  • Since every integer can be identified using it's sign such as positive (+) or negative (-).
  • On the other hand in an unsigned integer can not store negative values, only positive values can be stored in the unsigned variable.
  • Example of signed integer: Sign int a = -4.
  • Example of unsigned integer: Unsigned int a = 4
Similar questions