2. Write a c program to delete a file.
3. Write a c program to copy a file from one location to other location.
6. Write a c program which writes string in the file.
C language interview questions solution for freshers beginners placement tricky good pointers answers explanation operators data types arrays structures functions recursion preprocessors looping file handling strings switch case if else printf advance linux objective mcq faq online written test prime numbers Armstrong Fibonacci series factorial palindrome code programs examples on c++ tutorials and pdf
7 comments:
How to read a text file by c program
#include
int main(){
char str[70];
FILE *p;
if((p=fopen("string.txt","r"))==NULL){
printf("\nUnable t open file string.txt");
exit(1);
}
while(fgets(str,70,p)!=NULL)
puts(str);
fclose(p);
return 0;
}
*****************************************
hi,
i am trying to compile this program in ubuntu oprating system but given some error,
plz give me the explanation.
you have to write #include
you have to write
stdlib header file.
I want to make a simple bus management system project using file handling
Can you help me???
Post a Comment