0

What is the use of sizeof

Data_types

14th Jul 2019, 5:47 AM
Mohit Goud Vicky
Mohit Goud Vicky - avatar
2 Respostas
+ 1
It gives you the size of the datatype/variable. For example, it can be used to get the length of the array: int[] arr = {1, 2, 3, 4, 5}; printf("%d", sizeof(arr) / sizeof(int));
14th Jul 2019, 5:54 AM
Airree
Airree - avatar
0
Tq
14th Jul 2019, 6:00 AM
Mohit Goud Vicky
Mohit Goud Vicky - avatar