Quick actions

cmd+k|ctrl+k

Navigation

Languages

Ranges of Floats

Snippet info

Language

C

Visibility

public

Author

krishnakanth

Created

2022-11-20T02:24:11.877675Z

Updated

2022-11-20T02:34:36.449333Z

# include <stdlib.h>
# include <stdio.h>
# include <limits.h>

int main() 
{

    short short_min = SHRT_MIN;
    short short_max = SHRT_MAX;
    
    printf("Minimim value of short: %hd \n", short_min);    
    printf("Maximum value of short: %hd \n", short_max);    
    printf("Printing the size of short: %lu \n", sizeof(short_max));    

    printf("\n-----------------------------\n\n");

    int int_max = INT_MAX;
    int int_min = INT_MIN;

    printf("Minimim value of int: %d \n", int_min);
    printf("Maximum value of int: %d \n", int_max);
    printf("Printing the size of int: %lu \n", sizeof(int_max));

    printf("\n-----------------------------\n\n");

    long long_min = LONG_MIN;
    long long_max = LONG_MAX;

    printf("Minimim value of long: %ld \n", long_min);
    printf("Maximum value of long: %ld \n", long_max);
    printf("Printing the size of long: %lu \n", sizeof(long_max));

    printf("\n-----------------------------\n\n");

    return EXIT_SUCCESS;
}
INFO