Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C program help! ==> use open(),(read(),lseek(),write(),close() // you need to complete this function // fd: file descriptor passed by the main function // name: string

  1. C program help!
  2. ==> use open(),(read(),lseek(),write(),close()

// you need to complete this function // fd: file descriptor passed by the main function // name: string for the file name int convertToUpper(int fd, const char* name) {

-

-

-

-

}

int main() {

int i, cnt, fd, nread; off_t fileSize; char temp[500]; fd = open("data.txt", O_RDWR); fileSize = lseek(fd, (off_t)0, SEEK_END); lseek(fd, (off_t)0, SEEK_SET); cnt = convertToUpper(fd, "data.txt"); lseek(fd, (off_t)0, SEEK_SET); nread = read(fd, temp, 500); for(i=0; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions