Welcome to Millillion Tech

Millillion Tech is not a only blog, it is a landmark of technological knowledge.

Translate

Saturday, August 22, 2015

Age Calculator using C Programming

#include<stdio.h>#include<time.h>int leapYearFeb(int year, int mon) //Leap year checking{    int flag = 0;    if (year % 100 == 0)    {        if (year % 400 == 0)        {            if (mon == 2)            {               ...

C Programming Binary Search Tree (BST) implementation insert, delete and recursive travarse (inorder, preorder, postorder)

#include <stdio.h>#include <stdlib.h>    struct btnode    {        int value;        struct btnode *l;        struct btnode *r;    }*root = NULL, *temp = NULL, *t2, *t1;    void delete1();    void insert();    void delete();   ...

C Programming Binary Search Tree (BST) implementation insert, search and recursive travarse (inorder, preorder, postorder)

# include <stdio.h># include <conio.h># include <stdlib.h>typedef struct BST {   int data;   struct BST *lchild, *rchild;} node;void insert(node *, node *);void inorder(node *);void preorder(node *);void postorder(node *);node *search(node *, int, node **);void main() {   int choice;   char ans = 'N';   int key;   node *new_node, *root, *tmp, *parent;  ...

C Programming Binary Search Tree (BST) implementation insert and display it inorder, preorder and postorder

#include<stdio.h>#include<conio.h>#include<stdlib.h>#include<malloc.h>typedef struct binary_tree{    struct binary_tree *left_sub_tree;    int val;    struct binary_tree *right_sub_tree;} tree;tree *root;tree *insert(tree *r, tree *n){    if(r == NULL){        r = n;        r->left_sub_tree...

C Programming Infix To Pretfix Conversation

# include <stdio.h># include <string.h># define MAX 20void infixtoprefix(char infix[20], char prefix[20]);void reverse(char array[30]);char pop();void push(char symbol);int isOperator(char symbol);int prcd(char symbol);int top = -1;char stack[MAX];main() {char infix[20], prefix[20], temp;printf("Enter infix operation: ");gets(infix);infixtoprefix(infix, prefix);reverse(prefix);puts((prefix));}//--------------------------------------------------------void...

C Programming Infix To Postfix Conversation

#include<stdio.h> #include<conio.h> #include<string.h> #include<math.h> #include<stdlib.h> #define BLANK ' ' #define TAB '\t' #define MAX 50 void push(long int symbol); long int pop(); void infix_to_postfix(); int priority(char symbol); int isEmpty(); int white_space(char); char infix[MAX], postfix[MAX]; long int stack[MAX]; int top; int main() {     top=-1;     printf("Enter...

Wednesday, June 24, 2015

Using linked list, write a C program, that will input some students' Id, Name, Department and CGPA respectively and print them.

#include<stdio.h> #include<conio.h> #include<string.h> #include<stdlib.h> #define SIZE 20 struct diu_cse {     int id;     char name[SIZE];     char department[SIZE];     float cgpa;     struct diu_cse *next; }; struct diu_cse *head=NULL; struct diu_cse *curr=NULL; struct diu_cse* create_list(int id, char name[],char department[], float cgpa) {    ...

Thursday, June 11, 2015

Queues implementation( add, remove, peek) in C programming

#include <stdio.h> #define MAX 50 int queue_array[MAX]; int rear = -1; int front = -1; void main() {     int choice;     while (1)     {         printf("1.Insert element to queue \n");         printf("2.Delete element from queue \n");         printf("3.Display all elements of queue \n");        ...

Sunday, June 7, 2015

Stack implementation( Push, Pop, Display) in C programming.

#include<stdio.h> #include<conio.h> #include<stdlib.h> #define size 5 struct stack {     int s[size];     int top;     } st; int stfull() {     if (st.top>= size -1)         return 1;     else         return 0; } push(int item) {     st.top++;    ...