ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
#include <stdio.h>
#include <stdlib.h>
struct data {
int x;
struct node *next;
};
int main()
{
/* This won't change, or we would lose the list in memory */
struct node *empinfo;
/* This will point to each node as it traverses the list */
// struct node *conductor;
empinfo = malloc( sizeof(struct data) );
empinfo->next = NULL;
empinfo->x = 12;
}
]
have to add a node from begining
these variables are use to add only'
if u dnt wnt to use it wont b a prob
Once more, SPELL OUT YOUR WORDS. It's "you", not "u", etc......if you can't be bothered typing out full words, why should we be bothered typing out a reply?
NevemTeve...well done. You are more generous than I'd be; I wouldn't do homework for someone.
Once more, SPELL OUT YOUR WORDS. It's "you", not "u", etc......if you can't be bothered typing out full words, why should we be bothered typing out a reply?
NevemTeve...well done. You are more generous than I'd be; I wouldn't do homework for someone.
thanks ..n it was not a homework
yesterday i left early
n didnt implemented it
now i have written my program.
and NevemTeve thanku soo much for your help.i dint wanted to stop myself from studying c .And people like you can help is going further
i m learning c programming.
so to push myself i am using this forum.
thanks ..n it was not a homework
yesterday i left early n didnt implemented it now i have written my program.
and NevemTeve thanku soo much for your help.i dint wanted to stop myself from studying c .And people like you can help is going further
i m learning c programming. so to push myself i am using this forum.
Great..now push yourself to SPELL OUT YOUR WORDS...are you missing that?? Quit with saying "dint", "n", etc.
If it wasn't homework, what were you trying to do with such a simple program?? And since you have written it, why don't you post it here (as you were asked to before), so everyone can benefit from it?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.