ну словом в предыдущем коде были ошибки, вот правильный код, работающий )
(ух и долго же я билась над ним Х)))

#include <stdio.h>
#include <stdlib.h>
#include <alloc.h>

struct stackNode
{
int data;
struct stackNode *neatPtr;
};

typedef struct stackNode STACKNODE;
typedef STACKNODE *STACKNODEPTR;

void push (STACKNODEPTR*, int);
int pop (STACKNODEPTR*);
int isEmpty (STACKNODEPTR);
void printStack(STACKNODEPTR);
void instructions(void);

main()
{
STACKNODEPTR stackPtr=NULL;
int choice,value;
instructions();
printf("? ");
scanf("%d",&choice);
while(choice!=0)
{
switch(choice)
{
case 1:
printf("enter an intager: ");
scanf("%d",&value);
push(&stackPtr,value);
printStack(stackPtr);
break;
case 2: if (!isEmpty(stackPtr)) printf("the popper value is %d.\n",pop(&stackPtr));
printStack(stackPtr);
break;
default:
printf("invalid choice.\n\n");
instructions();
break;
}
printf("? ");
scanf("%d",&choice);
}
printf("end of r.\n");
return 0;
}

void instructions(void)
{
printf("enter choice:\n"
"1 to push a value on the stack\n"
"2 to pup a value off the stack\n"
"0 to end program\n"
);
}

void push(STACKNODEPTR *topPtr, int info) /

{
STACKNODEPTR newPtr;
newPtr=(STACKNODEPTR) malloc(sizeof(STACKNODE));
if(newPtr!=NULL) //
{
newPtr->data=info;
newPtr->neatPtr=*topPtr;
*topPtr=newPtr;
}
else printf("%d not inserted.no memory available.\n",info);
}

int pop (STACKNODEPTR *topPtr) /

{

STACKNODEPTR tempPtr;
int popValue;
tempPtr=*topPtr;
popValue=(*topPtr)->data;
*topPtr=(*topPtr)->neatPtr;
free(tempPtr);
return popValue;
}

void printStack(STACKNODEPTR currentPtr)
{
if(currentPtr==NULL) printf("the stack is empty.\n\n");
else{
printf("the stack is:\n");
while(currentPtr!=NULL)
{
printf("%d->",currentPtr->data);
currentPtr=currentPtr->neatPtr;
}
printf("NULL\n\n");
}
}

int isEmpty(STACKNODEPTR topPtr)
{
return topPtr==NULL;
}