1. How to represent negative integer?
There are 3 step :
- Step 1 : Convert from decimal number to binary. Add numbers 0 to the front to have enough 8 bit.
- Step 2:Change bit
-Step 3: Plus 1
So , there is negative interger.
2. Why int and float have the same size in 4 byte but float has range that larger than int many times?
because
Int is basic signed integer type. At least in [-32 767, 32767 +] in the range thus, but float single precision floating point type. Actual properties unspecified (except minimum limit), however on most systems this is the IEEE 754 single precision binary format floating point.
3. Write program to display your profile on the screen
4. Write demo program to input and output variables of different data types
lesson:i know use float, char, int. I know change int to float. I more know about gets , fflush. It help me can code by C.
No comments:
Post a Comment