I am trying to write some text in to a file through the program. And then trying to print that text on to the screen. My program is running but with two warnings.
I couldn't understand and overcome those two warning messages
say:" Possible use of 'str' before definition in function main "
Could someone explain what does it mean
Code:#include<stdio.h> int main() { FILE *fp,*fs; char *str; fp=fopen("veer.txt","w"); fprintf(fp,"hi Welcome to Cprogramming."); fclose(fp); fs=fopen("veer.txt","r"); fgets(str,100,fs); printf("%s",str); fclose(fs); }