User Tools

Site Tools


opus:fall2012:lalexan3:start

(koolness lance)fall2012 Opus

(data structures) OPTIONAL SUBTITLE

Introduction

My name is Lance Alexander. I am a part time student and a full time father. I am very new to programming but netwokring is second nature to me. i look forward to learning as much as i can in these short weeks and enjoying my time here. I hope to have fun. nice meeting all of you.

starting the opus

First Day of Class

We got to meet the class and enjoy getting the concept of the class. looking forward to the semester

Entry 1: August 29, 2012

today was the first day of classes for data structures. we learned what lab 46 is and trying to understand how to navigate this type of operating system. today is actually 9/14/12 but i didnt know that you had to update thiese pages so im doint it all now. hope it wont count against me.

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

Entry 2: september 5, 2012

we are saveing files as .c files and working at home to access the web sites. i am having trouble with accessing this at home but that is because i didnt know what port to use now i know that it is 22 and am not having anymore touble so far. i am also getting the definition to my keyword and have set up a time to meet with a tutor. this stuff is hard and time consuming

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

Entry 3: september 12, 2012

This week we had home work that we are supposed produce an ouput for the bignum program that makes chars one and two store a number larger than 255 bytes. had to get some help from the tutor. completed the work on pointer assignment Remember that 4 is just the minimum number of entries. Feel free to have more.

Entry 4: september 19, 2012

today for class we started creating nodes and node pointers. we use nodes to hold information which can hold additional nodes or become NULL. a node can only be pointed to another node or become NULL. we also created link lists, a link list shows the pattern or direction of the node in which it is traveling. we do this be using next with arrows→.

This had been a difficult journey because including insertion and deletion into our doubly linked lists has become a very irritating annoyance, however anfer my study times with Saad Malik my programming on this has improved.

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

Keywords

words are

pointer assignment, and address of

Definition

Pointer assignment The pointer assignment statement causes a pointer to become associated with a target or causes the pointer's association status to become disassociated or undefined. this means that a pointer or (*) can force a pointer or word or number to be paired with another or not depending on how it is used.

(Address Of): This is the hexadecimal location of a variable in memory or storage.

References

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

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

data Keyword 1 Phase 2

stack underflow condition

Definition

In computer science, a stack is an area of memory that holds all local variables and parameters used by any function, and remembers the order in which functions are called so that function returns occur correctly. Each time a function is called, its local variables and parameters are “pushed onto” the stack. When the function returns, these locals and parameters are “popped.” Because of this, the size of a program's stack fluctuates constantly as the program is running, but it has some maximum size.

One way of describing the stack is as a last in, first out (LIFO) abstract data type and linear data structure. A stack can have any abstract data type as an element, but is characterized by two fundamental operations, called push and pop (or pull). The push operation adds a new item to the top of the stack, or initializes the stack if it is empty. If the stack is full and does not contain enough space to accept the given item, the stack is then considered to be in an overflow state. The pop operation removes an item from the top of the stack. A pop either reveals previously concealed items, or results in an empty stack, but if the stack is empty then it goes into underflow state (It means no items are present in stack to be removed). A stack pointer is the register which holds the value of the stack. The stack pointer always points to the top value of the stack.

A stack is a restricted data structure, because only a small number of operations are performed on it. The nature of the pop and push operations also means that stack elements have a natural order. Elements are removed from the stack in the reverse order to the order of their addition: therefore, the lower elements are those that have been on the stack the longest

References

List any sites, books, or sources utilized when researching information on this topic.

"The C Programming Language 2nd Edition By Briand W. Kernighan and Dennis M. Ritchie"

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>
#include <stdlib.h>
 
int main()
*egg
*floor
{
    printf("egg is held four feet from floor");
    if
       {
         egg is dropped to the floor = egg breaks;
       }
    else
    {
      egg is not dropped from four feet in the air = egg does not break;
    }
    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 1

Question

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

What will happen if you drop an egg from four feet in the air to hit the floor at an approximate speed of(unknown). What will be the ending result.

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. get head ponderer image and post in conclusion for if not broken after 4 ft fall.

The usage of google.com and the abundance of materials such as a floor, paper towels (for clean up), an egg (essential for this type of experiment), person to drop egg form the four foot level, garbage can with a garbage bag installed in it properly(also for clean up), along with some old clothes that will be necessary for the splash zone if one might occur.

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 if the egg is not cooked or modified in anyway, the egg should crack open and splatter on the surface of the floor.

However:

If the egg is hard boiled or been modified in some way, then the shell may just crack, and or split open on the surface of the floor.

Experiment

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

I first collected all the necessary resources that were mentioned above and began to plan out where and how this experiment will be executed. I have decided to execute this experiment in the kitchen of my apartment where i believe there will be less aftermath to clean up. i will also need a tape ruler from the closet and an egg and a writing utensil and a plate and a garbage can and a garbage bag in the garbage can and some paper towels. I will gather these materials before my experiment and prepare myself in some old clothes. I will then be prepared to follow through with his experiment.

Data

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

I get dressed in to some old clothes. I am going to get a normal chicken egg from the carton in the refrigerator, then i set the egg on to the center of the plate in the middle of the left tide of the table in the kitchen. I then walked to the hallway closet and grabbed a tape ruler from the second shelf and brought it into the kitchen and set it on the table two inches left from the plate where the egg is laying down. I then turned to the kitchen closet and obtained in my right hand a roll of paper towels and waled back to the kitchen table and placed them on the other side of the plate where the egg was placed and across from where the tape ruler was placed. I in turn proceeded to take the tape measure and stretch the ruler part of it to extend 4 feet from the floor. I then marked on my shirt where that point of four feet was then pushed the ruler part back into the tape ruler. I now pickup the egg from the center of the plate with my right hand and hold the egg up evenly with the mark on my shirt that i made previously. I carefully eyeball measure that the egg is indeed level with my shirt marking and proceed to drop the egg to the floor. The egg falls rapidly as expected and hits the floor with a “splat” sound. the shell of the egg splits and shatters on impact and the yolk and filling inside the shell of the egg splatters and projectiles shoot out in all directions in a 3ft. to 5ft. radius from the point of impact. I took notes on what i heard, smelled, and seen and proceeded to take the paper towels from the kitchen table and unraveled the roll until there was 3 perforated portions of paper towels and ripped after the third perforated portion. i take the three paper towels and fold then neatly along the perforated lines and begin cleaning the remains of the egg shells and yolk portions that where on the floor and threw them into the garbage can that was located in the far left corner of the kitchen. I continued this procedure until the remnants of the egg was completely removed from the surface of the floor. I then posted my findings on this portion of my opus and put all the of used materials into their proper places in the closets.

Analysis

Based on the data collected:

  • Was your hypothesis correct? Yes, i believe that what i thought was going to happen did indeed occur.
  • Was your hypothesis not applicable?no it applied to the experiment soundly executed perfectly
  • Is there more going on than you originally thought? (shortcomings in hypothesis) Yes, there was much more planning and underlying thought into this than expected.
  • What shortcomings might there be in your experiment? Yes , the mess that was created from the experiment was greater than expected. It get on everything
  • What shortcomings might there be in your data? forgetting that i didn't mention the writing tool that i was going to be implementing in this experiment in all of the areas that i mentioned.

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.

The experiment of what will happen wen a person drops an egg form a 4 ft. secured location in the air, to a hard surface creates a pretty significant mess to clean up. If the egg was hard boiled or modified in some way then the mess may not have been so significant. However, if it were a rotten egg and a cloud of mold spores created a poof cloud on impact then it might have been a worse clean up job than anticipated. Over all i am glad that i did this experiment and enjoyed the facts that i discovered while performing it. I in turn leaned a great deal from this and will use my experience in future tasks.

If the egg didnt break on impact as i originally expected then i would be very surprised and confused — Lance 2012/09/29 11:52

Part 2

Second month: starting stacks

Entries

Entry 1: October 12, 2012

First week of October:

i am still working on making sure that my doubly linked lists are working correctly and i cannot seem to figure out what is going on with the deletion portion of my code. There also seems to be a problem with making the list print backwards as well and i couldnt find the problem with appending my code before the first node. Meeting with saad later this week.

i still am having problems with understanding how to write code but i seem to be able to read my code and see the problems with it i just cant figure out how to fix the code with more code or make changes to my code to improve it.

the challenges that i seem to be facing this week is still how to get started writing my own code. Not totally sure what the syntax is for writing any code at this point.

  • 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: October 19, 2012

Today is friday and there is not much going on in class today. I was able to fix my code on tuesday and thursday while working with saad this week so i finished my code and its working on all counts now. Fill list didnt have a counter to keep track of the list after is was filled to print the list backwards. Deletion was having a problem with deleting the last node but that was because i had tmp = *end rather than the other way around so it was not printing out the last node but i fixed that too.

so i am all set for taking my test on doubly linkedx list but it seems that i am the only one today besides saad soo i guess ill have to wait till next wednesday to finish that so ill write more next week when i forsee my having problems with stacks. I actually have the header file done and am working on the menu portion and push as awell as pop functions.

I think that i will call the stacks themselves skyscraper becuase they are going to be really tall unlike linkedlists that are long. Basically the difference between vertical and horizontal.

  • 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: October 24, 2012

Today is Wednesday and i am preparing for the knowledge assessment. Learning to read the code and figure out what it is telling me to do has been a very interesting road but its working out OK i thought. Then i took the graded assessment in class and it went very badly.

I am also working on making the stacks program actually compile. Its funny because even though linked lists and stacks are almost the same thing i am still having trouble getting the program to compile.

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 4: October 28, 2012

I finally got my program to compile and its running fine. I pushes nodes onto the stack and deletes nodes from the stack but i am missing something because it wont display the popped numbers from the stack and delete the node as well. so i have spend the last three days getting my code working and getting it to print out exactly what i want to see. it going well but still have a couple of problems.

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.

Keywords

data Keyword 2

! queue data structure !!!!

Definition

Queue Data Structure

Queue is a specialized data storage structure (Abstract data type). Unlike, arrays access of elements in a Queue is restricted. It has two main operations enqueue and dequeue. Insertion in a queue is done using enqueue function and removal from a queue is done using dequeue function. An item can be inserted at the end (‘rear’) of the queue and removed from the front (‘front’) of the queue. It is therefore, also called First-In-First-Out (FIFO) list. Queue has five properties - capacity stands for the maximum number of elements Queue can hold, size stands for the current size of the Queue, elements is the array of elements, front is the index of first element (the index at which we remove the element) and rear is the index of last element (the index at which we insert the element).

Queue is a data structure that maintain “First In First Out” (FIFO) order. And can be viewed as people queueing up to buy a ticket. In programming, queue is usually used as a data structure for BFS (Breadth First Search). Queue operations

Operations on queue Q are :

1. enqueue - insert item at the back of queue Q 2. dequeue - return (and virtually remove) the front item from queue Q 3. init - intialize queue Q, reset all variables.

References

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

data Keyword 2 Phase 2

stack push operation

Definition

The push operation adds a new element to the top of the stack (FILO)First in Last Out. You can also push until the array is full stack overflow, or you can pop until the array is empty stack underflow.

References

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

* http://www.cplusplus.com/reference/stl/stack/push/

* http://en.wikipedia.org/wiki/Stack_(abstract_data_type)

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:

#include<stdio.h> #include<stdlib.h> /* Stack has three properties. capacity stands for the maximum number of elements stack can hold. Size stands for the current size of the stack and elements is the array of elements */ typedef struct Stack { int capacity; int size; int *elements; }Stack; /* crateStack function takes argument the maximum number of elements the stack can hold, creates a stack according to it and returns a pointer to the stack. */ Stack * createStack(int maxElements) { /* Create a Stack */ Stack *S; S = (Stack *)malloc(sizeof(Stack)); /* Initialise its properties */ S→elements = (int *)malloc(sizeof(int)*maxElements); S→size = 0; S→capacity = maxElements; /* Return the pointer */ return S;}void pop(Stack *S){ /* If stack size is zero then it is empty. So we cannot pop */ if(S→size==0) { printf(“Stack is Empty\n”); return; } /* Removing an element is equivalent to reducing its size by one */ else { S→size–; } return; } int top(Stack *S) { if(S→size==0) { printf(“Stack is Empty\n”); exit(0); } /* Return the topmost element */ return S→elements[S→size-1]; } void push(Stack *S,int element) { /* If the stack is full, we cannot push an element into it as there is no space for it.*/ if(S→size == S→capacity) { printf(“Stack is Full\n”); } else { /* Push an element on the top of it and increase its size by one*/ S→elements[S→size++] = element; } return;}int main() { Stack *S = createStack(5); push(S,7); push(S,5); push(S,21); push(S,-1); printf(“Top element is %d\n”,top(S)); pop(S); printf(“Top element is %d\n”,top(S)); pop(S); printf(“Top element is %d\n”,top(S)); pop(S); printf(“Top element is %d\n”,top(S));

Experiment 2

Question

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

I wonder what would happen if i were to make a number guessing game that would have the computer pick a decimal number between 0 and 9, then I input my guess and see how long it will take for me to guess what number the computer picked at random.

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.

I would require a computer that has internet access and i will need a pencil and paper, as well as a person.(me)!!!

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 result of my experiment will allow the user to input guesses and have the computer give a response to whether or not the inputed guess is too high, too low, or correct. it will also promt the user to play the game again.

Experiment

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

I think that after i actually create the number guessing game it will prolly take time to get the program to compile but once it does it will work out well and will be a fun game to play. I will input random numbers between 0 and 9 and make sure that it gives me back the correct response.

Data

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

int main(void){ int stime; long ltime; int thisRandomNumber; int userinput; /* get the current time and then send the random number */ ltime= time(NULL); stime= (unsigned) ltime/2; srand(stime); calculate a random number between 1 and 10 */ thisRandomNumber= rand() %10 + 1; printf(“Guess the random computer generated number:\n”); scanf(“%d”,&userinput); if (userinput == thisRandomNumber){ printf(“That's the number!\n”); } else if (userinput > thisRandomNumber){ printf(“Your guess is higher than the number.\n”); } else if(userinput < thisRandomNumber){ printf(“Your guess is lower than the number.\n”); } return 0; } ====Analysis==== Based on the data collected: * Was your hypothesis correct? YES * Was your hypothesis not applicable? NO * Is there more going on than you originally thought? (shortcomings in hypothesis): YES IT TENDS TO CLOSE OUT AFTER YOU RUN THE PROGRAM ONCE. * What shortcomings might there be in your experiment? I DIDNT consider WHETHER or NOT I wanted THE computer TO run IT through AGAIN after THE first TIME I ran IT. * What shortcomings might there be in your data? I DIDNT INPLEMENT Any method into the LOOP so that IT WONT exit the game AFTER YOU PLay THE GAME ONCE. ====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.: It takes several guesses to get it right but its reletivley easy and im glad i got the idea.

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/start.txt · Last modified: 2012/12/31 09:33 by 127.0.0.1