Course Hero Logo

For achieving file handling in c we need follow

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 35 - 38 out of 56 pages.

For achieving file handling in C we need follow following stepsNaming a fileOpening a fileReading data from fileWriting data into fileClosing a fileFunctions use in File Handling in C:1.open()To create a file2. close()To close an existing file3. getc()Read a character from a file4. putc()Sadigya Subedi (HND / First Semester)35
Write a character in file5. printf()To write set of data in file6. scanf()To read set of data from file.7. getw()To read an integer from a file8. putw()To write an integer in fileObject oriented programming languageObject-orientated programming breaks down a program into objects. Object-orientatedprogramming is different to procedural programming as it follows a different structural format toprocedural programming. Object-orientated programming was developed to deal with thecomplexities of more advanced systems when procedural programming couldn’t address thedifficulties that the system faced.Some examples of Object Oriented Programming Languages are;PHP5, C++ and Fortran 2003.Features of Object oriented programming languageSomeData encapsulationClass and ObjectInheritance and its TypesPolymorphismAbstractionOverloadingData encapsulationEncapsulationis the grouping of data and methods which work on that data together and providethe user an interface through which the user can accomplish tasks without getting into the detailsSadigya Subedi (HND / First Semester)36
of implementation. Data encapsulation, sometimes referred to as data hiding.While workingwith procedural languages, it is not always clear which functions work on which variables butobject-oriented programming provides you framework to place the data and the relevantfunctions together in the same object.Class and ObjectWhen we define a class, we define a blueprint for an object. Class doesn't actually defines anydata, but it defines what the class name means, i.e, what an object of the class will consist of andwhat operations can be performed on such an object.An Object is an identifiable entity with some characteristics and behaviour. An Object is aninstance of a Class. When a class is defined, no memory is allocated but whenan object is createdmemory is allocated.Inheritance and its TypesThe capability of a class to derive properties and characteristics from another class iscalledInheritance.Inheritance is one of the most important feature of Object OrientedProgramming. The child or derived class inherits all the features of its parent or base class, and isfree to add features of its own. In addition, this derived class may be used as the base class of aneven more specialized class. There are two types of class in inheritance. The two types of classare :-Sub ClassSuper ClassSub Class:The class that inherits properties from another class is called Sub class or DerivedClass.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 56 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
Bd
Tags

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture