A Simple C Project

by | Feb 2, 2015 | 0 comments


Recently I just learned some basics of C Programming.After learning I made a simple project with C.My project is to make a program that create .html file with some valid Html5 codes.

Here is my codes for main.c :)

#include <stdio.h>
#include <stdlib.h>
This C Program Will Create Basic HTML5 Files.
int main()
//This is the main Function

char FileName[20];
printf("==========================WELCOME TO HTML5 FILE CREATOR=========================\n");

printf("Version : 1.0 \nCreated by : Nazmul Hossain Nihal \n\n");

printf("Your file will look like this: \n\n");
printf("\t<!DOCTYPE html>\n\t<html lang=\"en\">\n\t\t<head>\n\t\t\t<title>This File Was Generated by a C Program</title>\n\t\t\t<meta charset=\"UTF-8\" />\n\t\t</head>\n\t\t<body>\n\t\t\t<h1>This is a HTML5 File</h1>\n\t\t</body>\n\t</html>\n\n");
printf("Name your file: ");

char FileData[900] = "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<title>This File Was Generated by a C Program</title>\n\t\t<meta charset=\"UTF-8\" />\n\t</head>\n\t<body>\n\t\t<h1>This is a HTML5 File</h1>\n\t</body>\n</html>";

FILE * Fpointer;

Fpointer = fopen(FileName,"w");

printf("Your File %s has been successfully created \n" , FileName);

return 0;



Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Goodreads Updates

Goodreads Read Shelf