Operation on list - c++ program, C/C++ Programming

Operation on list - c++ program:

Write a program in c to Insert value on list and list iteration.

typedef struct item *node_ptr;

struct item {

                  int element;

                  node_ptr next;


typedef node_ptr list;

typedef node_ptr position;


void main()


list head;


void  create(list);

void print(list);

head=(list)malloc(sizeof(struct item));







void create(list head)


 position temp;

 char opt;


 while (1)


 printf("Enter yuor option\n");







 if(head->next== NULL)


 head->next=temp=(position)malloc(sizeof(struct item));


 temp=temp->next=(position)malloc(sizeof(struct item));

 temp->next =NULL;




void  print(list head)

 { position temp;

  temp =head->next;

  while (temp  !=NULL)







Posted Date: 10/19/2012 2:57:45 AM | Location : United States

Related Discussions:- Operation on list - c++ program, Assignment Help, Ask Question on Operation on list - c++ program, Get Answer, Expert's Help, Operation on list - c++ program Discussions

Write discussion on Operation on list - c++ program
Your posts are moderated
Related Questions
Project Description: I want a simple program that will spoof my hardware id. I should be able to prepare the id to spoof to in the program and press "random" button to spoof to

Greatest Common Divisor (GCD) - The greatest common divisor (GCD) of two integers is the largest integer that will evenly divide both integers. The GCD algorithm involves intege

Question: a) Give two uses of NFS. b) Give one advantage of using NFS. c) Explain the following lines as they would be interpreted in the /etc/exports file i. /usr/local

Environment - C, Linux Duration - December 2006 to Feb 2007 Description - TR-106 specifies a generic data model template applicable for all TR-069 enabled devices. Adde

world wide web commands

how made a flow chart of prime number by using for loop

There are formal ways of reducing Boolean expressions in order to minimize the logic circuit. The two elementary ways of minimization are using Boolean expressions/De Morgan Theore

implement two stacks in one array A[1...n] in such a way that neither stack overflows unless the total number of elements in both stacks together is n. For this you need to produce

Explain string constants in c language - Escape Sequences? Illustrations are "945", "hello", "well done", "5+3". The character constant (example 'x') isn't equivalent to the st