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]);
    }

Wednesday, November 13, 2013

SQL Commands Useful for PROGRAMMERS



SQL Commands Useful for PROGRAMMERS_SMITGUIDEABORT -- abort the current transaction
ALTER DATABASE -- change a database
ALTER GROUP -- add users to a group or remove users from a group
ALTER TABLE -- change the definition of a table
ALTER TRIGGER -- change the definition of a trigger
ALTER USER -- change a database user account
ANALYZE -- collect statistics about a database