SQLite being written in C can easily be embedded within a C program. For that we need just two files - sqlite3.h and sqlite3.c - which are avilable for download in the SQLite site (sqlite-amalgamation-X_X_X.zip). Just Copy and paste them in the project folder , include "sqlite3.h" in the project and compile sqlite3.c along with the project files.
Our example will be using 3 SQLite functions (sqlite3_open,int sqlite3_exec()&sqlite3_close()) and database connection object: sqlite3. A well documented sample code for embedding SQLite in C is available here. Download sqlite-amalgamation-X_X_X.zip and extract sqlite3.h and sqlite3.c to the same folder as that of the sample code. Inorder to compile the program use the following statement:
gcc test.c sqlite3.c -o test -lpthread -ldl
Run the resulted output file (test) then a database file named 'test.db' will be generated in the folder. Its contents can be checked with any SQLite Manager (like this addon for firefox).