Ask your own question, for FREE!
Computer Science 41 Online
OpenStudy (curry):

I ran a c program with the main function having (argc, argv[]) as parameters. I ran gdb with no parameters, then i ran it with the argument 5, and then i reran it with no parameters, but when i printed out all the values of argv, i have the folder source and the value "5" in the array. I don't understand how the 5 still got there when i reran the program without passing it an argument. (This is all through gdb, so i reran it by simply pressing r *enter*)

OpenStudy (curry):

@wio

OpenStudy (anonymous):

I don't know either

OpenStudy (curry):

my only explanation was that possible the main stack frame isn't being popped, so it just stays there.

OpenStudy (anonymous):

I'm guessing gdb kept them

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
chuu: Is it (Hunt 30-31) or (Hunt 30-1) in MLA?
10 minutes ago 0 Replies 0 Medals
luvnickk: what typa music yall listen to ?
40 minutes ago 15 Replies 2 Medals
GothgirlLillian: Is music considered art?
54 minutes ago 2 Replies 0 Medals
luvnickk: am newwww
4 hours ago 0 Replies 0 Medals
russianmafiya: can someone help me write a love song
5 hours ago 1 Reply 0 Medals
arrivhn: ADD ME ON DISCORD ICYAFFL
6 hours ago 4 Replies 1 Medal
arrivhn: whats is the accute of a cricle
6 hours ago 4 Replies 3 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!