Primitive, Non-Primitive and Abstract Data Type

Data type is a system to define basic properties and operations allowed on the data. Properties such as – acceptable values, range, bytes required in memory etc. Data types can be further classified in three primary categories. Primitive Data Type Non-Primitive Data Type Abstract Data Type (ADT) Standard data types that comes built-in with a … Read more

How to find the size of data type using sizeof() operator in C

Sizeof(type) is a unary operator used to calculate the size(in bytes) of any datatype in C. Syntax: sizeof(type)Note: type must be replaced by a valid C data type or variable. Example: #include <stdio.h>int main(){ int i; printf(“Size of int = %dn”, sizeof(int)); printf(“Size of i = %dn”, sizeof(i)); return 0;} Output: Size of int = … Read more