The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Coding help? I don't think 7 * 5 = -1073743608 by toysbfun 2008-04-07 14:29:32
There's some very basic mistake I must be missing here. After compiling and running the following I get z equals -1073743608. Would someone please tell me what I've missed?

int main ()
{
int x = 5;
int y = 7;
int z = y * x;
printf("z equals %d\n");
return 0; }
[ Reply ]
  The second parameter for printf? by UGuardian2008-04-07 14:31:36
    That appears to be it. Thanks! by toysbfun2008-04-07 14:33:08
      That was what was in that memory location when by classic_jon2008-04-07 14:33:56
        Yup. Stack trash. (n/t) by kahuana2008-04-07 15:09:51
      Uninitialized data by SnArL2008-04-07 14:34:15
  You missed the parameter to printf by sazzer2008-04-07 14:34:38

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)