Posts

C Program to open and write a text file.

  C Program to  open and write a text file.   #include <stdio.h> #include <conio.h>    void  main() {    FILE *fptr;  if (fp = fopen("Resume.txt", "wb")) {  printf("File opened successfully and write in binary mode .");    }    else    printf("Error!");    fclose(fptr);    getch();

C Program to shut down or turn off your machine or computer

  C Program to shut down or turn off your machine or computer #include <stdio.h> #include <stdlib.h>   int main() {    system("C:\\WINDOWS\\System32\\shutdown /s");      return 0; }