Xref: utzoo comp.unix.programmer:713 comp.unix.questions:27604 comp.unix.wizards:23835 Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!rice!uw-beaver!sumax!polari!markt From: markt@polari.UUCP (Mark Tapper) Newsgroups: comp.unix.programmer,comp.unix.questions,comp.unix.wizards Subject: Re: What do I do wrong? Message-ID: <2902@polari.UUCP> Date: 17 Dec 90 04:19:21 GMT References: <1990Dec13.023035.19793@IRO.UMontreal.CA> Organization: Seattle Online Public Unix (206) 328-4944 Lines: 18 In article <1990Dec13.023035.19793@IRO.UMontreal.CA> quennevi@IRO.UMontreal.CA (Charles Quenneville) writes: >Hello! > >Could you tell me what is wrong with this program? All I'm trying to do >is simply to print the username. > Deleted most of small program to read names from the passwd file. > printf("\n", pwd->pw_name); Here is your problem, you forgot to put a %s in the printf. it should look like this. printf("%s\n", pwd->pw_name); >-- > Charles Quenneville > quennevi@kovic.iro.umontreal.ca > >"Ventrebleu, de par ma chandelle verte, j'aime mieux etre gueux