बिजनेस मार्केटिंग का लो कॉस्ट फंडा , अपने मोबाइल से ऑटो sms भेजकर मार्केटिंग करे विजिट करे http://autotextsms.com/ बिजनेस मार्केटिंग का लो कॉस्ट फंडा http://autotextsms.com/

Search This Blog

Translate

Free C-Programming ebooks Download

Download C Programming Book

 ---------------------------------------------------

 C programming books  designed to help you better understand and study programming in C, Free C-Programming ebooks Download , Free C-Programming programming ebooks download,Download free C-Programming Ebook and C-Programming Programming Ebook,C Programming, Objective-C Programming


http://imojo.in/5y8g8c

 http://imojo.in/5y8g8chttp://imojo.in/5y8g8chttp://imojo.in/5y8g8chttp://imojo.in/5y8g8c

 http://imojo.in/5y8g8c

c programming basics PDF click here To Download




c programming basics PDF click here To Download

http://imojo.in/5y8g8c



people search by using :

  • Free C-Programming ebooks Download
  • c programming book by dennis ritchie pdf free download
  • c language books by balaguruswamy free download
  • c programs pdf with output free download
  • c programming book by balaguruswamy free pdf
  • c programming language pdf for beginners
  • c language yashwant kanetkar pdf
  • learn c programming step by step pdf
  • notes of c language pdf

multiply two matrix by recursion:

matrix multiplication recursive algorithm
multiplication using recursion in c
recursive matrix multiplication java same logic
matrix multiplication using divide and conquer in c
using recursion in c find the largest element in an array
strassen's matrix multiplication program in c using divide and conquer
matrix addition using recursion
strassen matrix multiplication code in c



#include<stdio.h>
#define MAX 10

void multiplyMatrix(int [MAX][MAX],int [MAX][MAX]);
int m,n,o,p;
int c[MAX][MAX];

void main(){
 
    int a[MAX][MAX],b[MAX][MAX],i,j,k;

    printf("Enter the row and column of first matrix: ");
    scanf("%d %d",&m,&n);
    printf("Enter the row and column of second matrix: ");
    scanf("%d %d",&o,&p);

    if(n!=o){

         printf("Matrix multiplication is not possible");
         printf("\nColumn of first matrix must be same as row of second matrix");
    }
  else{

      printf("Enter the First matrix: ");
      for(i=0;i<m;i++)
      for(j=0;j<n;j++)
           scanf("%d",&a[i][j]);

      printf("Enter the Second matrix: ");
      for(i=0;i<o;i++)
      for(j=0;j<p;j++)
           scanf("%d",&b[i][j]);

      printf("\nyour First matrix is: \n");
      for(i=0;i<m;i++){
      printf("\n");
      for(j=0;j<n;j++){
           printf("%d\t",a[i][j]);
      }
      }

      printf("\nyour Second matrix is: \n");
      for(i=0;i<o;i++){
      printf("\n");
      for(j=0;j<p;j++){
           printf("%d\t",b[i][j]);
      }
      }

      multiplyMatrix(a,b);

  }

  printf("\n multiplication of two matrix is: \n");
  for(i=0;i<m;i++){
      printf("\n");
      for(j=0;j<p;j++){
           printf("%d\t",c[i][j]);
      }
  }

}

void multiplyMatrix(int a[MAX][MAX],int b[MAX][MAX]){

    static int sum,i=0,j=0,k=0;

    if(i<m){ //row of first matrix
    if(j<p){  //column of second matrix
         if(k<n){
             sum=sum+a[i][k]*b[k][j];
             k++;
             multiplyMatrix(a,b);
         }
         c[i][j]=sum;
             sum=0;
             k=0;
             j++;
             multiplyMatrix(a,b);
    }
    j=0;
    i++;
    multiplyMatrix(a,b);
    }
}

  • matrix multiplication recursive algorithm
  • multiplication using recursion in c
  • recursive matrix multiplication java same logic
  • matrix multiplication using divide and conquer in c
  • using recursion in c find the largest element in an array
  • strassen's matrix multiplication program in c using divide and conquer
  • matrix addition using recursion
  • strassen matrix multiplication code in c

count no of occurrences in linked list using recursion

write a program to count the number of times an item is present in a linked list.
count nodes in linked list c++
algorithm to count the number of nodes in linked list
how to count the number of nodes in a linked list java
linked list count java
count the number of nodes in a circular linked list
c program to find the occurrence of a digit in a number
wap to reverse the elements in a single linked list.

Program to count no of occurrences in linked list using recursion

 #include <stdio.h>
void occur(int [], int, int, int, int *);
 int main()
{ int size, key, count = 0;
int list[20]; int i;
 printf("Enter the size of the list: ");
scanf("%d", &size);111
 printf("Printing the list:\n");
for (i = 0; i < size; i++)
{ printf("\nenter the %d element\n",i+1);
 scanf("%d",&list[i]); 
 }
 for (i = 0; i < size; i++)
 {
 printf("%d ", list[i]);
}
 printf("\nEnter the key to find it's occurence: ");

scanf("%d", &key);
 occur(list, size, 0, key, &count);
printf("%d occurs for %d times.\n", key, count);
 return 0;
 }

void occur(int list[], int size, int index, int key, int *count)
 {
 if (size == index)
{
return;
 }
 if (list[index] == key) { *count += 1;
}
 occur(list, size, index + 1, key, count);
 }



  • write a program to count the number of times an item is present in a linked list.
  • count nodes in linked list c++
  • algorithm to count the number of nodes in linked list
  • how to count the number of nodes in a linked list java
  • linked list count java
  • count the number of nodes in a circular linked list
  • c program to find the occurrence of a digit in a number
  • wap to reverse the elements in a single linked list.



C Program to Demonstrate Circular Single Linked List

circular linked list in c source code
circular linked list in c algorithm
circular linked list insertion and deletion
circular linked list in c++
circular linked list in c geeksforgeeks
c program for doubly linked list
circular linked list in c pdf
circular linked list code java

C Program to Demonstrate Circular Single Linked List




 #include <stdio.h>
 #include <stdlib.h>
 struct node { int data; struct node *link; };
struct node *head = NULL, *x, *y, *z;

 void create();
 void ins_at_beg();
void ins_at_pos();
void del_at_beg();
 void del_at_pos();
void traverse();
void search();
void sort();
void update();
 void rev_traverse(struct node *p);

int main() {
 int ch;
 printf("\n 1.Creation \n 2.Insertion at beginning \n 3.Insertion at remaining");
printf("\n4.Deletion at beginning \n5.Deletion at remaining \n6.traverse"); printf("\n7.Search\n8.sort\n9.update\n10.Exit\n");

while (1) { printf("\n Enter your choice:");
scanf("%d", &ch);
switch(ch)
{ case 1: create(); break; case 2: ins_at_beg(); break; case 3: ins_at_pos(); break; case 4: del_at_beg(); break; case 5: del_at_pos(); break; case 6: traverse(); break; case 7: search(); break; case 8: sort(); break; case 9: update(); break; case 10: rev_traverse(head); break; default: exit(0); } } return 0; }

 /*Function to create a new circular linked list*/

void create() { int c; x = (struct node*)malloc(sizeof(struct node)); printf("\n Enter the data:"); scanf("%d", &x->data); x->link = x; head = x; printf("\n If you wish to continue press 1 otherwise 0:"); scanf("%d", &c); while (c != 0) { y = (struct node*)malloc(sizeof(struct node)); printf("\n Enter the data:"); scanf("%d", &y->data); x->link = y; y->link = head; x = y; printf("\n If you wish to continue press 1 otherwise 0:"); scanf("%d", &c); } }



 /*Function to insert an element at the begining of the list*/

 void ins_at_beg() { x = head; y = (struct node*)malloc(sizeof(struct node)); printf("\n Enter the data:"); scanf("%d", &y->data); while (x->link != head) { x = x->link; } x->link = y; y->link = head; head = y; }

 /*Function to insert an element at any position the list*/


 void ins_at_pos() { struct node *ptr; int c = 1, pos, count = 1; y = (struct node*)malloc(sizeof(struct node)); if (head == NULL) { printf("cannot enter an element at this place"); } printf("\n Enter the data:"); scanf("%d", &y->data); printf("\n Enter the position to be inserted:"); scanf("%d", &pos); x = head; ptr = head; while (ptr->link != head) { count++; ptr = ptr->link; } count++; if (pos > count) { printf("OUT OF BOUND"); return; } while (c < pos) { z = x; x = x->link; c++; } y->link = x; z->link = y; }

 /*Function to delete an element at any begining of the list*/

void del_at_beg() { if (head == NULL) printf("\n List is empty"); else { x = head; y = head; while (x->link != head) { x = x->link; } head = y->link; x->link = head; free(y); } }

/*Function to delete an element at any position the list*/

void del_at_pos() { if (head == NULL) printf("\n List is empty"); else { int c = 1, pos; printf("\n Enter the position to be deleted:"); scanf("%d", &pos); x = head; while (c < pos) { y = x; x = x->link; c++; } y->link = x->link; free(x); } }

 /*Function to display the elements in the list*/
 void traverse() { if (head == NULL) printf("\n List is empty"); else { x = head; while (x->link != head) { printf("%d->", x->data); x = x->link; } printf("%d", x->data); } }

 /*Function to search an element in the list*/

void search() { int search_val, count = 0, flag = 0; printf("\nenter the element to search\n"); scanf("%d", &search_val); if (head == NULL) printf("\nList is empty nothing to search"); else { x = head; while (x->link != head) { if (x->data == search_val) { printf("\nthe element is found at %d", count); flag = 1; break; } count++; x = x->link; } if (x->data == search_val) { printf("element found at postion %d", count); } if (flag == 0) { printf("\nelement not found"); } } }

/*Function to sort the list in ascending order*/

void sort() { struct node *ptr, *nxt; int temp; if (head == NULL) { printf("empty linkedlist"); } else { ptr = head; while (ptr->link != head) { nxt = ptr->link; while (nxt != head) { if (nxt != head) { if (ptr->data > nxt->data) { temp = ptr->data; ptr->data = nxt->data; nxt->data = temp; } } else { break; } nxt = nxt->link; } ptr = ptr->link; } } }

 /*Function to update an element at any position the list*/
 void update() { struct node *ptr; int search_val; int replace_val; int flag = 0; if (head == NULL) { printf("\n empty list"); } else { printf("enter the value to be edited\n"); scanf("%d", &search_val); fflush(stdin); printf("enter the value to be replace\n"); scanf("%d", &replace_val); ptr = head; while (ptr->link != head) { if (ptr->data == search_val) { ptr->data = replace_val; flag = 1; break; } ptr = ptr->link; } if (ptr->data == search_val) { ptr->data = replace_val; flag = 1; } if (flag == 1) { printf("\nUPdate sucessful"); } else { printf("\n update not successful"); } } }

/*Function to display the elements of the list in reverse order*/
void rev_traverse(struct node *p) { int i = 0; if (head == NULL) { printf("empty linked list"); } else { if (p->link != head) { i = p->data; rev_traverse(p->link); printf(" %d", i); } if (p->link == head) { printf(" %d", p->data); } } }





  • circular linked list in c source code
  • circular linked list in c algorithm
  • circular linked list insertion and deletion
  • circular linked list in c++
  • circular linked list in c geeksforgeeks
  • c program for doubly linked list
  • circular linked list in c pdf
  • circular linked list code java







Create a linked list and display the elements in the list

simple linked list program in c
linked list program in c with explanation
linked list program in c++
linked list program in c for insertion and deletion
singly linked list program in data structure using c
linked list program in c pdf
how to create a linked list in c++
how to create a linked list java

Create a linked list and display the elements in the list

 #include <stdio.h>
#include <malloc.h>
 #include <stdlib.h>
 void main() {
 struct node { int num; struct node *ptr;
 };
typedef struct node NODE; NODE *head, *first, *temp = 0; int count = 0; int choice = 1; first = 0; while (choice)
 { head = (NODE *)malloc(sizeof(NODE));
 printf("Enter the data item\n"); scanf("%d", &head-> num);
 if (first != 0) { temp->ptr = head; temp = head; }
else { first = temp = head; } fflush(stdin);
 printf("Do you want to continue(Type 0 or 1)?\n");
scanf("%d", &choice); } temp->ptr = 0;
 /* reset temp to the beginning */
 temp = first; printf("\n status of the linked list is\n");
                       while (temp != 0)
 { printf("%d=>", temp->num); count++; temp = temp -> ptr; }
 printf("NULL\n"); printf("No. of nodes in the list = %d\n", count);

}




  • simple linked list program in c
  • linked list program in c with explanation
  • linked list program in c++
  • linked list program in c for insertion and deletion
  • singly linked list program in data structure using c
  • linked list program in c pdf
  • how to create a linked list in c++
  • how to create a linked list java





Convert a given Singly Linked List to a Circular List

Sorted insert for circular linked list 
C Program to Convert a given Singly Linked List to a Circular List
C program to convert a singly linked list to circular 
c++ - How to convert singly linked list to circular list
c - Conversion from single to circular linked list 
Sorted insert for circular linked list 

C Program to Convert a given Singly Linked List to a Circular List 

#include <stdio.h>
 #include <stdlib.h>
struct node { int num; struct node *next; };
 void create(struct node **);
void tocircular(struct node **);
 void release(struct node **);
void display(struct node *);

 int main() {
struct node *p = NULL;
 int result, count;
 printf("Enter data into the list\n");
 create(&p);
tocircular(&p);
printf("Circular list generated\n");

 display(p); release (&p); return 0; }
 void tocircular(struct node **p)
{ struct node *rear; rear = *p; while (rear->next != NULL)
{ rear = rear->next; } rear->next = *p; /*After this the singly linked list is now circular*/ }

 void create(struct node **head)
{ int c, ch; struct node *temp; do
 { printf("Enter number: ");
scanf("%d", &c); temp = (struct node *)malloc(sizeof(struct node));
temp->num = c; temp->next = *head; *head = temp;
printf("Do you wish to continue [1/0]: ");
scanf("%d", &ch); } 

 while (ch != 0); printf("\n");
 }
void display(struct node *head)
 { struct node *temp = head;
 printf("Displaying the list elements\n");
printf("%d\t", temp->num);
 temp = temp->next;

while (head != temp)
 { printf("%d\t", temp->num);
 temp = temp->next; }
printf("and back to %d\t%d ..\n", temp->num, temp->next->num); }

void release(struct node **head)
{ struct node *temp = *head; temp = temp->next;
 (*head)->next = NULL;
 (*head) = temp->next;
 while ((*head) != NULL) {
 free(temp); temp = *head;
 (*head) = (*head)->next; }
 }

  • Sorted insert for circular linked list 
  • C Program to Convert a given Singly Linked List to a Circular List
  • C program to convert a singly linked list to circular 
  • c++ - How to convert singly linked list to circular list
  • c - Conversion from single to circular linked list 
  • Sorted insert for circular linked list 



Construct a Balanced Binary Search Tree

C Program to Construct a Balanced Binary Search Tree which has same data members as the given Doubly Linked List 


#include <stdio.h>
 #include <stdlib.h>
struct node { int num; struct node *left; struct node *right; };
void create(struct node **);
 void treemaker(struct node **, int);
void display(struct node *);
void displayTree(struct node *);
 void ddelete(struct node **);

 int main()
{ struct node *headList = NULL, *rootTree,
*p;
 int count = 1, flag = 0;
 create(&headList);
 printf("Displaying the doubly linked list:\n");
 display(headList);
 rootTree = p = headList;
 while (p->right != NULL)
{ p = p->right; count = count + 1;
if (flag) { rootTree = rootTree->right; }
 flag = !flag; } treemaker(&rootTree, count / 2);
 printf("Displaying the tree: (Inorder)\n"); displayTree(rootTree);
 printf("\n"); return 0; } void create(struct node **head)
 { struct node *rear, *temp; int a, ch; do { printf("Enter a number: ");
 scanf("%d", &a); temp = (struct node *)malloc(sizeof(struct node));
temp->num = a; temp->right = NULL;
 temp->left = NULL;
if (*head == NULL)
{ *head = temp; }
 else { rear->right = temp; temp->left = rear; }
 rear = temp; printf("Do you wish to continue [1/0] ?: "); scanf("%d", &ch); } 
 while (ch != 0); } void treemaker(struct node **root, int count)
{ struct node *quarter, *thirdquarter;
 int n = count, i = 0;
 if ((*root)->left != NULL)
 { quarter = (*root)->left; for (i = 1; (i < count / 2) && (quarter->left != NULL); i++)
 { quarter = quarter->left; }
(*root)->left->right = NULL; (*root)->left = quarter;

/* * Uncomment the following line to see when the pointer changes */ //

printf("%d's left child is now %d\n", (*root)->num, quarter->num);
 if (quarter != NULL)
{ treemaker(&quarter, count / 2); } }
  if ((*root)->right != NULL)
 { thirdquarter = (*root)->right;
for (i = 1; (i < count / 2) && (thirdquarter->right != NULL); i++)
{ thirdquarter = thirdquarter->right; } (*root)->right->left = NULL; (*root)->right = thirdquarter;

/* * Uncomment the following line to see when the pointer changes */ /
/printf("%d's right child is now %d\n", (*root)->num, thirdquarter->num);
 if (thirdquarter != NULL)
{ treemaker(&thirdquarter, count / 2); } } }
 void display(struct node *head)
{ while (head != NULL)
{ printf("%d ", head->num);
 head = head->right; }
 printf("\n");
 }
/*DisplayTree performs inorder traversal*/

 void displayTree(struct node *root)
 { if (root != NULL) { displayTree(root->left);
printf("%d ", root->num); displayTree(root->right); } }

void ddelete(struct node **root)
{ if (*root != NULL) { displayTree((*root)->left);
 displayTree((*root)->right);
free(*root); }

 }



  • convert sorted list to binary search tree
  • sorted array to balanced bst
  • convert sorted array to binary search tree leetcode
  • binary tree using array in c program
  • what is balanced binary search tree
  • create bst from unsorted array
  • create binary tree from array java
  • binary tree array implementation c++




Check whether 2 linked Lists are Same

compare two linked lists java
compare two linked lists c++
compare two linked lists hackerrank solution
check if two linked lists are equal java
how to compare two nodes in linked list java
how would you detect a loop in a linked list?
how will you implement three stacks with one array?
merge two sorted linked lists

C Program to Check whether 2 Lists are Same 


#include <stdio.h>
 #include <stdlib.h>
 struct node { int num; struct node *next; };
 void feedmember(struct node **);
int compare (struct node *, struct node *);
 void release(struct node **);
 int main()
 { struct node *p = NULL;
 struct node *q = NULL;
 int result; printf("Enter data into first list\n");
 feedmember(&p);
printf("Enter data into second list\n");
 feedmember(&q); result = compare(p, q);
if (result == 1)
{ printf("The 2 list are equal.\n"); }
 else { printf("The 2 lists are unequal.\n"); }

 release (&p); release (&q); return 0; }
int compare (struct node *p, struct node *q)
 { while (p != NULL && q != NULL)
{ if (p->num != q-> num) { return 0; }
 else { p = p->next; q = q->next; } }
 if (p != NULL || q != NULL) { return 0; }
 else { return 1; }
 }
void feedmember (struct node **head)
 { int c, ch; struct node *temp;
 do { printf("Enter number: "); scanf("%d", &c); temp = (struct node *)malloc(sizeof(struct node));
temp->num = c; temp->next = *head; *head = temp; printf("Do you wish to continue [1/0]: "); scanf("%d", &ch); }  while (ch != 0); printf("\n"); } void release (struct node **head) { struct node *temp = *head; while ((*head) != NULL) { (*head) = (*head)->next; free(temp); temp = *head; } }


  • compare two linked lists java
  • compare two linked lists c++
  • compare two linked lists hackerrank solution
  • check if two linked lists are equal java
  • how to compare two nodes in linked list java
  • how would you detect a loop in a linked list?
  • how will you implement three stacks with one array?
  • merge two sorted linked lists






Check whether a Singly Linked List is a Palindrome

palindrome checking using doubly linked list in c

java program palindrome with linked lists
palindrome linked list python
a sorted array has been rotated r times to the left. find r in least possible time.
given a string, find the largest palindrome substring.
doubly linked list palindrome
palindrome list geeks
palindrome list interviewbit

C Program to Check whether a Singly Linked List is a Palindrome 



#include <stdio.h> #include <stdlib.h>
 struct node { int num; struct node *next; };
 int create(struct node **);
 int palin_check (struct node *, int);
 void release(struct node **);
 int main()
 {   struct node *p = NULL;
 int result, count; printf("Enter data into the list\n");
 count = create(&p); result = palin_check(p, count);
 if (result == 1) { printf("The linked list is a palindrome.\n"); }
else {
 printf("The linked list is not a palindrome.\n"); }
 release (&p); return 0; }
 int palin_check (struct node *p, int count) { int i = 0, j;
 struct node *front, *rear;
while (i != count / 2) { front = rear = p; for (j = 0; j < i; j++
) { front = front->next; }
 for (j = 0; j < count - (i + 1); j++) { rear = rear->next; } if (front->num != rear->num)
 { return 0; }
else { i++; } } return 1; } int create (struct node **head)
{ int c, ch, count = 0; struct node *temp; do { printf("Enter number: ");
 scanf("%d", &c); count++;
 temp = (struct node *)
malloc(sizeof(struct node)); temp->num = c; temp->next = *head; *head = temp; printf("Do you wish to continue [1/0]: ");
 scanf("%d", &ch); }  while (ch != 0); printf("\n"); return count; }

 void release (struct node **head) { struct node *temp = *head; while ((*head) != NULL)
{ (*head) = (*head)->next; free(temp); temp = *head; }
 }




  • palindrome checking using doubly linked list in c
  • java program palindrome with linked lists
  • palindrome linked list python
  • a sorted array has been rotated r times to the left. find r in least possible time.
  • given a string, find the largest palindrome substring.
  • doubly linked list palindrome
  • palindrome list geeks
  • palindrome list interviewbit









Add Corresponding Positioned Elements of 2 Linked Lists

add two numbers represented by linked lists
add two linked lists c++
given a linked list of 0s, 1s and 2s, sort it.
linked list sum java
add two numbers represented by linked lists leetcode
sum of elements in linked list in c
subtract two numbers represented by linked list
add two numbers represented by linked lists c++


C Program to Add Corresponding Positioned Elements of 2 Linked Lists



 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
struct node { int num; struct node *next; };
int feednumber(struct node **);
 struct node *addlist(struct node *, struct node *, int, int);
 void release(struct node **);
void display(struct node *);

int main() { struct node *p = NULL; struct node *q = NULL; struct node *res = NULL; int pcount = 0, qcount = 0; printf("Enter first number\n");
 pcount = feednumber(&p);
 printf("Enter second number\n");
qcount = feednumber(&q);
 printf("Displaying list1: ");
display(p); printf("Displaying list2: ");
display(q); res = addlist(p, q, pcount, qcount);
 printf("Displaying the resulting list: ");
display(res); release(&p); release(&q); release(&res); return 0; }

 /*Function to create nodes of numbers*/
 int feednumber(struct node **head)
{ char ch, dig; int count = 0; struct node *temp, *rear = NULL;
 ch = getchar();
while (ch != '\n') { dig = atoi(&ch);
 temp = (struct node *)malloc(sizeof(struct node));
temp->num = dig; temp->next = NULL;
 count++;
 if ((*head) == NULL) { *head = temp; rear = temp; }
else { rear->next = temp; rear = rear->next; }
 ch = getchar(); } return count; }

 /*Function to display the list of numbers*/
 void display (struct node *head)
 { while (head != NULL) { printf("%d", head->num); head = head->next; }
 printf("\n"); } /*Function to free the allocated list of numbers*/
 void release (struct node **head)
 { struct node *temp = *head; while ((*head) != NULL)
 { (*head) = (*head)->next; free(temp); temp = *head; } }


 /*Function to add the list of numbers and store them in 3rd list*/

 struct node *addlist(struct node *p, struct node *q, int pcount, int qcount)
 {
struct node *ptemp, *qtemp, *result = NULL, *temp; int i, carry = 0;
while (pcount != 0 && qcount != 0)
 { ptemp = p; qtemp = q; for (i = 0; i < pcount - 1; i++)
 { ptemp = ptemp->next; } for (i = 0; i < qcount - 1; i++)
{ qtemp = qtemp->next; } temp = (struct node *) malloc (sizeof(struct node));
temp->num = ptemp->num + qtemp->num + carry;
 carry = temp->num / 10; temp->num = temp->num % 10; temp->next = result; result = temp; pcount--; qcount--; } /*both or one of the 2 lists have been read completely by now*/ while (pcount != 0) { ptemp = p; for (i = 0; i < pcount - 1; i++) { ptemp = ptemp->next; }
 temp = (struct node *) malloc (sizeof(struct node));
 temp->num = ptemp->num + carry; carry = temp->num / 10;
temp->num = temp->num % 10; temp->next = result; result = temp; pcount--; }
while (qcount != 0) { qtemp = q; for (i = 0; i < qcount - 1; i++)
{ qtemp = qtemp->next; }
 temp = (struct node *) malloc (sizeof(struct node));
temp->num = qtemp->num + carry; carry = temp->num / 10;
 temp->num = temp->num % 10;
 temp->next = result; result = temp; qcount--; }
 return result; }



  • add two numbers represented by linked lists
  • add two linked lists c++
  • given a linked list of 0s, 1s and 2s, sort it.
  • linked list sum java
  • add two numbers represented by linked lists leetcode
  • sum of elements in linked list in c
  • subtract two numbers represented by linked list
  • add two numbers represented by linked lists c++





Draw x And Y axis Center Of Screen Using C program

graphics program in c to draw a moving car
c graphics program for animation
graphics programming in c with output
graphics programming in c examples
simple graphics program in c to draw a line
c program to draw a square using graphics
graphics programming in c pdf
c program to draw a rectangle using graphics

Draw x And Y axis Center Of Screen Using C program


#include<conio.h>
#include<graphics.h>
#include<stdio.h>
void main()
{
 int gd=DETECT,gm,maxx,maxy,midx,midy;
 //load driver
 initgraph(&gd,&gm,"c:\\tc\\bgi");
 cleardevice();
        maxx=getmaxx();
        maxy=getmaxy();
        midx=maxx/2;
        midy=maxy/2;
        line(0,midy,midx,maxy);
        line(midx,0,midx,maxy);
 getch();
 closegraph();
}

  • graphics program in c to draw a moving car
  • c graphics program for animation
  • graphics programming in c with output
  • graphics programming in c examples
  • simple graphics program in c to draw a line
  • c program to draw a square using graphics
  • graphics programming in c pdf
  • c program to draw a rectangle using graphics


Strassen's Method For Matrix Multiplication c program

strassen matrix multiplication code in c
strassen matrix multiplication 4 4 example
strassen matrix multiplication for 4x4
strassen's matrix multiplication program in c using recursion
strassen's matrix multiplication for nxn matrix in c
strassen's matrix multiplication program in c using divide and conquer
strassen's matrix multiplication algorithm implementation
strassen's matrix multiplication for 4x4 matrix example in c



Strassen's Method For Matrix Multiplication c program


#include<stdio.h>
void main(){
  int a[2][2],b[2][2],c[2][2],i,j;
  int m1,m2,m3,m4,m5,m6,m7;

  printf("Enter the 4 elements of first matrix: ");
  for(i=0;i<2;i++)
      for(j=0;j<2;j++)
           scanf("%d",&a[i][j]);

  printf("Enter the 4 elements of second matrix: ");
  for(i=0;i<2;i++)
      for(j=0;j<2;j++)
           scanf("%d",&b[i][j]);

  printf("\nThe first matrix is\n");
  for(i=0;i<2;i++){
      printf("\n");
      for(j=0;j<2;j++)
           printf("%d\t",a[i][j]);
  }

  printf("\nThe second matrix is\n");
  for(i=0;i<2;i++){
      printf("\n");
      for(j=0;j<2;j++)
           printf("%d\t",b[i][j]);
  }

  m1= (a[0][0] + a[1][1])*(b[0][0]+b[1][1]);
  m2= (a[1][0]+a[1][1])*b[0][0];
  m3= a[0][0]*(b[0][1]-b[1][1]);
  m4= a[1][1]*(b[1][0]-b[0][0]);
  m5= (a[0][0]+a[0][1])*b[1][1];
  m6= (a[1][0]-a[0][0])*(b[0][0]+b[0][1]);
  m7= (a[0][1]-a[1][1])*(b[1][0]+b[1][1]);

  c[0][0]=m1+m4-m5+m7;
  c[0][1]=m3+m5;
  c[1][0]=m2+m4;
  c[1][1]=m1-m2+m3+m6;

   printf("\nAfter multiplication using \n");
   for(i=0;i<2;i++){
      printf("\n");
      for(j=0;j<2;j++)
           printf("%d\t",c[i][j]);
   }


}





  • strassen matrix multiplication code in c
  • strassen matrix multiplication 4 4 example
  • strassen matrix multiplication for 4x4
  • strassen's matrix multiplication program in c using recursion
  • strassen's matrix multiplication for nxn matrix in c
  • strassen's matrix multiplication program in c using divide and conquer
  • strassen's matrix multiplication algorithm implementation
  • strassen's matrix multiplication for 4x4 matrix example in c

Tower Of Hanoi c program

tower of hanoi in c explanation
tower of hanoi in c without recursion
tower of hanoi in c using stack
tower of hanoi algorithm in data structure
tower of hanoi using stack
tower of hanoi in c++
tower of hanoi in c using iteration
tower of hanoi program in java



Tower Of Hanoi Using Backtracking in c++ program 

#include<iostream.h>
#include<conio.h>
void tower(int,char,char,char);
void main()
{
int n;
clrscr();
cout<<"enter the disk number :  ";
cin>>n;tower(n,'A','C','B');
getch();
}
void tower(int n,char from,char to,char aux)
{
if(n==1)
    {
    cout<<endl<<"move 1 from peg "<<from<<" to "<<to;return;
   }
tower(n-1,from,aux,to);
cout<<endl<<"move "<<n<<" from peg "<<from<<" to "<<to;
tower(n-1,aux,to,from);
}


Tower Of Hanoi c program  

  • tower of hanoi in c explanation
  • tower of hanoi in c without recursion
  • tower of hanoi in c using stack
  • tower of hanoi algorithm in data structure
  • tower of hanoi using stack
  • tower of hanoi in c++
  • tower of hanoi in c using iteration
  • tower of hanoi program in java



Finite Automata String Matching Algorithm c program

finite automata string matching c code
automata c program
finite automata string matching algorithm example
string matching with finite automata java code
automata based programming examples
string matching with finite automata ppt
finite automata c++
amcat automata c questions



Finite Automata String Matching Algorithm c program 

# include <iostream.h>
# include <conio.h>
# include <string.h>
class FiniteAtn
{
       private:
                       char *T,*P,*sig;
                       int n,m,l,q,trans[15][15];
       public :
                       void start(void);
                       void set_trans(void);
                       int tfunc(char);
                       void matcher(void);
                       int check(int,int);
};
void FiniteAtn :: start()
{
       int i=0,j=0;
       l=0; m=0; n=0; q=0;
       cout<<"\n\n Enter the input text :";
       cin>>T;
       cout<<"\n\n Enter the pattern :";
       cin>>P;
       n=strlen(T);
       m=strlen(P);
       while (T[i]!='\0') {
                       for (j=0;j<l;j++)
                      {
                                       if (T[i]==sig[j])
                                                       break;
                       }
                       if (j==l)              
                      {
                                       sig[l]=T[i];
                                       l++;
                       }
                       i++;
       }
       sig[l]='\0';
       for (i=0;i<15;i++)
       {
                       for (j=0;j<15;j++)
                       {
                                       trans[i][j]=0;
                       }
       }

       cout<<sig;
}
void FiniteAtn :: set_trans()
{
       int i,j=0,k=0;
       for (i=0;i<=m;i++)
                       {
                        while (sig[j]!='\0') {
                                       (q+2)>(m+1)?k=m+1:k=q+2;
                                       do
                                       {
                                                       k--;
                                       }
                                       while (check(k,j));
                                       j++;
                        }
       }
}
int FiniteAtn:: check(int k,int u)
{
       int i;
       for (i=k;i>=0;i--)
       {
       }
}
int FiniteAtn :: tfunc(char a)
{
       int i;
       for (i=0;i<l;i++)
       {
                       if (sig[i]==a)
                       break;
       }
       return(trans[q][i]);
}

void FiniteAtn :: matcher()
{
       int i;
       for (i=0;i<n;i++)            
      {
                       if (tfunc(T[i])==m)
                       cout<<"\n\n The string is found at shift s = "<<i;
       }
}
void main()
{
       FiniteAtn fa;
       clrscr();
       fa.start();
       getch();

}

  • finite automata string matching c code
  • automata c program
  • finite automata string matching algorithm example
  • string matching with finite automata java code
  • automata based programming examples
  • string matching with finite automata ppt
  • finite automata c++
  • amcat automata c questions


draw arc c program

Draw arc c program



#include<conio.h>
#include<graphics.h>
#include<stdio.h>
#include<dos.h>
void main()
{
        int gd=DETECT,gm=0;
        initgraph(&gd,&gm,"c:\\tc\\bgi");
        // load graphics driver
       arc(115, 118, 0, 150, 65);
       /*
        method used 
       arc(x,y,sa,ea,r);
    
       sa=start angle
       ea= end angle
       r=radius of arc.
       */
       getch();
       closegraph();
}



draw arc c program, draw arc in c graphics program, draw arc in c program code, draw arc in c source code

Rabin karp String Matching Algorithm c program

implementation of rabin-karp algorithm in c program

Rabin karp String Matching Algorithm using c program




#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<math.h>
#define d 10
void RabinKarpStringMatch(char *, char *, int);
int main()
{
       char *Text, *Pattern;
       int Number = 11; //Prime Number
       clrscr();
       printf("\nEnter Text String : ");
       gets(Text);
       printf("\nEnter Pattern String : ");
       gets(Pattern);

       RabinKarpStringMatch(Text,Pattern,Number);
       return 0;
       getch();
}

void RabinKarpStringMatch(char *Text, char *Pattern, int Number)
{
       int M,N,h,P=0,T=0, TempT, TempP;
       int i,j;
       M = strlen(Pattern);
       N = strlen(Text);
       h = (int)pow(d,M-1) % Number;
       for(i=0;i<M;i++)  {
                       P = ((d*P) + ((int)Pattern[i])) % Number;
                       TempT = ((d*T) + ((int)Text[i]));
                       T =  TempT % Number;
       }
       for(i=0;i<=N-M;i++)  {
                       if(P==T)  {
                                       for(j=0;j<M;j++)
                                                       if(Text[i+j] != Pattern[j])
                                                                       break;
                                       if(j == M)
                                                       printf("\nPattern Found at Position :  %d",i+1);
                       }
                       TempT =((d*(T - Text[i]*h)) + ((int)Text[i+M]));
                       T = TempT % Number;
                       if(T<0)
                                       T=T+Number;
       }

}



rabin karp algorithm example c program
rabin karp hash cprogram


C Program example List