Programming Tools

where students meet to knowledge


January 2017

A Simple HTML document

HTML document <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p><b>My first Paragraph</b></p> </body> </html> Example Explaination The <!DOCTYPE html> Declaration Defines This Document to be HTML5 The <html> element is the root element of an HTML… Continue Reading →

C Program Sort elements Using Insertion Sort Algorithm

#include<stdio.h> int main() { int data[100],n,temp,i,j; printf(“Enter number of terms”); scanf(“%d”,&n); printf(“Enter elements”); for(i=0;i<n;i++) { scanf(“%d”,&data[i]); } for(i=1;i<n;i++) { temp=data[i]; j=i-1; while(temp<data[j] && j>=0) /*To sort elements in descending order, change temp<data[j] to temp>data[j] in above line.*/ { data[j+1] =… Continue Reading →

C Program To Sort data in ascending order using bubble sort

#include <stdio.h> int main() { int data[100],i,n,step,temp; printf(“Enter the number of elements to be sorted : “); scanf(“%d”, &n); for(i=0;i<n;i++) { printf(“Enter element”,i+1); scanf(“%d”,&data[i]); } for(step=0;step<n-1;step++) for(i=0;i<n-step-1;i++) { if(data[i]>data[i+1]) /* To sort in descending order, change > to < in… Continue Reading →

Stack Using array and perform operation PUSH,POP & Display

#include<stdio.h> #include<stdlib.h> void display(int*,int); int push(int*,int,int); int pop(int*,int); void main() { static int Top=0; int x,element,Stack[10],n; printf(“Enter the choice”); do { printf(“1.To insert an element”); printf(“2. To delete a element\n”); printf(“3.To display\n”); printf(“Enter correct choice”); scanf(“%d”,&n); switch(x) { case 1:printf(“Enter… Continue Reading →

© 2018 Programming Tools —