Posts

Showing posts with the label what is c language

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);                                       ...

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);                                       ...

Multiplication of two number by using C Programs

Image
Multiplication of two number by using C Programs   Let's Understand Step by Step: Algorithm : Start : Take two numbers,  a  and  b . Initialize : Set a result variable,  r e s u l t , to 0. Loop : Iterate until one of the numbers (say  b ) is 0. If  b  is odd, add  a  to  r e s u l t . Double  a  (i.e.,  a = a × 2 ). Halve  b  (i.e.,  b = b / 2 ). End : The  r e s u l t  now contains the product of  a  and  b .   Flow chart :               Program for multiplication:    #include <stdio.h> int main () {     int a,b,c;     printf ( "enter two number:" );     scanf ( " %d %d " , & a, & b);     c = a * b;     printf ( "multiplication of %...

Hello World

This is a First Code of C Language  Hello World #include <stdio.h> int main () {     printf ( "Hello World" );     return 0 ; } Output :  Hello World What is C Programming Langauge? C  is a general-purpose programming language that is extremely popular, simple, and flexible to use. It is a structured programming language that is machine-independent and extensively used to write various applications, Operating Systems like Windows, and many other complex programs like Oracle database, Git, Python interpreter, and more. It is said that ‘C’ is a god’s programming language. One can say, C is a base for the programming. If you know ‘C,’ you can easily grasp the knowledge of the other programming languages that uses the concept of ‘C’