create an array of size n in javascript
// creates an empty array of size 10
Array(10);
// creates an array of empty objects
Array(10).fill({});
create an array of size n in javascript
// creates an empty array of size 10
Array(10);
// creates an array of empty objects
Array(10).fill({});
size of array
#include <stdio.h>
#include <stdlib.h>
void printSizeOf(int intArray[]);
void printLength(int intArray[]);
int main(int argc, char* argv[])
{
int array[] = { 0, 1, 2, 3, 4, 5, 6 };
printf("sizeof of array: %dn", (int) sizeof(array));
printSizeOf(array);
printf("Length of array: %dn", (int)( sizeof(array) / sizeof(array[0]) ));
printLength(array);
}
void printSizeOf(int intArray[])
{
printf("sizeof of parameter: %dn", (int) sizeof(intArray));
}
void printLength(int intArray[])
{
printf("Length of parameter: %dn", (int)( sizeof(intArray) / sizeof(intArray[0]) ));
}
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