Posted inC Programming To write to a file in C Language https://youtu.be/1wKcHX4NYJA #include <stdio.h> int main(void) { FILE *fp = fopen("out.txt", "w"); fprintf(fp, "%s", "File write example in C"); fclose(fp); return 0; }
Posted inC Programming How to read from a file in C Programming https://youtu.be/ixQTp57BJXQ #include <stdio.h> int main(void) { char text[100]; FILE *fp = fopen("readme.txt", "r"); if (!fp) { printf("Cannot open the file.\n"); return 1; } while (fgets(text, 100, fp) != NULL) {…
Posted inC Programming putchar function in C Programming https://youtu.be/je4jonog5uo #include <stdio.h> int main(void) { char a = 'B'; // putchar(a); char myArr[] = "Hello"; for (size_t i = 0; i < (sizeof(myArr) / sizeof(myArr[0])); i++) { putchar(myArr[i]); }…
Posted inPython puts function in C language https://youtu.be/z6OFEqnZBMA #include <stdio.h> int main(void) { puts("Message by puts()"); return 0; }