How does a C program to demonstrate the working of keyword long work?

 Courtesy: Programiz.com


In this program, the sizeof operator is used to find the size of intlonglong longdouble and long double variables.

As you can see, the size of long int and long double variables are larger than int and double variables, respectively.

By the way, the sizeof operator returns size_t (unsigned integral type).

The size_t data type is used to represent the size of an object. The format specifier used for size_t is %zu.

Note: The long keyword cannot be used with float and char types.

Comments

Popular posts from this blog

C program to read and display book information using structure

Count positive, negative and zero values in an array

Maximum value from array