size of an array c
int a[20];
int length;
length = sizeof(a) / sizeof(int);
size of an array c
int a[20];
int length;
length = sizeof(a) / sizeof(int);
size of an array c
int a[]= { 1, 2, 3, 4, 5, 6, 7 };
int length = sizeof(a) / sizeof(a[0]); //return 7
find length of array in c
int a[17]; // initializing an array
int length = sizeof(a)/sizeof(a[0]); // divide array size(in byte)/ size of the first element of the array of the same type, here int(integer size is 4byte)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us