Search
 
SCRIPT & CODE EXAMPLE
 

C

take array as input in c

int size=5;
int array[size]; // array of size=5;

for(i=0;i<size;i++){
   scanf("%d",&array[i]);
                }
Comment

array value from user c

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

int arr1[size];
printf("Enter the elements of the array:
");
for (i = 0; i < size; i++) {
    scanf_s("%d", arr1[size]);
}
printf("The current array is:
 %d", arr1[i]);
}
Comment

PREVIOUS NEXT
Code Example
C :: strcmp c 
C :: merge sort for strings in c 
C :: c char to lower case 
C :: how to reverse a string in c 
C :: c to llvm 
C :: how to delete virtual hard disk virtualbox 
C :: c radians 
C :: read from stdin c 
C :: typescript class as function parameter 
C :: c read file 
C :: C program to check whether character is lowercase or not using ASCII values 
C :: convert c program to assembly language online 
C :: memory layout in c 
C :: how to take blank space in c scanf 
C :: stack push 
C :: c long to string 
C :: print float in c 
C :: stdio.h 
C :: to execute a program using C 
C :: how to insert elements in and array and print it in c 
C :: how to arrange a 2d array based on string length in c 
C :: redis service 
C :: how to debug a segmentation fault in c 
C :: boolean operators in c++ 
C :: ecto where is not nil 
C :: can we use logical operators in switch c 
C :: how tier lists work 
C :: c %d 
C :: creation of a thread 
C :: How to scale all columns in dataframe in R? 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =