From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,8e7a3b3423ff7381 X-Google-Attributes: gidfee84,public From: Ajay Pal Singh Subject: Re: Memory fault(coredump) with time() function. Date: 1999/01/25 Message-ID: <36AD006E.D106FADA@sybase.com>#1/1 X-Deja-AN: 436893930 Content-Transfer-Encoding: 7bit References: <01be4463$36d2fa80$64a305c4@jasper.somchem.denel.co.za> To: jasperh Content-Type: text/plain; charset=us-ascii Organization: Sybase, Inc. Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 You need to check man pages for time(3). $ man 3 time Here's the way it'll work. long time_var; time=(&time_var); /* You can check for error here */ printf("%s", ctime(&time_var)); regards. jasperh wrote: > I get a Memory fault (coredump) when using the time() function in the > following C code: > > I tried it on a DecUnix 3.2 and a 3.2c box. > Many thanks.