Friday, September 5, 2008

Learnings of the Week (ROLLORATA)

THE C PROGRAMMING ENVIRONMENT

Four parts of C environment

o Main menu
o Editor status line and edit window
o Compiler message window
o “Hot Keys” quick reference line

Main menu
o Instructs C to do something as indicated in the list of menu.
o It can be activated or can be used by pressing Alt key and the first letter of the menu.
o For example, press Alt+F to activate File menu.

Basic menu of C
o File – used to load and save files, handles directories, invokes DOS and exits C.
o Run – used to compile (checks for errors), links and runs the program currently loaded in the environment.
o Compile – used to compile the program currently in the environment.

Submenu under file menu
o Load – enables the user to select a file to be opened or loaded into the editor.
o Pick – enables the user to select a file based on the last nine files previously opened or edited.
o New – lets the user edit a new file or start new programs.
o Save – store or saves the file currently in the editor.

Submenu under file menu
o Write to – enables the user to save a file using a different filename.
o Directory – displays the content of the current working directory.
o Change dir – enables the user to specify the defined path to change the default path or directory.
o OS shell – loads the DOS command processor and lets the user execute DOS commands.
o Quit – lets the user to exit or quit C.

Editor Status Line and Edit Window
o It is where you type your program and where you see the current line and column of the text you typed.
o If you try to press Alt- I or Insert Key, the word insert disappears, meaning that the window is in overwrite mode. Press again “insert” to return to the normal mode and notice that the word insert appears again.

Message Window
o The message window is located beneath the middle of edit window and Hotkeys.
o It is used to display various compiler or linker messages.

Hot Keys
o Hot Keys is located at the bottom of C operating screen.
o It refers to shortcut or shorthand for selecting a menu.
o Two sets of Hot keys are available: the normal ones and the alternate set.
o Press the indicated key to use normal hotkeys. For example, press F1 to activate help. On the other hand, press Alt key briefly and the corresponding Function key to use alternate hot keys.

Saturday, August 30, 2008

Learnings of the Week :)

LEARNINGS OF THE WEEK
(2nd grading)
by: Mary Trishia V. Tabigue IV-RIZAL


OVERVIEW OF C LANGUAGE


History of C Language


.B was developed in the year 1970 by Ken Thompson. The said language is a successor of Basic Command Programming Language (BCPL), which was developed by Martin Richards.

.To augment B’s power, Dennis Ritchie invented and first implemented the C Programming Language in Bell Laboratory.


.C was originally developed under UNIX environment running in DEC PDP-11.


.C stands for Combined Programming Language and sometimes called System Programming Language (SPL).


.It did not become immediately popular after its creation. It took almost six years when many people read and learned the usefulness of the language after Brian Kernighan and Dennis Ritchie created a famous book called “THE C PROGRAMMING LANGUAGE”.


.X3J11 committee was created in the year 1983 under the American National Standard Institute (ANSI) to provide machine definition of the language and was than approved in 1989.


.ANSI cooperated with the International Standard Organization (ISO) to refer to as ANSI/ISO 9899:1990”.


.C is often called a middle-level language. C as a middle-level language means that it combines elements of high-level language with the functionalism of assembly language. It allows manipulation of bits, bytes, and addresses the basic elements with which the computer functions.


.Input commands, output commands, and special words often referred to as reserved words allow the use of lower case only.


.They should be written in lower case since C is sensitive to those words. They have only 32 keywords (27 from Kernighan and Ritchie standard and 5 added by the ANSI Standardization Committee.


.C was initially used for system development work, in particular the programs that make up the operating system.


.C is used mainly because it produces codes that run as fast as codes written in assembly language.


Some Examples Uses of C


.Operating system
.Language compilers
.Assemblers
.Text editors
.Print spoolers
.Network devices
.Modern programs
.Databases
.Language Interpreters
.Utilities


Features of C Languages


-A simple core language, such as math functions or file handling provided by a standard set of library routines.

-Focus on procedural programming paradigm which facilitates for programming in a structured style.

-Parameters are always passed by value, never by reference.

-C encourages the creation of libraries user-defined functions.

-C is flexible when it allows unrestricted conversion of data from one type to another, such as conversion of a character to its numeric equivalent.


FLOWCHARTING AND ALGORITHMS


Flowcharting Defined

-Use of symbols and phrases to designate the logic of how a problem is solved.
-A common method for defining the logical steps of flow within a program by using a series of symbols to identify the basic input, process and output function within a program.

-A two-dimensional representation of an algorithm; the predefined graphic symbols of a flowchart are used to indicates the various operations and the flow of control .

-A diagram representing the logical sequence in which a combination of steps is to be performed. It is a blueprint of the program.


Algorithm Defined

-Algorithm is a finite set of instructions that specify a sequence of operations to be carried out in order to solve a specific problem or class of problems.


Basic Symbols Used in Flowcharting


Terminal (shape: rectangle with soft curves)

-Used to signify the beginning and end of flowchart.


Preparation/Initialization (shape: hexagon)

-Signifies the preparation of data.
-Used to select initial conditions.

-Used to represent instructions or groups of instructions that will alter or modify a program’s course of execution.


Input/ Output (shape: parallelogram)

-Shows input and output. Data are to be read into the computer memory from an input device or data are to be passed from the memory to an output device.


Processing
(shape: rectangle)

-Performs any calculations that are to be done.


Decision (shape: diamond)

-Signifies any decisions that are to be done.


On-page Connector (shape: circle)

-Shows the entry or exit point of the flowchart.
-A non-processing symbol used to connect one part of a flowchart to another without drawing flow lines.

-Conserves space by keeping related blocks near one another, reduces the number of flow lines in complex programs, and eliminates cross lines from taking place.


Off-page Connector (shape: inverted pentagon)

-Designates entry to or exit from one page when a flowchart requires more than one page.


Flowlines (arrows)

-Signifies the process that is to be executed next.


Basic Control Structures

-Sequence

-Selection (if-then-else)

-Repetition (Looping)


Sequence

A process executed from one to another in a straightforward manner.


Selection (if – then – else)

A choice is provided between alternatives.


Repetition (Looping)

This structure provides for the repetitive execution of an operation or routine while the condition is true. The condition is evaluated before executing any process statement. As long as the condition is true, the process is executed, otherwise, control flows out of the structure.


Commonly Used Operators in Flowcharting


Arithmetic Operators


+
Addition
- Subtraction
* Multiplication
/ Division


Relational Operators


= equal
> Greater than
< less than
<> Not equal
> Greater than or equal to
< less than or equal to


Logical operators


&& AND
ll OR
! NOT

- - - - - - - - - - - - E N D - - - - - - - - - - - -

Thursday, August 28, 2008

Learnings of the Week (ROLLORATA)

Our second topic was all about FLOWCHARTING. I thought this topic will be a lot simpler than our lessons before. Yet, this is really a tough one. It needed analysis and good decision-making. We first defined flowcharting as the use of symbols and phrases to designate the logic of how a problem is solved and a common method for defining the logical steps of flow within a program by using a series of symbols to identify the basic input, process and output function within a program. We then tackled about the contents of the flowchart. One of which is the algorithm. Algorithm is a finite set of instructions that specify a sequence of operations to be carried out in order to solve a specific problem or class of problems. Symbols are used to represent the beginning, preparation, input and output, processing, decision-making, off-page and on-page connectors, flow lines and the symbol for the end. The basic control structures are the sequence, selection and repetition or looping.

Our teacher then elaborated the basic control structures. The simplest of the three is the sequence. It is the process executed from one to another in a straightforward manner. So the sequence is continuous and you will not anymore undergo decision-making. Secondly, the selection, a choice is provided between alternatives. This involves the symbol for decision which is diamond and branches two flow lines, for true and false. The toughest one is the repetition. This structure provides for the repetitive execution of an operation or routine while the condition is true. The condition is evaluated before executing any process statement. As long as the condition is true, the process is executed, otherwise, control flows out of the structure. The commonly used operators for the flowchart are the ARITHMETIC, RELATIONAL and LOGICAL operators.

Saturday, August 23, 2008

LEARNINGS OF THE WEEK (TAGARO)

    LEARNINGS OF THE WEEK

By: Sharra Mae S. Tagaro IV- Rizal

This week, I learned about the facts about C language.

  • B was developed in the year 1970 by Ken Thompson. The said language is a successor of Basic Command Programming Language (BCPL), which was developed by Martin Richards.

  • C was originally developed under UNIX environment running in DEC PDP-11.

  • C stands for Combined Programming Language and sometimes called System Programming Language (SPL).

  • It did not become immediately popular after its creation. It took almost six years when many people read and learned the usefulness of the language after Brian Kernighan and Dennis Ritchie created a famous book called “THE C PROGRAMMING LANGUAGE”.

  • X3J11 committee was created in the year 1983 under the American National Standard Institute (ANSI) to provide machine definition of the language and was than approved in 1989.

  • Input commands, output commands, and special words often referred to as reserved words allow the use of lower case only.

  • They should be written in lower case since C is sensitive to those words. They have only 32 keywords (27 from Kernighan and Ritchie standard and 5 added by the ANSI Standardization Committee.

  • C was initially used for system development work, in particular the programs that make up the operating system.

  • C is used mainly because it produces codes that run as fast as codes written in assembly language.

  • These are some of the uses of C:C is used as an Operating system;Language compilers;Assemblers;Text editors;Print spoolers;Network devices;Modern programs;Databases;Language Interpreters; and Utilities.

  • A simple core language, such as math functions or file handling provided by a standard set of library routines.

  • Focus on procedural programming paradigm which facilitates for programming in a structured style.

  • Parameters are always passed by value, never by reference.

  • C encourages the creation of libraries user-defined functions.

  • C is flexible when it allows unrestricted conversion of data from one type to another, such as conversion of a character to its numeric equivalent.


Well I guess that is all i have learned about C. But don't you worry there are many more facts about C that our teacher will teach us.

I also learned about flowcharting and its basic control structures.

  • Flowcharting- A common method for defining the logical steps of flow within a program by using a series of symbols to identify the basic input, process and output function within a program.

  • A two-dimensional representation of an algorithm; the predefined graphic symbols of a flowchart are used to indicates the various operations and the flow of control .

  • Algorithm- a finite set of instructions that specify a sequence of operations to be carried out in order to solve a specific problem or class of problems.

  • There are many basic symbols used in flowcharting.

  • Basic control structures: Sequence- A process executed from one to another in a straightforward manner. Selection- A choice is provided between alternatives. Repetition- This structure provides for the repetitive execution of an operation or routine while the condition is true. The condition is evaluated before executing any process statement. As long as the condition is true, the process is executed, otherwise, control flows out of the structure.








LEARNINGS OF THE WEEK (TAGARO)

LEARNINGS OF THE WEEK
By: Sharra Mae S. Tagaro IV- Rizal
This week, I learned how to convert characters into binary digits, hexadecimal and decimal. FOR EXAMPLE:

CHARACTERS

BINARY DIGITS

DECIMAL

HEXADECIMAL

S

1010011

83

53

h

1101000

104

68

a

1100001

97

61

r

1110010

114

72

r

1110010

114

72

a

1100001

97

61


00100000

32

20

M

1001101

77

4D

a

1100001

97

61

e

1100101

101

65


00100000

32

20

S

1010011

83

53

.

101110

46

2E


00100000

32

20

T

1010100

84

54

a

1100001

97

61

g

1100111

103

67

a

1100001

97

61

r

1110010

114

72

o

1101111

111

6F


Learnings of the Week (ROLLORATA)

Our very first topic for the second quarter is all about the C LANGUAGE. Let’s us now begin from the history of the C Language. B was developed in the year 1970 by Ken Thompson. The said language is a successor of Basic Command Programming Language (BCPL), which was developed by Martin Richards. To augment B’s power, Dennis Ritchie invented and first implemented the C Programming Language in Bell Laboratory. C was originally developed under UNIX environment running in DEC PDP-11. C stands for Combined Programming Language and sometimes called System Programming Language (SPL). It did not become immediately popular after its creation. It took almost six years when many people read and learned the usefulness of the language after Brian Kernighan and Dennis Ritchie created a famous book called “THE C PROGRAMMING LANGUAGE”. X3J11 committee was created in the year 1983 under the American National Standard Institute (ANSI) to provide machine definition of the language and was than approved in 1989. ANSI cooperated with the International Standard Organization (ISO) to refer to as ANSI/ISO 9899:1990”. C is often called a middle-level language. C as a middle-level language means that it combines elements of high-level language with the functionalism of assembly language. It allows manipulation of bits, bytes, and addresses the basic elements with which the computer functions. Input commands, output commands, and special words often referred to as reserved words allow the use of lower case only. They should be written in lower case since C is sensitive to those words. They have only 32 keywords (27 from Kernighan and Ritchie standard and 5 added by the ANSI Standardization Committee. C was initially used for system development work, in particular the programs that make up the operating system. C is used mainly because it produces codes that run as fast as codes written in assembly language. C has many uses such as Operating system, Language compilers, Assemblers, Text editors, Print spoolers, Network devices, Modern programs, Databases, Language Interpreters and Utilities. It also has its features like it has a simple core language, such as math functions or file handling provided by a standard set of library routines. It focuses on procedural programming paradigm which facilitates for programming in a structured style. Parameters are always passed by value, never by reference. C encourages the creation of libraries user-defined functions. C is flexible when it allows unrestricted conversion of data from one type to another, such as conversion of a character to its numeric equivalent. And that was our first topic for the second quarter.

Saturday, August 9, 2008

LEARNINGS OF THE WEEK (TAGARO)

LEARNINGS OF THE WEEK
By: Sharra Mae S. Tagaro IV- Rizal
SOFTWARE
- is a general term used to describe a collection of computer programs, procedures and documentation that perform some tasks on a computer system.
Kinds of system software
1. Application software- allows end users to accomplish one or more specific (non-computer related) tasks. Typical applications include industrial automation, business software, educational software, medical software, databases, and computer games. Businesses are probably the biggest users of application software, but almost every field of human activity now uses some form of application software.
2. Operating system- is the software component of a computer system that is responsible for the management and coordination of activities and the sharing of the resources of the computer. The operating system acts as a host for application programs that are run on the machine. As a host, one of the purposes of an operating system is to handle the details of the operation of the hardware. This relieves application programs from having to manage these details and makes it easier to write applications. Almost all computers, including hand-held computers, desktop computers, supercomputers, and even modern video game consoles, use an operating system of some type. Some of the oldest models may however use an embedded OS, that may be contained on a compact disk or other storage device.
3. Programming languages- A language used to write instructions for the computer. It lets the programmer express data processing in a symbolic manner without regard to machine-specific details.
A.Machine language- For the first machines in the 1940s, programmers had no choice but to write in the sequences of digits that the computer executed. For example, assume we want to compute the absolute value of A + B − C, where A is the value at machine address 3012, B is the value at address 3013, and C is the value at address 3014, and then store this value at address 3015.
B.Assembly languages- Since each component of a program stands for an object that the programmer understands, using its name rather than numbers should make it easier to program. By naming all locations with easy-to-remember names, and by using symbolic names for machine instructions, some of the difficulties of machine programming can be eliminated. A relatively simple program called an assembler converts this symbolic notation into an equivalent machine language program.
C.High- level languages- The first programming languages were developed in the late 1950s. The concept was that if we want to compute A + B − C, and store the result in a memory location called D, all we had to do was write D = A + B − C and let a computer program, the compiler, convert that into the sequences of numbers that the computer could execute. FORTRAN (an acronym for Formula Translation) was the first major language in this period.
FORTRAN statements were patterned after mathematical notation. In mathematics the = symbol implies that both sides of the equation have the same value. However, in FORTRAN and some other languages, the equal sign is known as the assignment operator. The action carried out by the computer when it encounters this operator is, “Make the variable named on the left of the equal sign have the same value as the expression on the right.” Because of this, in some early languages the statement would have been written as −D → D to imply movement or change, but the use of → as an assignment operator has all but disappeared.