Sie sind auf Seite 1von 4

9/20/13

Program of telephone directory that provides append, find and display all records from a file - C Programming Examples and Tutorials
Welcome - Guest! Login / Register Now |

Search:

Search

HOME

ARTICLES

FORUM

INTERVIEW FAQ

ACTIVITIES

NEWS

VIDEOS

POLL

LINKS

PEOPLE

GROUPS

DailyFreeCode
Like 1,907

C Programming Articles
Home Articles C Programming BIOS Programming

Submit Article
RSS Feeds

Program of telephone directory that provides append, find and display all records from a file
Posted By: Easy Tutor Category: C Programming Views: 4508

Write a program of telephone directory that provides below facility using file. 1) Add and Append records 2) Search / Find 3) Display all records

C Programming View All Homework Help Data File Structure Projects Beginners BIOS Programming TSR Programming Interrupt Programming Mouse Programming Keyboard Programming Parallel Port Programm... Parallel Processing Pr... Computer Graphics Mathematics Program Numerical Methods Interview FAQ Assembly Language Artificial Intelligence C++ Programming Visual C++ OOAD Cobol Java SQL Server Asp.net MVC Rest and WCF Services Entity Framework Knockout.Js Unix / Linux / Ubuntu Networking OOPs Concept HTML

Download Sourcecode for Program of telephone directory that provides append, find and display all records from a file (Size: .81 KB)

Dos SQL System Analysis & Design Gadgets Internet CSS Javascript .Net Framework Asp.net C# VB.Net Python

Code for Program of telephone directory that provides append, find and display all records from a file in C Programming
# i n c l u d e< s t d i o . h > # i n c l u d e< c o n i o . h > # i n c l u d e< s t r i n g . h > s t r u c tp e r s o n { c h a rn a m e [ 2 0 ] ; l o n gt e l n o ; } ; v o i da p p e n d D a t a ( ) { F I L E* f p ; s t r u c tp e r s o no b j ; c l r s c r ( ) ; f p = f o p e n ( " d a t a . t x t " , " a " ) ; p r i n t f ( " * * * * * A d dR e c o r d * * * * \ n " ) ;

www.dailyfreecode.com/Code/telephone-directory-provides-append-617.aspx

1/4

9/20/13

Program of telephone directory that provides append, find and display all records from a file - C Programming Examples and Tutorials
p r i n t f ( " E n t e rN a m e:" ) ; s c a n f ( " % s " , o b j . n a m e ) ; p r i n t f ( " E n t e rT e l e p h o n eN o .:" ) ; s c a n f ( " % l d " , & o b j . t e l n o ) ; f p r i n t f ( f p , " % 2 0 s% 7 l d " , o b j . n a m e , o b j . t e l n o ) ; f c l o s e ( f p ) ;

Perl Oracle Software Engineering RDBMS Terms AJAX Framework Design Pattern UML WPF WCF SEO PowerShell Visual Studio WWF BizTalk Server Azure General Testing Online Certifications

} v o i ds h o w A l l D a t a ( ) { F I L E* f p ; s t r u c tp e r s o no b j ; c l r s c r ( ) ; f p = f o p e n ( " d a t a . t x t " , " r " ) ; p r i n t f ( " * * * * * D i s p l a yA l lR e c o r d s * * * * * \ n " ) ; p r i n t f ( " \ n \ n \ t \ t N a m e \ t \ t \ t T e l e p h o n eN o . " ) ; p r i n t f ( " \ n \ t \ t = = = = = \ t \ t \ t = = = = = = = = = = = = = = = \ n \ n " ) ; w h i l e ( ! f e o f ( f p ) ) { f s c a n f ( f p , " % 2 0 s% 7 l d " , o b j . n a m e , & o b j . t e l n o ) ; p r i n t f ( " % 2 0 s% 3 0 l d \ n " , o b j . n a m e , o b j . t e l n o ) ; } f c l o s e ( f p ) ; g e t c h ( ) ; } v o i df i n d D a t a ( ) { F I L E* f p ; s t r u c tp e r s o no b j ; c h a rn a m e [ 2 0 ] ; i n tt o t r e c = 0 ; c l r s c r ( ) ; f p = f o p e n ( " d a t a . t x t " , " r " ) ; p r i n t f ( " * * * * * D i s p l a yS p e c i f i cR e c o r d s * * * * * \ n " ) ; p r i n t f ( " \ n E n t e rN a m e:" ) ; s c a n f ( " % s " , & n a m e ) ; w h i l e ( ! f e o f ( f p ) ) { f s c a n f ( f p , " % 2 0 s% 7 l d " , o b j . n a m e , & o b j . t e l n o ) ; i f ( s t r c m p i ( o b j . n a m e , n a m e ) = = 0 ) { p r i n t f ( " \ n \ n N a m e : % s " , o b j . n a m e ) ; p r i n t f ( " \ n T e l e p h o n eN o:% l d " , o b j . t e l n o ) ; t o t r e c + + ; } } i f ( t o t r e c = = 0 ) p r i n t f ( " \ n \ n \ n N oD a t aF o u n d " ) ; e l s e p r i n t f ( " \ n \ n = = = T o t a l% dR e c o r df o u n d = = = " , t o t r e c ) ; f c l o s e ( f p ) ; g e t c h ( ) ; }

PHP My SQL LinQ Project Management Silverlight XML MS Office Windows OS

v o i dm a i n ( ) { c h a rc h o i c e ; w h i l e ( 1 ) { c l r s c r ( ) ; p r i n t f ( " * * * * * T E L E P H O N ED I R E C T O R Y * * * * * \ n \ n " ) ; p r i n t f ( " 1 )A p p e n dR e c o r d \ n " ) ; p r i n t f ( " 2 )F i n dR e c o r d \ n " ) ; p r i n t f ( " 3 )R e a da l lr e c o r d \ n " ) ; p r i n t f ( " 4 )e x i t \ n " ) ; p r i n t f ( " E n t e ry o u rc h o i c e:" ) ; f f l u s h ( s t d i n ) ; c h o i c e=g e t c h e ( ) ; s w i t c h ( c h o i c e ) { c a s e ' 1 ':/ / c a l la p p e n dr e c o r d a p p e n d D a t a ( ) ; b r e a k ; c a s e ' 2 ':/ / c a l lf i n dr e c o r d f i n d D a t a ( ) ; b r e a k ; c a s e ' 3 ':/ / R e a da l lr e c o r d s h o w A l l D a t a ( ) ; b r e a k ; c a s e ' 4 ': c a s e2 7 :e x i t ( 1 ) ; } } }

DHTML Sharepoint

Share:

15

1293

Like

Previous Post: Program to sort numbers in ascending order and use integer pointer to store

Next Post: Program to concatenate two strings

www.dailyfreecode.com/Code/telephone-directory-provides-append-617.aspx

2/4

9/20/13

Program of telephone directory that provides append, find and display all records from a file - C Programming Examples and Tutorials

numbers
Didn't find what you were looking for? Find more on Program of telephone directory that provides append, find and display all records from a file Or get search suggestion and latest updates. Easy Tutor author of Program of telephone directory that provides append, find and display all records from a file is from United States. Easy Tutor says Hello Friends, I am Free Lance Tutor, who helped student in completing their homework. I have 4 Years of hands on experience on helping student in completing their homework. I also guide them in doing their final year projects. I have share many programs on this website for everyone to use freely, if you need further assistance, than please contact me on easytutor.2ya [at the rate] gmail [dot] com I have special discount scheme for providing tutor services. I am providing tutor service to students from various contries, currently most of my students are from United States, India, Australia, Pakistan, Germany, UK and Canada. I am also here to expand my technical network to receive more opportunity in my career, make friends to help them in resolving their technical problem, learn and share my knowledge, If you like to be my friend, Please send me friend request. Thanks, Happy Programming :)

View All Articles

Related Articles and Code:


Program to add record in a file, search record by name telephone number and display all records from a file Electronic Telephone Directory - File Handling and Graphics Program to display bill receipt based on customer information and create telephone directory Script to make File and Directory Management Operations menu based : Display Current directory, List Directory, Make Directory, Change Directory etc Program that maintains telephone directory Menu driven telephone directory program Program of telephone directory Program to writes the records reside in the input file and displays on the screen PROGRAM TO CREATE THE RELATIVE FILE AND ADD RECORD,UPDETE RECORD,DELETE PERTICULAR RECORD AND READ THE SPCIFY RECORD Shell script to perform operations like display, list, make directory and copy, rename, delete, edit file File handling program to display directory contents APPENDING ITEMS TO AN EXISTING FILE USING DO WHILE LOOP Program to perform array operations like append, insert, delete, edit, display and search and element Program of circular doubly link list with insert, append, delete, copy, reverse and display operations Program to Accept The Records of Employee and Store the contents in one file and store the records of a particular field in another file Perform directory operations like display current , list, Make, Change directory and file operations like Copy, Rename, Delete, Edit based on menu PROGRAM FOR INPUT RECORDS INTO THE FILE USING EXTEND MODE PROGRAM TO SEARCH THE RECORDS FROM FILE PROGRAM TO SORT THE RECORDS OF FILE PROGRAM TO SORT THE RECORDS OF FILE

Other Interesting Articles in C Programming:


Program to do sum of numbers from 1 to 10, by dividing the job into two processes using Shared Memory Use of structure pointers as function parameters Sort given string in ascending order Program to print multiple of 5 Program of ADAMS-MOULTON METHOD GUASS JORDEN ELIMINATION METHOD Program to read the following numbers,round them off to the nearest integers and print out the results in integer form: 35.7 50.21 -23.73 -46.45 Program to make Ctrl and Alt Key Pressed on a Key Press from Keyboard String handling by pointers Program to display triangle Program to print multiplication table using two-dimensional array

www.dailyfreecode.com/Code/telephone-directory-provides-append-617.aspx

3/4

9/20/13

Program of telephone directory that provides append, find and display all records from a file - C Programming Examples and Tutorials
Program to find vowel Occurances from a given string Program to allocate memory dynamically for strings, and store their addresses in array of pointers to strings Sorting of a sturcture of multiple keys Program to copy one string to another by coding and using string function Print reverse linked list Program to calculate months in a provided number of days from user Program to do subtraction of two numbers Program to get and set System Date using Interrupt 21h Program to do sum of the elements of the array using self scheduling

Please enter your Comment

Comment should be atleast 30 Characters. Please put code inside [Code] your code [/Code].

Please login to post comment

No Comment Found, Be the First to post comment!

RSS Feeds: Terms:

Articles | Forum | New Users | Activities | Interview FAQ | Poll | Hotlinks Terms of Use | Privacy Policy | Contact us

Social Networking: Hall of Fame | Facebook | Twitter | LinkedIn

Copyright 2008-2012

www.dailyfreecode.com/Code/telephone-directory-provides-append-617.aspx

4/4

Das könnte Ihnen auch gefallen