Answers for "get value of array in c"

C
2

array value from user c

#include <stdio.h>
int main(void)
{
int size, i;
printf("Enter the size of the arrays:n");
scanf("%d", &size);

int arr1[size];
printf("Enter the elements of the array:n");
for (i = 0; i < size; i++) {
    scanf_s("%d", arr1[size]);
}
printf("The current array is:n %d", arr1[i]);
}
Posted by: Guest on September-21-2020
-1

how to find the elements in array c coding

#include <stdio.h>
int main(){
	int mark[] = {12,34,56,23,21};
//	 printf("%d",mark[0]);
	int size= sizeof mark/ sizeof mark[4];
	printf("%d",size);
	return 0; 
}
Posted by: Guest on September-08-2021

Code answers related to "C"

Browse Popular Code Answers by Language