Showing posts with label C-Programs. Show all posts
Showing posts with label C-Programs. Show all posts

Thursday, November 21, 2013

Write all 6 DFS Sorting Programs

SelectionSort C Program (DFS)

#include<stdio.h>
#include<conio.h>

int main()
{

  int s,i,j,temp,a[20];

  printf("Enter total elements: ");
  scanf("%d",&s);

HeapSort C Program (DFS)

#include<stdio.h>
#include<conio.h>

void build_Heap(int [],int);
void HeapSort(int H[],int n);

int main()
{
    int arr[10],n,i;
    printf("Enter the total number of array elements: ");
    scanf("%d",&n);

InsertionSort C Program (DFS)

#include<stdio.h>
#include<conio.h>

int main()
{

  int i,j,s,temp,a[20];

  printf("Enter total elements: ");
  scanf("%d",&s);

QuickSort C Program (DFS)

#include<stdio.h>
#include<conio.h>

void quicksort(int [10],int,int);

int main()
{
  int x[20],size,i;

  printf("Enter size of the array: ");
  scanf("%d",&size);

BubbleSort C Program (DFS)

#include<stdio.h>
#include<conio.h>

int main(){

  int s,temp,i,j,a[20];

  printf("Enter total numbers of elements: ");
  scanf("%d",&s);

  printf("Enter %d elements: ",s);
  for(i=0;i<s;i++)
      scanf("%d",&a[i]);

MergeSort C Program (DFS)

#include<stdio.h>
#include<conio.h>

void mergeSort(int arr[],int low,int mid,int high);
void partition(int arr[],int low,int high);

int main(){
   
    int merge[10],i,n;

    printf("Enter the total number of elements: ");
    scanf("%d",&n);

    printf("Enter the elements which to be sort: ");
    for(i=0;i<n;i++){
         scanf("%d",&merge[i]);
    }

Friday, August 23, 2013

How to write Simple Stack Program using Linked List

#include<conio.h>
#include<stdio.h>

void PUSH();
void PEEP();
void POP();

struct node{
int data;
struct node *link;

}*head,*top=NULL,*newx,*item;

Wednesday, August 21, 2013

How to write Simple Stack Program in C

#include<conio.h>
#include<stdio.h>
 
void PUSH();
void PEEP();
int POP();
int top=-1,item,a[10];
void main()
{
int i;
clrscr();
for(i=0;i<12;i++)
{
printf("\nEnter No: ");
scanf("%d",&item);

Sunday, July 28, 2013

Simple Insert Single Link List Program in C Language

#include<stdio.h>
#include<conio.h>

struct node
{
int data;
struct node *link;
};
struct node *header,*ptr,*newx,*temp;

Friday, July 12, 2013

DFS(lab) Book Library Application Codding (273 Lines)

Hello Friends, I have created application which ma'am was given in our lab test. So, its still not in full version you can modify in this codding with your own functions. Execute it ....

/*Create one Book Library  application which have Library Functions. A  program must be perform on given functions

1. Search Student
2. Search Book
3. Issue Book
4. Manipulate

*/
#include<stdio.h>
#include<conio.h>
#include <stdlib.h>    //<--- This header file used for exit(0); function

Tuesday, April 16, 2013

WAP to Illustrate use of Malloc Function


#include<stdio.h>
#include<conio.h>

void main()
{
int n,i,*p,
clrscr;

Sunday, April 7, 2013

Most IMP Advanced C-Programming Questions (University Exam)


1.       State different between Array & Structure with example
2.       Explain structure with pointer with suitable example
3.       State different between Array with example
4.       State different between automatic & external variable with example
5.       Different between Global Variable & Static Variables with example

Thursday, April 4, 2013

WAP Structure with File Handling


#include<stdio.h>
#include<conio.h>
struct product
{
int c;
char name[20];
int qty,cost;
}p[100];

How to Draw House,Tree & Sun with C-Graphics


#include<graphics.h>
#include<conio.h>
void main()
{
int gd=DETECT ,gm;
int p[]={320,150,420,300,250,300,320,150};
initgraph(&gd,&gm,"C:\\TC\\BGI");
cleardevice();

Collect Sem-2 C-Programs

You total C-Program must up to 40

Wednesday, February 27, 2013

List of C programs to be written in File (2nd Sem)

Dear Students,

Here is a list of programs which you are supposed to write in your file.
I am not specifying all the programs which we have done in the lab, but only some of the basic programs. Make sure that you have at least recorded all of them in your files.

Structures in C :
  1. To display mark sheet of one student, where student is defined as structure as per its attributes.
  2. To display mark sheet of such n students, as per previous program.
  3. Create a structure bank and perform following functions :

Friday, February 22, 2013

Download all C- Programs (sem-2)

Hello, Friends we have got all the C Programs which we have done in C Lab. If you want any program then download given below file, Its contains all the programs.