No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "memo_list.h" void shownotes(Memo item); char * s_gets(char * st, int n); int main() { List Notes; Memo temp; FILE *wfile,*sfile,*lfile,*rfile; char ch; char *line ; /* initialize */ InitializeList(&Notes); /*check IsFull? */ if (ListIsFull(&Notes)) { fprintf(stderr,"No memory available! Bye!\n"); exit(1); } puts("Enter char … |
|
this is my code : #include <stdio.h> #include <stdlib.h> int main(){ FILE *fp; int i,n; char task[ 30] ; char filename[ 30]="c:\\out.c"; fp =fopen(filename,"w"); if(fp != NULL){ printf("Enter number of tasks for today!\n"); scanf("%d", &n); for(i=0;i<n;++i){ printf( "Enter tasks for today!\n"); scanf("%s",task); fprintf(fp,"%s\n",task); } fclose(fp); printf("\nDone!"); }else{ printf("couldn't open the … |