• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
projectsgeek

ProjectsGeek

Download Mini projects with Source Code, Java projects with Source Codes

  • Home
  • Java Projects
  • C++ Projects
  • VB Projects
  • PHP projects
  • .Net Projects
  • NodeJs Projects
  • Android Projects
    • Project Ideas
      • Final Year Project Ideas
      • JSP Projects
  • Assignment Codes
    • Fundamentals of Programming Language
    • Software Design Laboratory
    • Data Structure and Files Lab
    • Computer Graphics Lab
    • Object Oriented Programming Lab
    • Assembly Codes
  • School Projects
  • Forum

C++ Projects

Reading from file using C | easy method

February 17, 2020 by ProjectsGeek Leave a Comment

Reading from file using C

Files are used for storing data as a sequence of bytes either as text or in binary format. This article will show you how Reading from file using C works and writing code for it. Text files (.txt files) are created easily by using simple text editors which can be maintained in a easy manner whereas binary file (.bin files in your computer) stores data as 0s and 1s which cannot be easily readable ensures more security than text files. Storage space required for binary file is less.

One of the IDE which can be used for c code writing is codeblocks.

Reading from file using C

Data stored in these files can be handled by using C. Operations like reading or writing in existing file, creating new file and closing a file can be done by C. Now lets see how to reading from file using C works.

Reading from file using C

C language program read the file which was entered by user and output its information on the screen. While working with file, you need to create a pointer variable for type file. This variable is used for the file and program communication. The program file which executes a file should be in same directory in which file to be read is present.

Standard Input and output functions in C are predefined structures in header file stdio.h. Function used to open a file is fopen(), it returns a pointer to stdio.h file when file successfully opened else it returns NULL. While opening a file we are bringing data from disk or from storage devices to RAM where operations can be performed on it [like reading, editing].The prototype of fopen function is —-

Fopen ( const char * filename, const char * mode )

 Filename is a string in which you use the name your file and access mode has one of the following values.

r – Opens a file for reading purpose.

w – Opens a file for writing purpose, if file doesn’t exist it creates a new one.

a – Opens a file for writing in appending mode where it start appending content in the existing file with the new created one  . And r+, w+, a+ are also the mode that works with combination of above modes.

               Example: fopen(sample.txt, “r”);    —-> here sample.txt file is opened in reading mode .you can just read its content, can’t edit or so.

A character that is read from the file is returned by function fgetc(). Closing of file is done by fclose () function.

C program to read a file

Code in C programming to open a file and display its contents on screen.

#include <stdio.h>
#include <stdlib.h>

int main()
{
char ch, file_name[25];
FILE *fip;

printf("Enter the file name to read\n");
gets(file_name);

fip = fopen(file_name, "r");    // read mode

if (fip == NULL)
{
perror("Error while opening the file.\n");
exit(EXIT_FAILURE);
}

printf("The contents of %s file are:\n", file_name);

while((ch = fgetc(fip)) != EOF)
printf("%c", ch);

fclose(fip);
return 0;
}

Pointer variable we used here is fip which return NULL when it can’t find the requested file. Perror() function print the error message. When we compile and run the above program, if it displays the following message, then it means we are trying to open a file that does not exist.

reading file using c easy method

                              “Error while opening the file”

Otherwise the content in the file is read by fgetc() function. This function read a character and print it using printf() function where % c is the datatype of character to be printed. This process repeats till the end of file [EOF] using while loop. EOF macro is a negative value with int datatype, that is returned by functions to know end-of-file [i.e  No more data from stream]. EOF is defined in header file stdio.h (and is usually -1). Once file reading is done file is closed by fclose() function. You can other c projects or c++ projects here.

Other Projects to Try:

  1. To Perform File Handling in Java
  2. Primitive operations on Sequential file in C language
  3. File Handling and IO Handling in Java Programming
  4. File Handling program using Java
  5. Text or Screen Editor in C++ Language

Filed Under: C Codes Tagged With: C++ Projects

Music Library Management System project C++

October 8, 2014 by ProjectsGeek 2 Comments

Music Library Management System 

 

 

Project Objective

Music Library Management SystemMusic Library Management System have to sale various musical items and each items comes with number of models and variety. Maintaining all these records and making updation regularly such as its selling price, number of items available per items, entering their cost price etc was not an easy task manually. As customers also do not able to search any particular item based on their required model and product name along with their manufacturing and brand details. Through this Music Library Management System, its admin will also able to make necessary operation related to their customers who have visited to their shop and using this information, shop owner can take other action such as providing new arrivals information to their particular customers and give rebate during purchasing of other products from their shop on the basis of the purchasing records. This Music Library Management System will having the ability to store the vendors shop address, their contact number of type of instruments that has been purchased from their shop. Through this contact information, shop owner will able to contact their vendors whenever they are in need of purchasing any items. Shop owner will get relieve from making items bills manually, the only work that has to be done is entering item code and total number of items that has been purchased by the customers and rest of the processing work will be handled by the system and prepare bills including service taxes, date, time and generating bill id and their customer id.

Existing System:

Maintaining customers and the vendor’s records was not so easy manually and every time whenever customers visit this music store have to show their customer card to get rebate on any special offers. If due to any reasons they will lost their card, customer will not able to get exclusive offers while purchasing and have to make new cards by which they have to paid again for taking the same service. Customers were not free within the shop to search their particular musical items on their own and select under their shop cart. The manual Music Library Management System was not able to create a virtual environment within their shop by which more working assistants were required to handle the customers and thus increase in investment by which shop owner not able to make more profits.

Proposed System:

Auditing process was not easier in manual system and shop owner have to check all the billing voucher to calculate total selling’s of a particular day, but with this system audit on any particular section can be easily be known by using single option which has been provided under the account section. Even preparing salary sheet and balance sheet can be easily achieve by using the options available under the account section. It will also help the shop owner to set salary for each working members within their shop thus saving time and money for preparing final salary sheet for each working employee. It will allow admin to know the total stock details of each items and the background processing work will be done by retrieving the particular field data from the file which is saved at any computer location and providing security features by which only admin will have the authority to access and make modification to these files.

Download Project

 Music Library Management System Abstract  Abstract Download
 Music Library Management Source Code  Source Code

Other Projects to Try:

  1. DVD Cafe Management System using C++
  2. Canteen Management System project C++
  3. Online Music Library project in PHP
  4. Library Management System project in C++
  5. PHP projects with Source Code

Filed Under: C++ Projects Tagged With: C++ Projects

DVD Cafe Management System using C++

October 7, 2014 by ProjectsGeek 2 Comments

DVD Cafe Management System using C++

 

 

Project Objective

Dvd cafe is an application software which will look after all the administrative work for a particular cd shop. This system will maintain all records of the music and video cd’s which are available in the store along with other details of a particular cd such as its total quantity available in the shop, cost per cd. This system also having the potential to maintain and store its customer records. The customer will get an option either to purchase a particular cd or to take on rent. If the customers will not able to submit the cd on time or within 15 days, he or she will be fined Rs 20 per day and the total amount will be deducted from their account. This system will provide admin to make new entry for their customers as well for the cd’s which has newly arrived in their store. Through this system, shop owner will able to check their account details as well as products stocks details. Even if the admin found some error during data entry process and came to know while handling the system can be modified by using edit option. There are two modules under this system upon which this system will work. It will facilitate the admin to work upon attributes of customers and cassettes to make their business transaction and associated processes easier.

Existing System

Under existing system, the most horrible situation comes when shop owner have to find particular cd on the demand of customers during selling process. Existing system as work on manual system, so shop administration only takes responsibility of preparing bills which includes the details of purchasing date, type of products, total price including taxes. There is no provision of maintain the customer records in order to make inform to their customers about their latest product and services provided by their shop.

Project Snapshots 

DVD Cafe welcome page
DVD Cafe menu page
entry menu page
list of members
list menu page
cd list page

Proposed System

As this new system will be fully automated, so manual processing will be not required to achieve any task. This system will not only keep records of the cassettes which are being sold under this shop but it will also able to maintain records or their customers and make modifications as and when required. Admin will have the option of getting all the records by using single option provided under the cd shop menu section. To make easy processing work, admin have to only enter the correct option without pressing any other button and this system will identify their choice and take action based on their selected option.

Download Project

DVD Cafe Management System Abstract Download
DVD Cafe Management Source Code Source Code Download

Other Projects to Try:

  1. Canteen Management System project C++
  2. Music Library Management System project C++
  3. Computer Shop Management System in C++
  4. Hotel Management System project in C++
  5. Book Shop System project in C++

Filed Under: C++ Projects Tagged With: C++ Projects

C++ Projects with Source Code

October 5, 2014 by ProjectsGeek 70 Comments

C++ Projects with Source Code

 

 

C++ language is well known language as this language provide many features with respect to C language. Most interesting feature of this language is that it supports object oriented programming which opens whole new world of possibilities with this language. Here we present you more than 20 plus C++ Projects with Source Code for students. You can use these projects as academic projects, MCA projects or school projects. These are simple projects we can say for school level projects or first year or second year level projects.  These projects have very basic and easy user interface, some uses other libraries for UI.

How to Run these C++ Projects ?

You can run this  projects using any C++ compiler. You can use Turbo C, Code Lite or Boroland C++ etc, just download source file and compile. As turbo C has some limitations on new operating system such as Windows vista and later, So use other compilers on these operating systems.

Can I download Project Documents ?

Only project abstracts are available for download with these projects. You can download source code from the bottom of these pages.

C++ Projects with Source Code

 

Hotel Management System   Hotel Management System 
Book Shop System   Book Shop System 
Phone Directory System  Phone Directory System
Report Card making System  Report Card making System
Salary management system  Salary management system
LIC Database system  LIC Database system
Computer shop management   Computer shop management
Canteen management system  Canteen management system
Payroll management system  Payroll management system
Banking system  Banking system
Matrix Calculator Program  Matrix Calculator Program 
Railway Reservation System Railway Reservation System
Matrix Calculator Program Matrix Calculator Program
Snake ladder Game  Snake ladder Game 
Shuffle Game project Shuffle Game project
Diabetes Detection System  Diabetes Detection System 
 Library Management System Library Management System
Railway Ticket Reservation System Railway Ticket Reservation System
School Management System  School Management System 
Student Management System Student Management System

Other Projects to Try:

  1. 100+ .Net mini Projects with Source Code
  2. B tech final year project-Source Code Analyzer
  3. TestPage
  4. Hello World Android Project with Source Code
  5. PHP projects with Source Code

Filed Under: C++ Projects Tagged With: C++ Projects

Diabetes Detection System project using C++

October 3, 2014 by ProjectsGeek 9 Comments

Diabetes Detection System project using C++

 

 

Project Objective

If you are facing with any kind of disease or infection and knowing about these disease on time will help you to get cure and take precautions on time. This process will also help to get over from these suffering in few days or in months. Among several diseases and sufferings, many peoples are suffering from diabetes. With this computer based diabetes detection software, user will able to do their self-checkup without taking help of a doctor. This system will keep records of particular patient or of any person and by using their general data collected during analysis process it will able to tell you, whether you are suffering from diabetes or not. Apart from these, based on your collected data, it will also provide suggestion and general precautions which is to be taken by you in order to improve your health. This system having the ability to detect diabetes and categories as per the data which has been collected during questions answer section. Its user friendly graphical mode will make its user to use this system in interactive manner. You will have to just answer few questions and these questions has been divided into two section. Upon completion of these questions you will able to get your final result and your health status regarding diabetes. To keep records, you will required to ask your basic information and using these information, your final report will be prepared by keeping view of answer which has been provided by you. Number of options will be given in answer section and you have to select whatever suits you the best.

Existing System

As per the existing system, users have to invest money before knowing their diagnosis report. They have to visit diagnostic center, consult their doctor and wait for a day to get their result. If someone have only doubt and want to have a checkup, then it will have their wastage of money and time for them. Each time you have to provide your basic information and go through the same diagnosis process to get your diagnosis result which can be dangerous in some serious condition. Patients should go through the checkup process immediately before the diagnosis process, if such condition arises. So keeping customer records and searching their records manually sometimes not possible and sometime it’s a time taking process.

Diabetes Detection System Snapshots 

Diabetes Detection System main
Personal information page
Diagnostic form

Proposed System:

All your previous and new records will be saved using the concept of file and directory. Binary search operation will be performed while searching your record and you will also able to get your previous diagnosis report while using this system. This system will able to identify your sufferings related to diabetes and store into the file with your record id. Each patient will have particular record id and while searching, patient can differentiated between their details and others by selecting their date of birth and address details.

Download Project

Diabetes Detection System Abstract Download Abstract
Diabetes Detection System Code Download Source Code

Other Projects to Try:

  1. Phone Directory System project in C++
  2. Fraud Application Detection Using Data Mining
  3. Hospital Management Java Project
  4. Diabetes Prediction Using Data Mining Project
  5. Detection of Virus Patterns in Emails Project

Filed Under: C++ Projects Tagged With: C++ Projects

Shuffle Game project using c++

October 3, 2014 by ProjectsGeek 2 Comments

Shuffle Game project using c++

 

 

About the shuffle game

This program is good example of using graphics concept to develop an application using C++. Under this game a number game has been prepared by which users will able to get graphical mode on command line interface. Users will have to just run the program and program will guide the users how to play the game and exit from it. In order to run the program users have to first give the proper path of the graphics driver which is available under bgi.

To check the whether graphics driver is available or not, you have to quit the turbo c++ shell and you will be taken to the C:\TURBOC3\BIN. You will have to change the directory to check whether bgi driver is available or not. So you can change directory by CD… and press enter. After changing the directory you will be taken to C:\TURBOC3\ after which you will have to go to next directory by entering C:\TURBOC3\BGI and press enter to check whether bgi graphics driver is available. If available then only this program will run successfully. The directory of bgi can be different as per the compiler you are using. This is the path of the graphics driver which you have to give in this program to enjoy the shuffle game.       

Shuffle Game  Snapshots      

rules page
Shuffle Game project
Game menu

Once this program has been run successfully, you will get the welcome page of the shuffle game as below:-

To start this game, you have to press any key, for few seconds the color of the written texts in graphics will change in different colors and it will be redirected to the next section. In the next section you will be given choice for making your selection. There will be two types of option. Option 1 will be to play the game and option 2 will be the instruction which you have to follow while playing this game.

If you will press 2, the instruction will be shown on the above screen and if you will press 1 its screen will change and redirected to next section where you have to play the game by moving the numbers. You have to press number which you want to move and use arrow keys to move the particular number to the desired location.

One the game has been started you can quit the game anytime by pressing X character. Once this character has been entered, you will taken out from the game.

Download Project

Shuffle Game project Abstract Abstract Download
Shuffle Game Source Code Source Code Download

Other Projects to Try:

  1. Periodic Table Program using C++ Language
  2. Java Board Game Android Project with Source
  3. Airstrike System Game Project in Java
  4. Pong Game Java Project
  5. Snake ladder Game project using C++

Filed Under: C++ Projects Tagged With: C++ Projects

  • Page 1
  • Page 2
  • Page 3
  • Interim pages omitted …
  • Page 5
  • Go to Next Page »

Primary Sidebar

Tags

.Net Projects Download Android Project Ideas Android Projects Angular 2 Assembly Codes C # Projects C & C++ Projects C++ Projects Class Diagrams Computer Graphics Database Project Data Mining Projects DataScience Projects Datastructure Assignments Download Visual Basic Projects Electronics project Hadoop Projects Installation Guides Internet of Things Project IOS Projects Java Java Interview Questions Java Projects JavaScript JavaScript Projects java tutorial JSON JSP Projects Mechanical Projects Mongodb Networking Projects Node JS Projects OS Problems php Projects Placement Papers Project Ideas Python Projects seminar and presentation Struts

Search this Website


Footer

Download Java Project
Download Visual Basic Projects
Download .Net Projects
Download VB Projects
Download C++ Projects
Download NodeJs Projects
Download School Projects
Download School Projects
Ask Questions - Forum
Latest Projects Ideas
Assembly Codes
Datastructure Assignments
Computer Graphics Lab
Operating system Lab
australia-and-India-flag
  • Home
  • About me
  • Contact Form
  • Submit Your Work
  • Site Map
  • Privacy Policy