giovedì 12 novembre 2009

liste funzioni principali, programma2

#include
#include

typedef struct listNode listNode;
typedef struct listNode *List;
typedef int itemType;

struct listNode{
itemType item;
List next;
};




List insertHead(itemType v, List head);
List newNode(itemType v);
List deleteHead(List);
List stampa(List);


main(){
List l=NULL;
int i;
for(i=0;i<10;i++){
l=insertHead(i*10,l);
}
stampa(l);
}



List newNode(itemType v){
List head;
head=(List)malloc(sizeof(List));
head->item=v;
head->next=NULL;
return head;
}


List insertHead(itemType v, List head)
{
List ptr = newNode(v);
ptr->next=head;
return ptr;
}

List deleteHead(List head){
if(head==NULL){printf("la lista e' vuota\n");exit(1);}
List ptr=head;
head=head->next;
free(ptr);
return head;
}


List stampa(List L)
{
if(L==NULL) { printf("NULL\n");exit(0);}
printf("%d->",L->item);
stampa(L->next);
}

2 commenti:

Anonimo ha detto...

Top Casino tyuueooru
Play Online Casino
You should also check out the software that these online casino websites are using.
[url=http://www.nhgaa.org/]Web Casino[/url]

Also, check out whether or not their customer service is available 24/7.
http://www.nhgaa.org/ - No Download Casino
So, it is vital to be able to find a right online casino website for you if you don't want your online gambling experience to be annoying and regretting.

Anonimo ha detto...

Casino Gambling Game tyuueooru
http://stonewalljacksoncarnival.org/ - Download Online Casino
Additionally, you don?t have to stand out of your casino till the clock hits its opening time because a majority of online casinos are accessible 24/7.
[url=http://stonewalljacksoncarnival.org/]Casino Game Online[/url]
No matter how far your casino is located With online casino, you don?t have to worry about the location of your casino because the only thing that creates between you and your casino experience is the internet, so all you need to do is getting connected to the Internet and you can enjoy the gambling without having to spend your time visiting the local casinos out there.
Play Online Casino
Online Casino - The Advantages
Play online casino games for money or for free! FREE welcome bonuses are guaranteed!
The skyrocketing popularity of online casino, since its arrival, is no doubt something that cannot be overlooked at any cost.

How to deploy Podman images to OpenShift Container Platform (CRC on localhost)

I have a microservice on localhost and I want to deploy its Podman image on OCP, which I am running using CRC on localhost.       1. Get the...