Download Mini project in c,c++,c# ,OpenGL,GLUT,GLFW,windows form application source code
Wednesday, December 4, 2024
Part 1: Snake Game in C | Flowchart, Data Structure and Algorithm
Monday, June 3, 2024
Part 4: Library management in C| Pagination, Dynamic Memory allocation, write Comma Separated Values (CSV) file
In this part, we will create pagination in C programming to view large set of books data. In college there might be thousands of books. We can't display all items on the screen, so we need to create techniques to display small set of data at a time and allow users to select next page or previous page to view data which is called pagination. Also, we will discuss to manage large set of books data and write books data into CSV file.
Here, we will discuss following items:
- Pagination: Users can explore large set of data by selecting next or previous page of data.
- Dynamic Memory allocation: Dynamic numbers of books are loaded into the memory, modify or delete book details from the memory using dynamic memory allocation.
- Write Comma Separated Values (CSV): Export large set of books data into CSV file.
Part 3: Library management in C| Read Comma Separated Values (CSV) file and Student Login System
In this application we have two scenarios where we read CSV files. First to read Students data and second to read books data. Students need to provide student id to login application. We read the students data from csv file and compare the student id. Also, we read large set of books data from csv file.
Sample student csv data:
Sample books csv data:
The header file loadCsvData.h is written to load csv files student data and books data. There are four main functions which reads the files.
static int getStudentID(char stuId[MAX_ID], struct stuProfile *st);
static int loadStuValues(char *line, char *sFields[STU_COL_NUM]);
int readBooks();
static int loadBookValues(char *line, char *lFields[BK_COL_NUM]);
int getRowCount(FILE *fpl);
Part 2: Library management in C | Username/Password Login System and Manage Admin Accounts
In this part, we will learn the techniques to implement a username and password login system and manage user accounts.
When a user runs the application for the first time in admin mode, the application requests the user to create an admin account. However, from the second run onwards, the user has to log in using their account details. After logging into admin mode, the user can add or modify multiple admin accounts. To identify the application’s first run, it will check if the admin account file exists in the system. If the file doesn’t exist, then the application calls the create account function. Otherwise, if the file exists, it will call the Admin login function.
int checkFirstLogin(){
int flag=1;
fa = fopen(DATA_FILE,"rb");
if(fa!= NULL){
flag= 0;
}
fclose(fa);
return flag;
}
Part 1: Library management in C | Flowchart and Function Stack Call Diagram
The application is represented by three mainMenu, adminMenu and studentMenu flowchart. The mainMenu flowchart represents the options provided to the user to choose application mode and user security. The adminMenu flowchart represents the all the tasks that administrator can perform, and the studentMenu flowchart represents the tasks that students can perform.
Friday, November 3, 2023
Chapter 2: Contact Management in C | File Handling
If you remember we have categoried all the functions into two types user functions and operational functions. Here I will explain the operational function and its usage in user functions one by one.
First, let's define Variables and Data Structure.
// Define Constant Variables
#define ESC 27
#define MAX_NAME_SZ 15
#define MAX_NUM_SZ 25
#define READ_ARRAY_SZ 15
#define DATA_FILE "dataFile.dat"
#define TEMP_FILE "tempFile.dat"
//Define data structure
struct data{
char fName[MAX_NAME_SZ];
char lName[MAX_NAME_SZ];
char mPhone[MAX_NUM_SZ];
char wPhone[MAX_NUM_SZ];
char hPhone[MAX_NUM_SZ];
};
Wednesday, November 1, 2023
Chapter 1: Contact Management in C | Flow Chart and Functions
<<Previous Chapter Next Chapter>>
Application Flow Chart:
- mainMenu(): It displays the options to the user.
- viewItems(): It displays the list of contact information on the screen.
- addItems(): It requests the user to input contact information added to the file.
- updateItems(): It requests the user to update the contact information in the file.
- deleteItems(): It requests the user to delete the contact information in the file.
- readData(): It requests the user to input contact information.




