Began to finish up the project (from about 2 weeks ago) and learned what the actual output commands are for displaying the size of the datatypes, still am trying to figure out how to display how many values they can hold. This is significant because being able to display information is an essential part of any program.
Began studying arrays, I really do not understand and still slightly struggling with this class in general. Going to attempt to a make an array example program called Billy.
Code for the array program is as follows
// arrays example #include <iostream> using namespace std; int billy [] = {16, 2, 77, 40, 12071}; int n, result=0; int main () { for ( n=0 ; n<5 ; n++ ) { result += billy[n]; } cout << result; return 0; }
I cannot get this to work, will continue working on it further.
I have slane Gywn, Lord of Cinder, and purged the land of all darkness earning the title Lord of Cinder for my own in Dark Souls.
Inline assembly is important because of its ability to operate and make its output visible on C/C++ variables. It is mainly used to instruct a complier to insert the code of a function so that it may be interperated.
asm("assembly code")
A linker is used to defideclare an object in a program from an outside program/source.
$ linker example.c #include "use_me.h" void bar() { use_me(23); }
Allows C and C++ programs to work by including header and essential program data without having to code every piece of that information in.
/* * Sample of Library */ #include <stdio.h>
Makefiles are special format files that together with the make utility will help you to automagically build and manage your projects.
lab46:make -f MyMakefile
Scope refers to the functions, class, types and variables and is that part of the source code where the particular identifier is visible.
#ifndef Variable #define Variable
A pointer is a data type which directly relates one variables values to another variable either through storage or just replacement.
int *ptr;
A type cast provides a method for explicit conversion of the type of an object in a specific situation.
int main() { double x = 3.1; int i; cout << "x = " << x << endl; i = ( int )x; // assign i the integer part of x cout << "i = " << i << endl; }
Sequence structures perform tasks without breaking the flow of the program itself.
Version Control allows you to keep track of changes to coding throughout many different languages, helping to prevent a massive change that would destroy the program/application.
Namespaces allow you to group different “entities” together under a specific name.
namespace ExampleName { int a, b; }
Allows you to convert a given expression into a different type of expression.
short a=2000; int b; b=a;
An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.
Exposure to Open-Source concepts and ideals.
By using unbuntu more within different classes, I am gaining the basic concepts of open-source programs and logic.
By using ubuntu/linux as an operating system has made me notice how it's great to have a system in which the user can actually modify it and make it their own, without needing to create their whole operating system.
Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.
What happens if you replace a “for” statement with a “while”?
The C Programming Language by Brian W. Kernighan and Dennis M. Ritchie
The program will not run because there will be no “do” statement for the while to depend on.
#include <string.h>
/* reverse: reverse string s in place */ void reverse(char s[]) {
int c, i, j;
for (i = 0, j = strlen(s)-1; i < j; i++, j--) { c = s[i]; s[i] = s[j]; s[j] = c; }
} replace “for” with “while”
THe program does not run with “while” in place of the “for”
Based on the data collected:
For loops and While loops can be used interchangably, however you just need to make sure you use them correctly and do not mismatch the coding.
What is the question you'd like to pose for experimentation? State it here.
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.
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.
How are you going to test your hypothesis? What is the structure of your experiment?
Perform your experiment, and collect/document the results here.
Based on the data collected:
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.
If you're doing an experiment instead of a retest, delete this section.
If you've opted to test the experiment of someone else, delete the experiment section and steps above; perform the following steps:
Whose existing experiment are you going to retest? Prove the URL, note the author, and restate their question.
Evaluate their resources and commentary. Answer the following questions:
State their experiment's hypothesis. Answer the following questions:
Follow the steps given to recreate the original experiment. Answer the following questions:
Publish the data you have gained from your performing of the experiment here.
Answer the following:
Answer the following: