Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
Trace program
Reply
Posted 2004-11-27, 12:18 PM
I need some help I only now what its going to output but the only problem which I do not know how is trace the execution.

#include <stdio.h>

main()

struct aa{
int x;
char z; } *p, *q;
p=(struct aa*)malloc (sizeof(struct aa));
p-> x=5;
p-> z='X';
printf("x's field %d, z's field %c \n", p->x, p->z);
free(p);
q=(struct aa*)malloc (sizeof(struct aa));
q-> x=6;
q-> z='Y';
printf("x's field %d, z's field %c\n", p->x, p->z);
printf("with q x's field %d, z's field %c\n", q->x, q->z);
}
Old
Profile PM WWW Search
deadlock75 is neither ape nor machine; has so far settled for the in-betweendeadlock75 is neither ape nor machine; has so far settled for the in-between
 
deadlock75
 



 
Reply
Posted 2004-11-27, 04:41 PM in reply to deadlock75's post "Trace program"
What do you mean you don't know how to trace the execution? Do you understand C or not?
Old
Profile PM WWW Search
WetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusionWetWired read his obituary with confusion
 
 
WetWired
 



 
Reply
Posted 2004-11-27, 05:03 PM in reply to deadlock75's post "Trace program"
See if your compiler comes with a built-in stepper tool. That program doesn't seem too difficult to follow, though.
Old
Profile PM WWW Search
Demosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to be
 
Demosthenes
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 08:19 AM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.