hw_09_vasani

hw_09_vasani - Homework #9 November 10, 2010 Vasani,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
November 10, 2010 Vasani, Radhika 6817 I promise that I did all the work by myself without help from other students. I understand that violating this promise will result in automatic 0 point and penalties as severe as expulsion from UTA. Radhika Vasani Problem 1 Program listing #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { FILE *fp; int count; fp=fopen("counter.dat", "r"); fscanf(fp, "%d", &count); fclose(fp); count=count+1; fp=fopen("counter.dat", "w"); fprintf(fp, "%d", count); fclose(fp); printf("Content-type: text/html\n\n"); printf("<title>Seconds since 1970</title>"); printf("<font color=red><center><h1>Second Counter<br><h1></center></font>"); printf("<h3>Since January 1, 1970,<font color=blue>%d</font> seconds havepassed.<h3><p>",time(NULL)); printf("You are the <font color=blue>%d</font>-th visitor.<p><hr>",count); printf("<h5>Hit F5 (Function key 5) to refresh<h5>"); return 0; } Link http://omega.uta.edu/~rpv6817/cgi-bin/hw09.cgi
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/20/2010 for the course MAE 2360 taught by Professor No during the Fall '10 term at UT Arlington.

Page1 / 3

hw_09_vasani - Homework #9 November 10, 2010 Vasani,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online