Singly Linked List in C with Code and Explanation

Image
                        Singly LinkedList (SLL)   A Singly Linked List is a linear data structure where each element (called a node ) points to the next node in the sequence.  It is a dynamic structure , meaning it can grow or shrink in size during runtime .  Structure of a Node:  Each node contains: - Data : The value stored in the node. - Next : A pointer / reference to the next node in the list . There are Five operation in SLL: 1) Insert - Insert the element in our node like, insert(34);                                                                            insert(3);                                       ...

Addition of two Number using c language code

This is the addition of two number by using c language code

// this is for addition of two number
#include <stdio.h>
int main()
{
    int a, b, c;
    printf("enter two number for addition:");
    scanf("%d %d", &a, &b);
    c = a + b;
    printf("addition of two number= %d ", c);
    return 0;
}


Output:

enter two number for addition:12+51
addition of two number = 63

✍🏾 Algorithm to Add Two Number:

  1. Start.
  2. Read two numbers as A and B.
  3. Calculate the sum of the two numbers: Sum = A + B.
  4. Display the value of Sum.
  5. Stop.

✍🏾 Flow chart for Adding Two Number:

Adding of two number



Comments

Popular posts from this blog

Selection sort (code & Algorithm)

Multiplication of two number by using C Programs