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 Variable Byte Sizes 
C :: how to do add to an integrr in c 
C :: c check if is a right triangle 
C :: rpobleme valgrind 
Dart :: remove number count in textfield flutter 
Dart :: debug banner flutter 
Dart :: TextStyle underline flutter 
Dart :: flutter generate random color 
Dart :: flutter divider 
Dart :: flutter appbar text color 
Dart :: flutter positioned center horizontally 
Dart :: change padding in text field flutter 
Dart :: raised button deprecated flutter 
Dart :: remove space from string dart 
Dart :: dart absolute value 
Dart :: flutter substring 
Dart :: hive regiter adapter enum 
Dart :: flutter flotingactionbutton 
Dart :: generate method o dart list 
Dart :: dart list to json 
Dart :: DartPad localStorage 
Dart :: change icon color flutter 
Dart :: flutter capture image from camera 
Dart :: getting pi in flutter 
Dart :: flutter widget for space 
Dart :: flutter random true false 
Dart :: card radius flutter 
Dart :: input in dart 
Dart :: flutter image size not working 
Dart :: string to int in dart 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =