Question
Write a simple program to find the size of different basic data types in C.
Answer :
Word Count : 298
__________ __________ _______ _________ __________ __________ ______ __________.
_____ ____ ___ _____ ___ _______.
__________ _____ _________ ______ _____ ______ _____.
____ ______ ______ ________ _____ _______ _______ ____.
__________ ________ _______ ____ ______ _______ __________ __________ ____ __________ __________ _________.
___ _______ _______ _________ __________ _______ ___.
_________ ___ __________ ______ __________ ______ _____ _________ _____ __________ _____ ________.
______ ______ _____ __________ ___.
________ _______ __________ ______ _________ ________ ______ _______ ____.
__________ ________ ________ _________ _______.
_________ ____ __________ ______ _____ _____ ___.
____ _____ __________ ______ ____ _____ __________ _________.
___ _____ ________ ________ _______ _____ ________ _____.
______ ___ ___ ___ ______.
________ _____ _____ _______ ___ ______ ______ _________ _____ ___.
____ _______ ___ ____ _________.
______ ___ _______ ______ _______.
________ __________ ________ _____ _____ _____ ____ ______ ____ _________ _______ _________.
___ _____ _____ ____ ____ _________ __________ _______ ____ ______ ________ ___.
______ ___ ______ ____ ____ ___ ___ _______.
_________ _____ ________ ________ ____ ____ _____ _______ __________ ___ ______.
________ ____ _____ ___ ___.
_____ __________ _____ ______ _______ ______ ___ __________ ________.
____ ______ _________ _________.
Skip in 10
To determine the size of different basic data types in C, you can use the `sizeof` operator, which returns the size (in bytes) of a variable or data type. The following C program demonstrates how to find the size of several fundamental data types such as `int`, `float`, `double`, `char`, and `long`.
```c
#include <stdio.h>
int main() {
// Declare variables of different data types
int a;
float b;
double c;
char d;
long e;
// Print the size of each data type using the sizeof operator
_____ ____ ___ _____ ___ _______.
__________ _____ _________ ______ _____ ______ _____.
____ ______ ______ ________ _____ _______ _______ ____.
__________ ________ _______ ____ ______ _______ __________ __________ ____ __________ __________ _________.
___ _______ _______ _________ __________ _______ ___.
_________ ___ __________ ______ __________ ______ _____ _________ _____ __________ _____ ________.
______ ______ _____ __________ ___.
________ _______ __________ ______ _________ ________ ______ _______ ____.
__________ ________ ________ _________ _______.
_________ ____ __________ ______ _____ _____ ___.
____ _____ __________ ______ ____ _____ __________ _________.
___ _____ ________ ________ _______ _____ ________ _____.
______ ___ ___ ___ ______.
________ _____ _____ _______ ___ ______ ______ _________ _____ ___.
____ _______ ___ ____ _________.
______ ___ _______ ______ _______.
________ __________ ________ _____ _____ _____ ____ ______ ____ _________ _______ _________.
___ _____ _____ ____ ____ _________ __________ _______ ____ ______ ________ ___.
______ ___ ______ ____ ____ ___ ___ _______.
_________ _____ ________ ________ ____ ____ _____ _______ __________ ___ ______.
________ ____ _____ ___ ___.
_____ __________ _____ ______ _______ ______ ___ __________ ________.
____ ______ _________ _________.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.