Questions tagged [low-level-io]

Byte or character level I/O or functions for performing I/O operations on descriptors.

Byte or character level input/output or functions for performing input/output operations on descriptors.

71 questions
0
votes
1 answer

Find a Name in an Email (Low-Level I/O)

Round 2: Picking out leaders in an email Alrighty, so my next problem is trying to figure out who the leader is in a project. In order to determine this, we are given an email and have to find who says "Do you want..." (capitalization may vary). I…
Jessica Marie
  • 293
  • 5
  • 16
0
votes
1 answer

Integrity of two image files of different size running same os issue

I have a requirement. I have two virtual image files running light weight linux distribution (eg : slitaz),whose disk sizes are different. I want to check the integrity of the kernel running of these image files at a given point in time at…
0
votes
1 answer

Writing a full-line accepted from standard-input to a file with low-level C i/o

I am writing a program that concatenates a line input from standard-input with a seperate file, and writes the combined text to an output file. For some reason when I type a full line of text into standard input, only the first word before…
user2942181
0
votes
1 answer

Write the contents of a file to standard-out using system calls?

I understand how to open a file and write the contents of that file into another file. I want to know how to open a file using low-level system calls open() write() read() close() to open the same file and write it to standard-out. Is this…
Chips
  • 15
  • 1
  • 4
0
votes
4 answers

How can I write a string to a file using the low-level write() function?

For example, I am able to write the contents of an input file to and output file with: char buffer[1024]; // character buffer char userInput[1024]; // for user input char *p; char *q; int n; int input_file1; // file descriptor for file 1 int…
Chips
  • 15
  • 1
  • 4
-1
votes
1 answer

Printing a number of lines using low level i/o in C

I am new to C and I'm trying to get familiar with low level I/O such as read() and write(), and I'm trying to print lines to standard out from a file using it, but I can't figure out how to do it while still only using low level functions. Heres…
maltreat
  • 1
  • 1
-1
votes
2 answers

How do I recreate the recv() with read()?

Because of specifications requirement, I'm not allowed to use recv() or similar functions to read from socket's fd. I was wondering how I would remake that function using read()? I've attempted creating it with the following code int recvFromFd(int…
user10416282
  • 33
  • 1
  • 7
-1
votes
1 answer

Low level page manager in C/C++

I need a library (C/C++) that handles the basic operations of a low level pager layer on disk. The library must include methods to get a disk page, add data, write the page to disk etc. To give a bit of background: Assume there's a particular…
kami
  • 361
  • 3
  • 15
-1
votes
1 answer

Why is my C program not printing anything out?

my code is supposed to be reading in 2 files given on the command line and then printing them out to STDOUT unless a 3rd argument is given, in which case it should print to that file instead of STDOUT. I feel like everything is right but when I run…
-1
votes
2 answers

After successful open(), program is stalling on read()

I've been banging my head against my desk for a few hours now, trying to figure out why the following code is stalling at while(chars = read(fd, buff, BUFF_SZ)) > 0). The printf on the line directly following is not being called and the one directly…
Dan
  • 3,246
  • 1
  • 32
  • 52
-3
votes
1 answer

Why is this program only printing out the first line?

Could someone explain why the following code is only printing out the first line as opposed to the first 3 lines? I went through the for-loop manually on a sheet of paper, and I thought that it would increment by 3 lines, but my logic must be off…
HelpMe
  • 7
  • 1
  • 6
1 2 3 4
5