Do I have to mention the name of the answer holder within my program?
Basically, it depends on "the usual suspects." The less widely known the more you need a cite. The more substantial or original the thing, the more you need a cite.

Anything you could easily get from a simple Google search and that appears on multiple web sites and in multiple introductory textbooks, is probably fair use. "How to use a loop" in a computer language is clearly not something you need to provide a cite for. 

If you wind up using a lot of small things from a single source, that also merits at least a "thanks." For example, if you used a lot of things out of a standard "classical" text book on the subject, that might be a good thing to mention. That will reduce questions like "why does all your code look like Knuth's code in his text?"

Things that you need to dig harder for may be more of a grey area. An implementation of a standard search algorithm, for example, might need citation. So if you pulled something from the book series Numerical Recipes you might need to at least put a note in saying where you lifted the source code. It's like quoting a chunk of text from a source in that case.

Less widely known or less standard algorithms might need citation. That may be subject dependent or journal dependent. So if you are publishing something in a journal related to uncertainty analysis, maybe you don't need to explain what a Kalman filter is. It may be standard knowledge for such an audience. If you were publishing in a journal related to AI, maybe they will be less familiar with it and need a cite to a basic explanation. Especially if you are providing an implementation, especially if you borrowed the source code for that implementation.

If you used some research article's result then certainly you need to cite it. For example, if somebody has invented a new way to accomplish some task, and it has some new feature such as being faster or more secure or something, you definitely need to cite it.