The function write is used to read from a file descriptor.
Which function is used to create a new file?
Which function is used to create a new file?
Which function is used to change the file offset?
Which function is used to change the file offset?
The function unlink creates a hard link.
The function unlink creates a hard link.
What will be the output of the following code snippet? #incl…
What will be the output of the following code snippet? #include void doSomething(char *str) { int len = 0; char *start = str; char *end; char temp; while (*str) { len++; str++; } end = start + len – 1; while (start < end) { temp = *start; *start = *end; *end = temp; start++; end--; } } int main() { char str[] = "Hello"; doSomething(str); printf("%s\n", str); return 0; }
Which function is used to write a string to a file?
Which function is used to write a string to a file?
What does the following code snippet demonstrate? #include…
What does the following code snippet demonstrate? #include struct point { int x; int y; }; struct point doSomething(int x, int y) { struct point p; p.x = x; p.y = y; return p; } int main() { struct point p = doSomething(7, 8); printf(“%d %d\n”, p.x, p.y); return 0; }
The function exit is used to terminate a process.
The function exit is used to terminate a process.
The function fgetc reads the next character from a file.
The function fgetc reads the next character from a file.
The function lseek is used to change the file offset.
The function lseek is used to change the file offset.