In computer science, I am very much used to (and encourage) theses that contain any noteworthy code snippets as floats. In fact, as theses provide virtually unlimited space, there is no need for the extreme brevity of papers and a Concept chapter that describes the rationale for design decisions in the developed concept is usually followed by an Implementation chapter that can describe the implemented version in depth, including (but not limited to) showing presentation-worthy excerpts of the source code.
In most cases, this does not mean that whole source code files should be printed. This is usually referring to a few lines of code, or single methods that implement a specific algorithm.
For input/output files, things are similar, and they may be even more important than code snippets, as they may explain the handling and actual output of a prototype developed as a part of the thesis.
Contrary to various other answers here, I advise against putting any source code in the appendix in the usual case. The appendix is for extensive information that may be needed for further reference, but which is too "boring" to integrate in its entirety in the main body of text. This implies that the information in the appendix should be optimized so it can be taken advantage of in a meaningful way. In other words, the appendix in a (printed) document may be good for human-readable questionnaires or sets of tables, but full source code files should always be delivered in digital form (and in universities I am familiar with, (at least CS) theses have to be handed in as printed documents that are accompanied by a CD). Source code snippets that go into the main body of text as floats serve the same purpose as figures, tables or formulas in the main body of text - they illustrate something which would be too cumbersome to describe in the text.