Ow can I insert or delete a line (or record) in the middle of a file?
Answer / Manas Mishra
To insert a line in the middle of a file, you typically don't overwrite the existing file. Instead, you write the new content to a temporary file and then rename it to replace the original file. For deleting a line, you would read the file into memory, remove the desired line, and then write the modified data back to the file.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between printf and scanf )?
Which programming language is best for getting job 2020?
Can you define which header file to include at compile time?
What is meant by 'bit masking'?
5. distance conversion: Convert a distance from miles to kilometers .there are 5280 feets per mile,12 inches per foot .2.54 centimeters per inch and 100000centimeters per kilometer
Why can’t we compare structures?
#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.
Predict the output or error(s) for the following: 25. main() { printf("%p",main); }
write a c program to remove all the duplicate characters in a string and replace with single character? ex:-input- AAABBBCCC output- ABC
Would you rather wait for the results of a quicksort, a linear search, or a bubble sort on a 200000 element array? 1) Quicksort 2) Linear Search 3) Bubble Sort
Explain the use of function toupper() with and example code?
Explain the difference between exit() and _exit() function?