Declarations and Initializations

Q1: Size of short integer and long integer can be verified using the sizeof() operator

A True

B False

ANS:A - True

True, we can find the size of short integer and long integer using the sizeof() operator.
Example:


#include<stdio.h>
int main()
{
    short int i = 10;
    long int j = 10;
    printf("short int is %d bytes.,\nlong int is %d bytes.",
            sizeof(i),sizeof(j));
    return 0;
}
Output:
short int is 2 bytes.
long int is 4 bytes.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.