I am having problem to implement linked list program. it may be the lake of basics knowledge. Before try to write linked list program I studied pointer and structure. I know pointer and structure use to make linked list program. I don't understand the example given in my book.
structure is use to store the multiple type of data type
Program code
Program Output
Name : Parth
Section : A
Roll_Number : 786
percentage : 70.199997
Linked list code
I have seen some program on internet but I feel difficult to understand. I have decided to make program into small pieces. I need help to implement simple linked list program.
structure is use to store the multiple type of data type
Program code
C:
#include<stdio.h>
#include<string.h>
struct Student
{
char Name[20];
char Section;
int Roll_Number;
float percentage;
} record;
int main (void)
{
strcpy(record.Name, "Parth");
record.Section = 'A';
record.Roll_Number = 786;
record.percentage = 70.20;
printf("Name : %s \n", record.Name);
printf("Section : %C \n", record.Section);
printf("Roll_Number : %d \n", record.Roll_Number);
printf("percentage : %f \n", record.percentage);
return 0;
}
Name : Parth
Section : A
Roll_Number : 786
percentage : 70.199997
Linked list code
C:
struct list
{
int Number;
struct list *next;
}
Last edited: