Table of Contents

Part 1

Entries

Entry 1: January something, 2012

Entry 2: January something, 2012

Entry 3: February 16, 2012

Entry 4: January Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

Remember that 4 is just the minimum number of entries. Feel free to have more.

Keywords

cprog Keywords

Pointers

Since this seems to be a biggie I guess I will start here.

Definition

A pointer is a tool that “points” you to a block of memory and allows access to the data contained within.

Demonstration

Demonstration of the chosen keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

#include<stdio.h>
#include<stdlib.h>
int main( )
 
{
        int *p1, *p2, p3, **p4;
        p1=(int *)malloc(sizeof(int)*1);
        *p1=26;
        printf("*p1 is %u\n", *p1);
        p2=p1;
        p4=&p1;
        printf("**p4 is %u\n", **p4);
        printf("*p2 is %u\n", *p2);
        *p2=61;
        return(0);
}

File Access (Read, Write, Append)

Matt withheld some info saying something about the force not being strong enough to do everything I want to be capable of with this topic but I will get there.

Definition

File Access is the ability of C to “access a file.” (crazy how these things kind of define themselves) Essentially you can pull a file into C to Read it, create a file and write it, or append the file (make changes). On a side note if you intend to open a file via C you must also close the file.

Demonstration
#include<stdio.h>
#include<stdlib.h>
 
int main()
{
        FILE *in, *out;
        char value=0;
        in=fopen("file.txt", "r");
        out=fopen("out.txt", "w");
        if (in == NULL)
        {
                printf("ERROR!\n");
                exit(1);
        }
        fscanf(in, "%hhd", &value);
        while(value !=-1)
        {
                value *=2;
                fprintf(out, "%hhd\n", value);
                fscanf(in, "%hhd", &value);
        }
        fclose(in);
        fclose(out);
        return(0);
}

Arithmetic (equations, operators)

Definition

C can do math. Math can be done in C. operators being +-/* as they would be with math and equations working the same as would be expected.

Demonstration
#include <stdio.h>
#include <stdlib.h>
 
int main()
{
    int a=1;
    int b=5;
    int c=(a+b);
    printf("%d", c);
    return(0);
}

cprog Keyword 4

Identification of chosen keyword (unless you update the section heading above).

Definition

Definition (in your own words) of the chosen keyword.

Demonstration

Demonstration of the chosen keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

cprog Keyword 5

Identification of chosen keyword (unless you update the section heading above).

Definition

Definition (in your own words) of the chosen keyword.

Demonstration

Demonstration of the chosen keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

cprog Keyword 6

Identification of chosen keyword (unless you update the section heading above).

Definition

Definition (in your own words) of the chosen keyword.

Demonstration

Demonstration of the chosen keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

cprog Keyword 7

Identification of chosen keyword (unless you update the section heading above).

Definition

Definition (in your own words) of the chosen keyword.

Demonstration

Demonstration of the chosen keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

cprog Keyword 8

Identification of chosen keyword (unless you update the section heading above).

Definition

Definition (in your own words) of the chosen keyword.

Demonstration

Demonstration of the chosen keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

cprog Objective

cprog Objective

State the course objective

Definition

In your own words, define what that objective entails.

Method

State the method you will use for measuring successful academic/intellectual achievement of this objective.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

  • How did you do?
  • Is there room for improvement?
  • Could the measurement process be enhanced to be more effective?
  • Do you think this enhancement would be efficient to employ?
  • Could the course objective be altered to be more applicable? How would you alter it?

Experiments

Experiment 1

Question

Curious as always I want to know how closely C and C++ are related. If I take an existing(working) C program and try to compile it with a C++ compiler will it compile, and furthermore will it work.

Resources

-existing code -http://linuxhelp.blogspot.com/2006/04/steps-to-compile-c-c-programs-using.html

Hypothesis

I believe it will work flawlessly…or not I don't know if the syntax is the same, I am sure however that the libraries are universal.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

It worked easily and flawlessly with the proper output.

Analysis

Based on the data collected:

Conclusions

I can be sure that anything C can do C++ can do as well.

Experiment 2

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Experiment 3

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.