Array

bubble sort

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int n,i,pntr,temp;
cout<<"\n ENTER THE NUMBER OF ELEMENTS=";
cin>>n;
int arr[n];
cout<<"\n ENTER THE VALUES=";

for(i=0;i<n;i++)
cin>>arr[i];

for(i=0;i<n;i++)
{
    pntr=1;
    while(pntr<=(n-i))
    {
        if(arr[pntr]>arr[pntr+1])
        {
            temp=arr[pntr];
            arr[pntr]=arr[pntr+1];     
            arr[pntr+1]=temp;
       
        }
    pntr+=1;
    }
}
cout<<"\n YOUR SORTED ARRAY IS:=\n";
for(i=0;i<n;i++)
cout<<arr[i]<<" ";

getch();
}

0 Comments:

String programs

* COMPARE TWO STRINGS

 #include<stdio.h>
#include<conio.h>
void main()
{
int i,b;
char str1[80],str2[80];
printf("Enter a string");
gets(str1);
printf("Enter another string");
gets(str2);
if(strcmp(str1,str2)==0)
   printf("Strings are equal");
else
   printf("Strings are not equal");

getch();
}

0 Comments:

medicine record maintanance system

0 Comments:

Pattern Programs

0 Comments:

HISTORY OF C PROGRAMMING LANGUAGE

           

 

 C is the most popular general purpose programming languages. C language has been designed nad devloped by Dennis Ritchie at Bell Laboratories,USA,in 1972.
several important concepts of C are drawn from 'basic programming languages' and 'B' language.Martin richards devloped BCPL on C is observed indirectly through
through the language B,which was devloped by Ken Thompson in 1970. C is also called an offspring of the BCPL.
C language is middle level programming language.C is structural language.


C is also called system_programming language because it is greatly helpful for writing operating system,interpreter,editors,compilers,database programs and
networks drivers.....

0 Comments:

Projects

Mini Projects......

0 Comments:

C++ Programs

C++ Programs source code...

0 Comments:

C Programs

C Programs Source Code...

0 Comments: