In Ada 95 an integer variable may be declared to be Integer
Solution
Answer :
an integer variable may be declared to be Integer,Natural,or Positive .
a)Which of these are types and which are subtypes?
Answer :
Integer is type. (Base type is Number)
Natural,Positive are subtypes.
b)What are the differences between Integer,Natural,and Positive?
Answer :
1.Integer datatype to store signed integers.
2.A subtype associates a base type with a constraint,it contains subset of values.
3.Natural and Positive keep assigning of nulls to an integer variable.
4.Integer values requires less storage and number values.
.................
c)Can an Integer value be assigned to a Positive variable?If so,what happens if the value is outside the range of Positive?
Answer :
Yes,We can an Interger value be assigned to a Positive .
If so,Overflow occurs,bits are lost because variable not allocated enough memory.
