Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- // CHAR
- char CH;
- CH = 0;
- while (CH >= 0)
- {
- CH++;
- }
- CH--;
- printf("CH_max = %d\n", CH);
- CH = 0;
- while (CH <= 0)
- {
- CH--;
- }
- CH++;
- printf("CH_min = %d\n", CH);
- // SHORT INT
- short SH;
- SH = 0;
- while (SH >= 0)
- {
- SH++;
- }
- SH--;
- printf("SH_max = %hi\n", SH);
- SH = 0;
- while (SH <= 0)
- {
- SH--;
- }
- SH++;
- printf("SH_min = %hi\n", SH);
- //INT
- int I;
- I = 0;
- while (I >= 0)
- {
- I++;
- }
- I--;
- printf("I_max = %i\n", I);
- I = 0;
- while (I <= 0)
- {
- I--;
- }
- I++;
- printf("I_min = %i\n", I);
- //LONG INT
- unsigned long int UL;
- long int L;
- UL = 0;
- UL--;
- L = UL / 2;
- printf("L_max = %li\n", L);
- L = L*(-1) - 1;
- printf("L_min = %li\n", L);
- //LONG LONG INT
- unsigned long long int ULL;
- long long int LL;
- ULL = 0;
- ULL--;
- LL = ULL / 2;
- printf("LL_max = %lli\n", LL);
- LL = LL*(-1) - 1;
- printf("LL_min = %lli\n", LL);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement