Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- // File Declareation
- // FILE FilePointer
- // int main() {
- // FILE *file;
- // file = fopen("input.txt", "w");
- // char arr[20];
- // gets(arr);
- // if(file == NULL) {
- // printf("File does not exist\n");
- // } else {
- // printf("File has been created\n");
- // fprintf(file, "%s", arr);
- // fclose(file); // closing the file
- // }
- // }
- // int main() {
- // char a = 'A';
- // printf("%d\n", a);
- // }
- // int main() {
- // int a = 15, b = 2;
- // double result = a / (double) b;
- // printf("%d\n", a);
- // printf("%.2lf\n", result);
- // }
- /*
- Creating a new File
- fopen("file path", file_mode);
- opening an existing file
- fopen("file path", file_mode);
- closing a file
- fclose(file_pointer);
- Reading from and writing information to a file
- To write something in a file ->
- fputs(string, file)
- fprintf(file_pointer, formate_specifier, variable_Name)
- To read something in a file ->
- fgets(variable, size, file_pointer)
- fscanf(file_pointer, formate_specifier, variable_name) ---> %[^\n]
- */
- /* Projects
- -----------
- ---> Structure
- --> insertion
- --> delete (optinal)
- --> update
- --> query
- ---> File (optional)
- Project submission: Mid exam sesh houar porer 5 diner
- Project Title
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement