Date: Sun, 6 Sep 1998 08:38:05 -0500 (CDT) From: Joe <joe@lab.cba.ualr.edu> To: Stephen Derdau <sderdau@bit-net.com> Cc: "FreeBSD .org" <questions@FreeBSD.ORG> Subject: Re: Core DUMP Message-ID: <Pine.LNX.3.96.980906083111.524A-100000@njal> In-Reply-To: <35F2898D.42971A56@bit-net.com>
next in thread | previous in thread | raw e-mail | index | archive | help
See comments below in program.
There are no secret messages in this signature file.
On Sun, 6 Sep 1998, Stephen Derdau wrote:
> compiling a small program on my system " see sig. below also "
> " FreeBSD 2.2.7-STABLE #0:"
> The program compiles but when I run the program I get this
> error message"
>
> -- Bus error (core dumped)
>
> Here is the the file :
>
> #include <stdio.h>
>
> int main(void)
> {
> char c1, c2, c3;
> int i;
> float x;
> double y;
>
> printf("\n%s\n%s", "Input three characters,"
> "an int, a float, and a double: ");
> scanf("%c%c%c%d%f%lf" , &c1, &c2, &c3, &i, &x, &y);
> printf("\nHere is the data that you typed in:\n");
> printf("%3c%3c%3c5d%17e%17e%\n\n", c1, c2, c3, i, x, y);
error ----> ^^ put a % before the c snd 5 and lose the 3's
before the c's. When you're doing the scanf you're working with
single characters, not strings. That's probably why you're getting a core
dump.
> return 0;
> }
> %
>
>
> When I more the a.out file I noticed this also :
>
> ^@Failure reading ld.so
> ^@Bad magic: ld.so
> ^@Cannot map ld.so (text)
> ^@Cannot map ld.so (data)
> ^@Cannot map ld.so (bss)
> ^@ld.so failed^@: ^@
>
>
> Thank You
>
> /SD
> FreeBSD 2.2.7-STABLE #0: Mon Aug 24 02:20:10 EDT 1998
> **http://www.freebsd.org/search.html "Alot of answers found here see
> FAQ's"**
> ***** FreeBSD IT's HARD TO BELIEVE IT IS FREE ! http://www.FreeBSD.org
> *****
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.96.980906083111.524A-100000>
