User Tools

Site Tools


user:psechris:portfolio:cprogproject1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user:psechris:portfolio:cprogproject1 [2013/01/28 15:39] – [Project: Hello World(Joe's Class)] psechrisuser:psechris:portfolio:cprogproject1 [2013/03/05 05:37] (current) psechris
Line 1: Line 1:
 +======Project: Hello World======
  
 +A project for C/C++ by Paul Sechrist during the Spring 2013 semester.
 +
 +This project was begun on 1/28/13 and took 2 hours to complete.
 +
 +=====Objectives=====
 +
 +1. program must prompt with question
 +2. program must respond with answer including user’s response
 +
 +=====Challenges=====
 +
 +1. Use printf
 +2. Use scanf
 +
 +=====Prerequisites=====
 +In order to successfully accomplish/perform this project, the listed resources/experiences need to be consulted/achieved:
 +
 +  * Unordered List Itemversion control (Mercurial)
 +  * repository hosting (Bitbucket)
 +  * development tools (gcc, cl, llvm)
 +  * development environments (mingw, cygwin, linux, visual studio)
 +  * lab46
 +  * standards (ISO 9899)
 +
 +=====Code=====
 +
 +<code c 1>
 +#include <stdio.h>
 +#include <stdlib.h>
 +
 +int main(int argc, char *argv[]) 
 +{
 +
 + char *name = ( char*)malloc(sizeof(char));
 +
 + fprintf(stdout, "Enter your name: \n");
 +    fscanf(stdin, "%s", &name);
 + fprintf(stdout, "Hello %s!", &name);
 +
 + return 0;
 +}
 +</code>
 +
 +=====Execution=====
 +
 +<cli>
 +G:\CCC\CSCS1320\Joe>week1project.exe
 +Enter your name:
 +Paul
 +Hello Paul!
 +G:\CCC\CSCS1320\Joe>
 +</cli>