Can Bob legally post a screenshot of a program in a Stack Exchange or Quora post, and if so does he need to add any form of credit along with the screenshot? Bob didn't take the screenshot himself, he found it somewhere on Internet (e.g. on the software editor's website). The screenshot hasn't been modified at all: it's simply an image showing the program.
US copyright law has an exception for fair use; small portions of a copyrighted work may be used without permission, license, or royalties if they are used for educational or demonstrative purposes.
Taking your own screenshots of a commercial software product would probably be fair use. I doubt that a screenshot provided by the developer would be fair use. Such a screenshot would probably be considered a work of its own, and carry a separate copyright. This is why, for example, Wikipedia often prefers original photos of products rather than manufacturers' marketing materials.
Fair use is decided on a case by case basis; it's impossible to know for sure whether a particular use of a copyrighted work is covered by the exception until the copyright holder sues you for infringement.
As for the Creative Commons issue mentioned in the comments on the original question, I don't see a problem. Screenshots of commercial are often used in third party books and magazines with a fair use rationale; the For Dummies series is a great example. I'm conjecturing here, but if you have a legal right to use a portion of a work without permission or license in your own work, I don't see why you wouldn't be able to license that work under any terms you wish.