Your root document should consist of a random number of lines of the nursery rhyme"Hickory Dickory Dock", the official lyrics are listed below. You should serve the document as plain text(to keep things simple).You reply must include a correct Content-Type header of text/plain and a content-Length header that reflects the size of the data that you are sending.When generating random numbers the rand(>and srand(>methods are sufficient, but be careful where you seed the random number generator.
You may use the last 4 digits of your student number as the port to listen on, as you may not be able to bind to port 80
#include<time.h>
#include <stdlib.h>
#include <stdio.h>
int main)
{
srand(time(0));
for(int x = 0; x<4; x++)
printf(" %d ", rand());
return 0;
}
Comments
Leave a comment