flat assembler
Message board for the users of flat assembler.

flat assembler > High Level Languages > how do i solve this problem it's killing me

Author
Thread Post new topic Reply to topic
luna7ic



Joined: 26 Oct 2017
Posts: 3
Code:
#include <stdio.h> #include <stdlib.h> int main() { int t, h, b; int total; h = 9; b = h + t; t = h + b / 2; total = h + b + t; printf("%d\n", total); return 0; }

Twisted Evil
Post 10 Nov 2017, 04:46
View user's profile Send private message Reply with quote
alkap



Joined: 18 Feb 2015
Posts: 44
Location: Dnipro, Ukraine
What is the problem? Care to elaborate?
What I see as problematic is the use of uninitialised local variables, t and b in numeric computations. Uninitialised memory locations do have values left over by other processes.
Post 10 Nov 2017, 07:57
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 2004-2018, Tomasz Grysztar.

Powered by rwasa.