This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:psechris:portfolio:cprogproject1 [2013/01/28 15:39] – [Project: Hello World(Joe's Class)] psechris | user:psechris:portfolio:cprogproject1 [2013/03/05 05:37] (current) – psechris | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Project: | ||
+ | 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/ | ||
+ | |||
+ | * 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 < | ||
+ | #include < | ||
+ | |||
+ | int main(int argc, char *argv[]) | ||
+ | { | ||
+ | |||
+ | char *name = ( char*)malloc(sizeof(char)); | ||
+ | |||
+ | fprintf(stdout, | ||
+ | fscanf(stdin, | ||
+ | fprintf(stdout, | ||
+ | |||
+ | return 0; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | =====Execution===== | ||
+ | |||
+ | <cli> | ||
+ | G: | ||
+ | Enter your name: | ||
+ | Paul | ||
+ | Hello Paul! | ||
+ | G: | ||
+ | </ |