Look at libqrencode , which is a C library for doing this.
Its representation of a generated QR Code is just this (from the header file):
Symbol data is represented as an array contains width*width uchars.
Each uchar represents a module (dot). If the less significant bit of the uchar is 1, the corresponding module is black.