Curry
  • 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*)
Computer Science
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get our expert's

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions.

Curry
  • 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*)
Computer Science
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

Curry
  • Curry
anonymous
  • anonymous
I don't know either
Curry
  • Curry
my only explanation was that possible the main stack frame isn't being popped, so it just stays there.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
I'm guessing gdb kept them

Looking for something else?

Not the answer you are looking for? Search for more explanations.