23/06/2025
Single Linked List /****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ /* Include Files */ struct node { int data; struct node *link; }; int count_tot_no_nodes(struct node *address) { int count=0; if(address->link==NULL) { printf("Linked List is empty.\n\r"); return count; } else { while(address->link!=NULL) { count++; address = address->link; } return ++count; } } void printLinkedListData(struct node *Address) { int count=1; if(Address->link== NULL) { printf("\nNode %d - %x",count++, Address->data); } else { while(Address->link!= NULL) { printf("\nNode %d - %x",count++, Address->data); Address = Address->link; } printf("\nNode %d - %x",count++, Address->data); Address = Address->link; } } void initNode() { struct node *head; int b =sizeof(struct node); head = (struct node *)malloc(b); head->data = 0x55AA55AA; head->link = head; } void add_at_end_node(struct node *address, int data) { struct node *end_node = (struct node *)malloc(sizeof(struct node)); end_node->data = data; end_node->link = NULL; while(address->link != NULL) { address = address->link; } address->link = end_node; } void add_at_any_position(struct node *address, int data, int pos) { struct node *temp_node = (struct node *)malloc(sizeof(struct node)); temp_node->data = data; temp_node->link = NULL; while(pos--) { address=address->link; } temp_node->link= address->link; address->link = temp_node; } void delete_node(struct node *address,int pos) { struct node *previous; pos--; while(pos--) { previous=address; address=address->link; } struct node *temp = address; previous->link = address->link; free(temp); } void delete_entire_linkedList(struct node *address) { struct node *temp; while(address->link != NULL) { temp=address; address= address->link; free(temp); } free(address); } int main(void) { printf("\n Welcome to ArunEworld"); printf("\n Single Linked List Example"); struct node *head; int b =sizeof(struct node); head = (struct node *)malloc(b); head->data = 0xAAAAAAAA; head->link = head; struct node *current = (struct node *)malloc(b); current->data = 0xBBBBBBBB; current->link = NULL; head->link= current; current = (struct node *)malloc(b); current->data = 0xCCCCCCCC; current->link = NULL; head->link->link= current; printf("\nLinked List counting - %d",count_tot_no_nodes(head)); printLinkedListData(head); add_at_end_node(head,0xDDDDDDDD); printf("\nLinked List counting - %d",count_tot_no_nodes(head)); printLinkedListData(head); add_at_end_node(head,0xEEEEEEEE); printf("\nLinked List counting - %d",count_tot_no_nodes(head)); printLinkedListData(head); add_at_any_position(head, 0xFFFFFFFF, 2); printf("\nLinked List counting - %d",count_tot_no_nodes(head)); printLinkedListData(head); add_at_any_position(head, 0xBBBBBBBB, 2); printf("\nLinked List counting - %d",count_tot_no_nodes(head)); printLinkedListData(head); delete_node(head,2); printf("\nLinked List counting - %d",count_tot_no_nodes(head)); printLinkedListData(head); delete_node(head,4); printf("\nLinked List counting - %d",count_tot_no_nodes(head)); printLinkedListData(head); printf("\nLinked List counting - %d",count_tot_no_nodes(head)); printLinkedListData(head); delete_entire_linkedList(head); printf("\nLinked List counting - %d",count_tot_no_nodes(head)); free(head); printLinkedListData(head); printf("\n____________________________________________"); return 0; }
C - Linked List | ArunEworld
Single Linked List
23/06/2025
Embedded Sensor – Vibration Sensor SW 18015
Embedded Sensor – Vibration Sensor SW 18015 | ArunEworld
This module features an adjustable potentiometer, a vibration sensor, and a LM393 comparator chip to give an adjustable digital output based on the amount of vibration. The potentiometer can be adjusted to both increase and decrease the sensitivity to the desired amount. The module outputs a logic l...
23/06/2025
C Program to Ascending Order of N Numbers in Array Ascending_Order_using_Array.c C Program to Descending Order of N Numbers in Array Descending_Order_using_Array.c
C Examples- Ascending and Decending Order | ArunEworld
Contents1 C Program to Ascending Order of N Numbers in Array2 C Program to Descending Order of N Numbers in Array C Program to Ascending Order of N Numbers in Array Ascending_Order_using_Array.c C Program to Descending Order of N Numbers in Array Descending_Order_using_Array.c
23/06/2025
Definition of perfect number or What is perfect number? Perfect number is a positive number which sum of all positive divisors excluding that number is equal to that number. For example 6 is perfect number since divisor of 6 are 1, 2 and 3. Sum of its divisor is 1 + 2+ 3 =6 Note: 6 is the smallest perfect number....
C Example - Perfect Number | ArunEworld
Definition of perfect number or What is perfect number? Perfect number is a positive number which sum of all positive divisors excluding that number is equal to that number. For example 6 is perfect number since divisor of 6 are 1, 2 and 3. Sum of its divisor is 1 + 2+ 3 =6 Note: 6 [...
23/06/2025
C Program to Find Factorial of a Number Factorial.c Code 1: C code for factorial of a number C program to find the factorial of a given number Factorial program in c using while loop Factorial program in c without using recursion int main() { int i=1,f=1,num; printf("Enter a number: "); scanf("%d",&num); while(i
C Example - Factorial Number | ArunEworld
Contents1 C Program to Find Factorial of a Number2 C Program to Find Factorial of a Number Using Recursion C Program to Find Factorial of a Number Factorial.c Code 1: C code for factorial of a number C program to find the factorial of a given number Factorial program in c using while loop Factori...
23/06/2025
Algorithm: What is Fibonacci series? Logic of Fibonacci series Definition of Fibonacci numbers: We assume first two Fibonacci are 0 and 1 A series of numbers in which each sequent number is sum of its two previous numbers is known as Fibonacci series and each numbers are called Fibonacci numbers. So Fibonacci numbers is Algorithm for Fibonacci series : Fn = Fn-2 + Fn-1 …...
C Examples - Fibonacci Sequence | ArunEworld
Algorithm: What is Fibonacci series? Logic of Fibonacci series Definition of Fibonacci numbers: We assume first two Fibonacci are 0 and 1 A series of numbers in which each sequent number is sum of its two previous numbers is known as Fibonacci series and each numbers are called Fibonacci n...
23/06/2025
AEW_RandomNumberGenerator_TwoDigit
C Examples - Random Number Generator | ArunEworld
AEW_RandomNumberGenerator_TwoDigit
23/06/2025
C Program for Bubble sort Algorithm (Folder) Bubble_sort_using_function.c Bubble_sort.c
C Examples - Bubble sort Algorithm | ArunEworld
C Program for Bubble sort Algorithm (Folder) Bubble_sort_using_function.c Bubble_sort.c
23/06/2025
Binary Number to Decimal and vice-versa Binary_to_Decimal.c Binary_to_Decimal_using_call_by_value.c Binary_to_Decimal_using_pow_function.c Binary Number to Hexa-Decimal and vice-versa Binary_to_Hexadecimal_using_pow_function.c Binary Number to Octal and vice-versa Octal Number to Decimal and vice-versa Convert Decimal to Binary Number vice-versa Decimal_to_Binary.c Decimal to Hexa Decimal Number vice-versa Decimal_to_Hexadecimal.c ASCII Value C Program to Find ASCII Value of a Character Code: int main() { char c; printf("Enter a character: "); // Reads character input from the user scanf("%c", &c); // %d displays the integer value of a character // %c displays the actual character printf("ASCII value of %c = %d", c, c); return 0; }...
C Examples - Number System Conversion | ArunEworld
Contents1 Binary Number to Decimal and vice-versa2 Binary Number to Hexa-Decimal and vice-versa3 Binary Number to Octal and vice-versa4 Octal Number to Decimal and vice-versa4.1 4.2 Convert Decimal to Binary Number vice-versa4.3 Decimal to Hexa Decimal Number vice-versa5 ASCII Value5.1 C Program to....
23/06/2025
Find the duplicate number and delete the number in Array int main() { int size,i; printf("Enter the size of the array list"); scanf("%d",&size); int Arr[size];//={88,97,65,43,77}; // size = 5; printf("\nEnter array value one by one\t"); for(i=0;i
C Examples - Duplicate Number | ArunEworld
Find the duplicate number and delete the number in Array
23/06/2025
Into Uniflash is a standalone tool for flashing Texas Instruments MCUs and it's a free tool. These tools won't support other manufacturing products. Uniflash is available in two forms: Desktop version and cloud version. Uniflash has three interfaces: GUI, Command-Line, and Scripting. Uniflash tools are available for windows, mac, and Linux. UNIFLASH Features Flash or Load program. Erase program....
UNIFLASH | ArunEworld
Uniflash