Tuesday, August 20, 2019
Procedure Oriented Programming
Procedure Oriented Programming à Submitted by: Gagandeep Singh Brarà Procedure oriented programming is a set of functions. In this program Clanguage is used. To perform any particular task, set of function are compulsory. For example , a program may involve collecting data from user, performing some kind of calculation on that data and printing the data on screen when is requested. Calculating, reading or printing can be written in a program with the help of different functions on different tasks. POP method also emphases the functions or the subroutines. Structure of POP method Here is some problems in POP method like its difficult to handling data because it gives no importance to data.Ãâà Dat means the information that are collected from user and after calculation new result come. If any one is familiar with C programming than he may recollect storage classes in C.Ãâà In C, data member is declared GLOBAL in order to make 2 or more functions in the program. What happen when 2 or functions on the same data member. For example,Ãâà when if there are 7 functions in a program and this become a global data member. Unfortunately,Ãâà if the value of any global data member or that may key element than it will affect the whole program. It is a big problem to identify that which function is causing the problem. Handling of data functions in POP One of the most important feature of C language is structure. Programmer use integer data, decimal point data(float), array data pack togetherÃâà into single entity by using structure. The reason of the popularity of structure was introduced first by c language. Object Oriented Programming An OOP method differs from POP in its basic approach itself. All the best features of structured of OOP is developed by retaining the programming method, in which they have added number of concepts which makes efficient programming. Object oriented programming methods have number of features and it makes possible an entirely new way of approaching a program. We have to mind first that OOP retains all best features of POP method like functions/sub routines, structure etc. 1) The first feature that any programmer would talk about OOP is data hiding facility. Programmer can hide the important core data from external world by using OOP method. The basic concept of OOP revolves around a feature similar to structure in POP, named as class in OOP.. Data members can be declared as private or public inside a class.Ãâà Programmer have to note that a class is really similar to structure in C. Due to same structure, a class packs together different things into a single entity. 2) Another important feature of OOP is code reusability. The simple means of code reusability is just that the code is written earlier in program or read or used it later.Ãâà This is made possible by a feature of classes named inheritance. By using inheritance, one class can acquire the properties of another class. Let i will try to explain this using an example. Take the example of a School Management System and management decided to make software based on the data ofÃâà students only. The programmer made the software and deciding to collecting personal details like Name, Age, Sex, Address etc. After one year school management decides to incorporate data of teachers to the software. The programmer can add this extension within a small time as he can reuse many of the codes he had written earlier by making use of inheritance. The class personal details is of general nature (Age, Sex etc are same for every person irrespective of student/teacher). ( CircuitsToday, 2015) C codes #include #includeÃâà //1 FILE *fpgagan;Ãâà //the actual students file FILE *fp1gagan; //temporary file Ãâà Ãâà Ãâà struct st_record Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà int id; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà char fname[20]; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà char lname[20]; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà char class_name[20]; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà char address[40]; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà char phone[12]; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà char email[20]; Ãâà Ãâà Ãâà }; Ãâà Ãâà Ãâà struct st_record s1; void main() { Ãâà Ãâà Ãâà menu(); } menu() { Ãâà Ãâà Ãâà int choice; Ãâà Ãâà Ãâà printf(nPress 1 to create a new record); Ãâà Ãâà Ãâà printf(nPress 2 to edit an existing record); Ãâà Ãâà Ãâà printf(nPress 3 to search records); Ãâà Ãâà Ãâà printf(nPress 4 to delete a record); Ãâà Ãâà Ãâà printf(nPress 5 to exit this p program n); Ãâà Ãâà Ãâà scanf(%d, choice); Ãâà Ãâà Ãâà if(choice == 1) Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà create_fn(); Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà else if(choice == 2) Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà edit_fn(); Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà else if(choice == 3) Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà search_fn(); Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà else if(choice == 4) Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà delete_fn(); Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà else if(choice == 5) Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà exit_fn(); Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà else Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nPlease enter the correct choice); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà menu(); Ãâà Ãâà Ãâà } } create_fn() { Ãâà Ãâà Ãâà printf(nStudent ID :); Ãâà Ãâà Ãâà scanf(%d, s1.id); Ãâà Ãâà Ãâà printf(nFirst name :); Ãâà Ãâà Ãâà scanf(%s, s1.fname); Ãâà Ãâà Ãâà printf(nLast name :); Ãâà Ãâà Ãâà scanf(%s, s1.lname); Ãâà Ãâà Ãâà printf(nClass name :); Ãâà Ãâà Ãâà scanf(%s, s1.class_name); Ãâà Ãâà Ãâà printf(nAddress :); Ãâà Ãâà Ãâà scanf(%s, s1.address); Ãâà Ãâà Ãâà printf(nPhone :); Ãâà Ãâà Ãâà scanf(%s, s1.phone); Ãâà Ãâà Ãâà printf(nEmail :); Ãâà Ãâà Ãâà scanf(%s, s1.email); Ãâà Ãâà Ãâà fpgagan=fopen(students.txt,a+);Ãâà //3 Ãâà Ãâà Ãâà fprintf(fpgagan,n%dt%st%st%st%st%st%s,s1.id,s1.fname,s1.lname,s1.class_name,s1.address,s1.phone,s1.email); //4 Ãâà Ãâà Ãâà fclose(fpgagan); Ãâà Ãâà Ãâà menu(); } edit_fn() { Ãâà Ãâà Ãâà printf(nThis is the edit function); Ãâà Ãâà Ãâà int id1,found; Ãâà Ãâà Ãâà found = 0; Ãâà Ãâà Ãâà printf(nPlease enter the Student ID :); Ãâà Ãâà Ãâà scanf(%d, id1); Ãâà Ãâà Ãâà if((fpgagan=fopen(students.txt,r))==NULL) Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(Empty); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà else Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fp1gagan=fopen(students1.txt,a+); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà while(!feof(fpgagan) found==0) Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fscanf(fpgagan,n%dt%st%st%st%st%st%s,s1.id,s1.fname,s1.lname,s1.class_name,s1.address,s1.phone,s1.email); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà if(s1.id==id1) { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà found=1; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nStudent record found.); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(n%dt%st%st%st%st%st%s,s1.id,s1.fname,s1.lname,s1.class_name,s1.address,s1.phone,s1.email); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nEnter the new details now); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nStudent ID :); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà scanf(%d, s1.id); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nFirst name :); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà scanf(%s, s1.fname); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nLast name :); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà scanf(%s, s1.lname); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nClass name :); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà scanf(%s, s1.class_name); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nAddress :); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà scanf(%s, s1.address); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nPhone :); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà scanf(%s, s1.phone); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nEmail :); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà scanf(%s, s1.email); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fprintf(fp1gagan,n%dt%st%st%st%st%st%s,s1.id,s1.fname,s1.lname,s1.class_name,s1.address,s1.phone,s1.email); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà continue; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà else { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fprintf(fp1gagan,n%dt%st%st%st%st%st%s,s1.id,s1.fname,s1.lname,s1.class_name,s1.address,s1.phone,s1.email); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fclose(fpgagan); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fclose(fp1gagan); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà remove(students.txt); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà rename(students1.txt,students.txt); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà if(found!=1) Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(Not found); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà getch(); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà menu(); } search_fn() { Ãâà Ãâà Ãâà int id1,found; Ãâà Ãâà Ãâà found = 0; Ãâà Ãâà Ãâà printf(nPlease enter the Student ID :); Ãâà Ãâà Ãâà scanf(%d, id1); Ãâà Ãâà Ãâà if((fpgagan=fopen(students.txt,r))==NULL) Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(Empty); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà else Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà while(!feof(fpgagan) found==0) Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fscanf(fpgagan,n%dt%st%st%st%st%st%s,s1.id,s1.fname,s1.lname,s1.class_name,s1.address,s1.phone,s1.email); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà if(s1.id==id1) Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà found=1; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà if(found==1) Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nStudent record found.); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(n%dt%st%st%st%st%st%s,s1.id,s1.fname,s1.lname,s1.class_name,s1.address,s1.phone,s1.email); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà else Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(Not found); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà getch(); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà menu(); } delete_fn() { Ãâà Ãâà Ãâà printf(nThis is the delete function); Ãâà Ãâà Ãâà int id1,found; Ãâà Ãâà Ãâà found = 0; Ãâà Ãâà Ãâà printf(nPlease enter the Student ID :); Ãâà Ãâà Ãâà scanf(%d, id1); Ãâà Ãâà Ãâà if((fpgagan=fopen(students.txt,r))==NULL) Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(Empty); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà else Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fp1gagan=fopen(students1.txt,a+); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà while(!feof(fpgagan) found==0) Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fscanf(fpgagan,n%dt%st%st%st%st%st%s,s1.id,s1.fname,s1.lname,s1.class_name,s1.address,s1.phone,s1.email); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà if(s1.id==id1) { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà found=1; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nStudent record found.); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(n%dt%st%st%st%st%st%s,s1.id,s1.fname,s1.lname,s1.class_name,s1.address,s1.phone,s1.email); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(nRecord deleted); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà continue; Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà else { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fprintf(fp1gagan,n%dt%st%st%st%st%st%s,s1.id,s1.fname,s1.lname,s1.class_name,s1.address,s1.phone,s1.email); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fclose(fpgagan); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà fclose(fp1gagan); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà remove(students.txt); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà rename(students1.txt,students.txt); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà if(found!=1) Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà { Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà printf(Not found); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà getch(); Ãâà Ãâà Ãâà Ãâà Ãâà Ãâà } Ãâà Ãâà Ãâà menu(); } exit_fn() { Ãâà Ãâà Ãâà Ãâà printf(nThis is the exit function); } Here we are recording three studentsÃâà record In this screen short we are able to see the record of the students In this screen shot we try to editing the record Here we can see the change in the record. Here we try to delete the record And in this screen shot only one record is left CircuitsToday. (2015). Retrieved from Difference between Procedure Oriented(POP) and Object Oriented Programming(OOP): http://www.circuitstoday.com/difference-between-procedure-oriented-and-object-oriented-programming
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.