Search
 
SCRIPT & CODE EXAMPLE
 

C

c arrays

float mark[5];
Comment

array in c

- An array is a pointer 

  int arr[6]={11,12,13,14,15,16};

  : arr is a pointer that stores the address of the first element in the array

- An array is contiguous blocks of memory that store a value
Comment

C arrays

int data[100];
Comment

c arrays

float mark[5];
Comment

c create array

int *arr[n]; //declares an array of integer with n term
Comment

Array in C

#include<stdio.h>
#include<string.h>
#define MAX 2

struct student
{
    char name[20];
    int roll_no;
    float marks;
};

int main()
{
    struct student arr_student[MAX];
    int i;

    for(i = 0; i < MAX; i++ )
    {
        printf("
Enter details of student %d

", i+1);

        printf("Enter name: ");
        scanf("%s", arr_student[i].name);

        printf("Enter roll no: ");
        scanf("%d", &arr_student[i].roll_no);

        printf("Enter marks: ");
        scanf("%f", &arr_student[i].marks);
    }

    printf("
");

    printf("Name	Roll no	Marks
");

    for(i = 0; i < MAX; i++ )
    {
        printf("%s	%d	%.2f
",
        arr_student[i].name, arr_student[i].roll_no, arr_student[i].marks);
    }

    // signal to operating system program ran fine
    return 0;
}
Comment

c arrays

float mark[5];
Comment

arrays c

printf("testing")
Comment

PREVIOUS NEXT
Code Example
C :: C Assigning addresses to Pointers 
C :: C (GEM) 
C :: diamond dataset in r 
C :: code wars responsable drinker 
C :: c timespec 
C :: can we update values of a map via traversing 
C :: set all pins as input for loop 
C :: jock cranley 
C :: synopsis of fork() 
C :: c pointers to struct 
C :: c limit value range 
C :: transform yt video into background overlay 
C :: if statement shortcut c 
C :: c++ convert to c online 
C :: mettre int dans string c % 
C :: c# Regex similar wor 
C :: passage on dowry 
C :: lazer codechef 
C :: C (Windows) 
C :: c logarithm check if number is base 
C :: transpose of a matrix in c 
C :: how to compare string in c 
C :: open cv 
Dart :: how can i move floating action button to center flutter 
Dart :: Waiting for another flutter command to release the startup lock... 
Dart :: flutter insecure http is not allowed by platform 
Dart :: options = null firebaseoptions cannot be null when creating the default app. flutter 
Dart :: how to add padding flutter 
Dart :: flutter dissmis snackbar 
Dart :: close drawer flutter 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =