Date: Tue, 23 Oct 2007 23:43:19 +0200 From: Harald Schmalzbauer <h.schmalzbauer@omnisec.de> To: freebsd-questions@freebsd.org Subject: Re: Mentor for C self study wanted Message-ID: <200710232343.20307.h.schmalzbauer@omnisec.de> In-Reply-To: <200710232324.09851.h.schmalzbauer@omnisec.de> References: <200710232044.53240.h.schmalzbauer@omnisec.de> <20071023162454.93851854.wmoran@potentialtech.com> <200710232324.09851.h.schmalzbauer@omnisec.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Am Dienstag, 23. Oktober 2007 23:24:09 schrieb Harald Schmalzbauer: [*snip*] > > Although, you'll have to include your code inline to get past the > > sanitizers. > > Thanks all, > > here was my example, just for completeness, I found mentors for my needs. > > Thanks a lot to all! > > > #include <stdio.h> > > void main() > { > short nnote; > > // Numerischen Notenwert einlesen > printf("Bitte numerischen Schulnotenwert eingeben: "); > scanf("%d",&nnote); > > switch (nnote) > { > case 1: printf("Die Note %d entspricht sehr gut.",nnote); > break; [snip] > default: printf("%d ist keine zul=E4ssige Schulnote!"); > } > printf("\n"); > } > > P.S.: > I found that declaring nnote as int soleves my problem, but I couldn=C4t > understand why. > Another one was the result of default: nnote was -1077942208 instead of 9 > for example. Ok, the last one is a "typo", I forgot ...ote!",%d);. But interesting that ther's some output. Constant output....
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710232343.20307.h.schmalzbauer>