LİSTEYE DÜĞÜM YOLUYLA ELEMAN EKLEME

BAĞLI LİSTEYE DÜĞÜMLERİ EKLEYELİM VE AŞAĞIDA DA BUNU GERÇEKLEYEN C++ KODU BULUNMAKTADIR

#include<conio.h>
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<cmath>

using namespace std;
struct Node{

char data;
struct Node *next;
};
struct Liste{

int count;
struct Node *head;
struct Node *last;
}liste;

void ekle(char);
void yaz();
main()
{
char s[]=”MEHMETSALIHDEVECI”;
liste.count=0;
liste.head=NULL;
liste.last=NULL;

for(int i=0;i<strlen(s);i++)
ekle(s[i]);

yaz();

int x;cin>>x;
}
void ekle(char datal)
{
struct Node *pnew=new struct Node;

pnew->data=datal;

if(liste.head==NULL){
pnew->next=NULL;
liste.head=pnew;
liste.last=pnew;

}

else{
pnew->next=NULL;
liste.last->next=pnew;
liste.last=pnew;
}

liste.count++;

}

void yaz()
{
struct Node *p;

p=liste.head;

while(p->next!=NULL){

cout<<p->data;
p=p->next;
} cout<<p->data;
}

MEHMET SALİH DEVECİ

BİLGİSAYAR MÜHENDİSİ

 

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Your email address will not be published. Required fields are marked *