Source Codes
By harishnair86
Welcome to harish nair's programming repository
All you have to do, is to post comment on what type of program you require or browse through the programs @ http://www.harishnair.we.bs/programs.htm
Currently I can provide programs in C, C++ and jsp,PIC,Matlab programs.
Doubts are also welcome.It will be answered within 12hrs.
Currently, this page is to ease the burden on engineering students, who have trouble doing programs due to lack of interest or lack of time.
Just post a comment with your e-mail id or just e-mail me at harishunair@gmail.com
Hope you find this hub useful.
Singly Linked list program:Uploaded as per request
#include<iostream.h>
struct link
{
int element;
link *next;
}*start,*node,*temp,*temp2;
void create()
{
start=new link;
start->next=NULL;
temp=start;
cout<<"Singly Linked List Has Been Created!!!"<<endl;
}
void insertbeg()
{
node=new link;
cout<<"Enter The Value.."<<endl;
cin>>node->element;
node->next=start->next;
start->next=node;
}
void insertlast()
{
node=new link;
cout<<"Enter The Value.."<<endl;
cin>>node->element;
temp->next=node;
node->next=NULL;
temp=node;
}
void insertafter()
{
int ins;
node=new link;
cout<<"Enter the elemnet after which insertion is made"<<endl;
cin>>ins;
cout<<"enter the element"<<endl;
cin>>node->element;
for(temp2=start;temp2->element!=ins;temp2=temp2->next);
temp2->next=node;
node->next=temp2->next->next;
}
void deletf()
{
int del;
node=new link;
start->next=start->next->next;
}
void deletl()
{
int del;
for(temp=start;temp->next->next!=NULL;temp=temp->next);
del=temp->element;
for(temp2=start;temp2->next->element!=del;temp2=temp2->next);
temp2->next->next=NULL;
}
void display()
{
system("clear");
for(temp=start;temp->next!=NULL;temp=temp->next)
cout<<"->"<<temp->next->element;
}
int main()
{
int c;
do
{
cout<<endl<<"1.Create\n2.Insert First\n3.Insert Last\n4.Insert After\n5.Delete First\n6.Delete Last\n7.Display\n8.Exit\nEnter UR Choice\n";
cin>>c;
switch(c)
{
case 1:
create();break;
case 2:
insertbeg();break;
case 3:
insertlast();break;
case 4:
insertafter();break;
case 5:
deletf();break;
case 6:
deletl();break;
case 7:
display();break;
case 8:
exit(0);
}
}while(1);
}
Comments
I am a Zero when it comes to Codes and programs. I am still struggling with my Blog Templates,lol.
Its good to see people struggling to become something in life's journey. Gather more complicated codes and try them!
hey thanks for sharing these with us.
now I have something else to use!
The problem is the following one, they must enter a chain of not but of 120 characters and to that I must find the probability to him of each symbol and of codifying that by shannon fano.
My email is jpmerino@estudiantes.uci.cu
Yoel, if you give the probabilities, then my program can find the corresponding shannon fano codes of symbols.
- PayPal Integration
Integrate paypal to your e-commerce shopping cart.
harishnair86 3 years ago
Sample comment: i want a linked list program implemented in C.