giovedì 12 novembre 2009

Liste ... funzioni principali, programma 1

#include
#include


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

struct listNode{
itemType item;
List next;
};

List newNode(itemType v);
List insertHead(itemType v, List l);
void stampa(List);

main(){
List l=NULL;
int i;
l=insertHead(1,l);
l=insertHead(2,l);
stampa(l);

}



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

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

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

Nessun commento:

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...