User Tools

Site Tools


opus:fall2012:lalexan3:part3

Part 3

Entries

Entry 1: November 1st, 2012

Today for class we worked on our stacks program and utilized the idea of how to inplement the linkedlist structures to our stacks programs. still working on mine at the moment having some trouble trying to keep track of the nodes between the first and the last nodes. I have gathered some ideas of how to program such as separating my code into funtions and creating a header function that will call all of the other functions for the execution of the program, and how to send parameters to those functions. I think that i am scoming along nicley considering wherre i started from with joe.

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

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

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

Entry 2: November 7th, 2012

This week the stacks program is due and i only completed 3 out of the five required step that needed to be completed. I am However still working on completing it because ill need the structures finished prject to complete the binary tree that is due by the first of next month. so over the next few days i will be completing the stacks project even tho its already been turned in and i will keep working on the binary tree project asnd hope for the best. I am still having trouble keeping track of those nodes in the middle is confusing cuz it should be working but its not just yet.

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

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

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

Entry 3: November 15, 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:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

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

this week I am still working on finishing my stacks program with joe and i finally got it to print out all of the number that were inputed. the implimentation was much like that of the singly linked list but was restricted to just viewing the last pushed number off the top. it ended up being more work intensive than i had orignially anticipated. The hardest thing about stacks for me was just to pop that last node without actually viewing the entire stack.

Entry 4: November 28, 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:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

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

This week i started working on my binary tree project and i finished building the tree and now I am working on finishing viewing the list and removing bifercations from the tree. I now have 4 fully functioning projects from this course, some of them took longer that the due date to complete but the finished work is available. My challenge with my tree was encountering the problem that when you create the tree each bifercation has tree pointers with it a pre, right, and left. When you attempt to remove a node which of the two pointers go next from the prev pointer. Thanks to Matt he told me that the best way to fix the issue would be to decide which node (left or right)will become the leader after the prev node that comes before will take the lead as you pointed out. this was a tremendous help to me so thanks a bunch.

Keywords

data Keyword 3

tree rebalancing

Definition

In computer science, a self-balancing (or height-balanced) binary search tree is any node-based binary search tree that automatically keeps its height (number of levels below the root) small in the face of arbitrary item insertions and deletions. These structures provide efficient implementations for mutable ordered lists, and can be used for other abstract data structures such as associative arrays, priority queues and sets.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1: google.com
  • Reference 2:wikipedia.com
  • Reference 3: yahoo.com

data Keyword 3 Phase 2

Function Pointer

Definition

Instead of referring to data values, a function pointer points to executable code within memory. When dereferenced, a function pointer can be used to invoke the function it points to and pass it arguments just like a normal function call.

References

Demonstration

Demonstration of the indicated 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$ 

Experiment 3

Question

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

The question that i would like to pose for an experiment is what is the difference betweent the c11 and the c 89 compilers that we learned about in class the other day.

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.

the resources that I am going to be using will primarily be google and yahoo and wikipedia, I will also bew asking questions in class and with joe to be more accurate with the information that will be used in this 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.

I think that the out come of this experiment wil be increasing my own knowledge with these compilers and how better to use them in the future and finding out what is the main differences between them.

Experiment

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

To test my hypothesis i will begin by reviewing what each compiler actually does and does not do. What types of programs are compatalbe with the two compilers and how best to use them in each case or situation. Then I will compiler a working program thaqt has already been completed and view the differences and similarities between the two outputs if there is any differnces at all. i predict there will be some.

Data

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

DESCRIPTION

  This is the name of the C language compiler as required by the -p1003.2 standard.
  The c89 compiler accepts the following options:
  -c 	Suppress the link-edit phase of the compilation, and do not remove any object files that are produced.
  -D name [= value]
   	Define name as if by a C-language #define directive. If no "= value" is given, a value of 1 will be used. Note that in order to request a translation as specified by -p1003.2 you need to define _POSIX_SOURCE either in the source or using this option. The -D option has lower precedence than the -U option. That is, if name is used in both a -U and a -D option, name will be undefined regardless of the order of the options. The -D option may be specified more than once.
  -E 	Copy C-language source files to the standard output, expanding all preprocessor directives; no compilation will be performed.
  -g 	Produce symbolic information in the object or executable files.
  -I directory
   	Change the algorithm for searching for headers whose names are not absolute pathnames to look in the directory named by the directory pathname before looking in the usual places. Thus, headers whose names are enclosed in double-quotes ("") will be searched for first in the directory of the file with the #include line, then in directories named in -I options, and last in the usual places. For headers whose names are enclosed in angle brackets (<>), the header will be searched for only in directories named in -I options and then in the usual places. Directories named in -I options shall be searched in the order specified. The -I option may be specified more than once.
  -L directory
   	Change the algorithm of searching for the libraries named in the -l objects to look in the directory named by the directory pathname before looking in the usual places. Directories named in -L options will be searched in the order specified. The -L option may be specified more than once.
  -o outfile
   	Use the pathname outfile, instead of the default a.out, for the executable file produced.
  -O 	Optimize the compilation.
  -s 	Produce object and/or executable files from which symbolic and other information not required for proper execution has been removed (stripped).
  -U name
   	Remove any initial definition of name. The -U option may be specified more than once.
  An operand is either in the form of a pathname or the form -l library. At least one operand of the pathname form needs to be specified. Supported operands are of the form:
  file .c 	A C-language source file to be compiled and optionally linked. The operand must be of this form if the -c option is used.
  file .a 	A library of object files, as produced by ar(1), passed directly to the link editor.
  file .o 	An object file produced by -c , and passed directly to the link editor.
  -l library 	Search the library named lib library .a. A library will be searched when its name is encountered, so the placement of a -l operand is significant.

in c91 compiler The options in this grouping have the broadest applicability for basic translation of source code. The subgroups of compiler options are generally concerned with:

  Standards compliance.
  Compilation mode or control of the compiler driver.
  Manipulating the source code for code generation.
  Generating specialized diagnostics.
  Manipulating the compiled code. 
  
 standard compliance:
  -qgenproto, -qnogenproto 
  -qlanglvl 
  -qlibansi, -qnolibansi 

diagnostics:

  1. qflag
  2. qinfo, -qnoinfo
  3. qmaxerr, -qnomaxerr
  4. qphsinfo, -qnophsinfo
  5. qprint, -qnoprint
  6. qshowinc, -qnoshowinc
  7. qsource, -qnosource
  8. qsrcmsg, -qnosrcmsg
  9. qsuppress, -qnosuppress
  10. V
  11. v
  12. w
  13. qwarnfourcharconsts, -qnowarnfourcharconsts
  14. qxcall, -qnoxcall

Analysis

Based on the data collected:

  • Was your hypothesis correct?
  • Was your hypothesis not applicable?
  • Is there more going on than you originally thought? (shortcomings in hypothesis)
  • What shortcomings might there be in your experiment?
  • What shortcomings might there be in your data?

there are both similarities and differences as expected with both of the compilers. The c 89 compiler does not comply with many other programs or compilers whereas the c 90 compiler does there are no similar commands between the two due to the lack of current publishing's for the c89 compiler. i guess it really depends on what you want to accomplish with your program will depend on which compiler you choose to use.

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.

With the options of so many different compilers out there to use and learn and implement and none of them work completely with everything your options are quite limited unless you know what your doing and have had a lot of experience with both. The commands are different for each compiler and the ending result will be different as well. The best thing about doing this experiment was learning about not only the two compilers but learning that there alot of different ones and trying to figure out which one of the many to know to use. some times its easier for beginners just to use gcc and that seems to make alot more sense cause it utilizes c90.

opus/fall2012/lalexan3/part3.txt · Last modified: 2012/11/30 20:39 by lalexan3