2076 11

CSC166 ยท 2076 ยท 5 marks

Which function can be used for reading and writing object? Define briefly. Write a program that reads values of two objects of students class (assume data members are id, name, and level) and display the data in monitor.

Which function can be used for reading and writing object? Define briefly. Write a program that reads values of two objects of students class (assume data members are id, name, and level) and display the data in monitor. [5]

Object Oriented ProgrammingChapter 8: File handlingRead/Write from File

In C++, the read() and write() member functions of file stream classes are used for reading and writing objects (binary data) to/from files or streams. Used to write an object (block of bytes) to a stream. Syntax: - (char ) casts the object address to a character pointer - sizeof(objectName) dete...