C Programming Laboratory

Transcription

1 Sheet 1 of 14 LAB 1: Introduction to C Environment Objective: In this laboratory session you will learn: 1. How to create C programs 2. How C programs are organised 3. How to write a basic program to display text on the screen The C Environment: What is C? C is a `programming language'. That is, it is a language that allows you to specify exactly what you want your computer to do and explain clearly for other people what you are doing. C is a high level multi-purpose programming language that can be run across a number of different platforms. For example, it can run on: MS DOS WINDOWS UNIX A high level programming language uses keywords and symbols that humans are familiar with. High level programming languages were developed to make it easier for humans to program computers. Remember all the information inside a computer is in binary form, including the program instructions. It would be tedious for humans to enter this so-called low-level code, so different high level programming languages were developed, for example PASCAL and C. A high level language can not run directly on your computer, it must be compiled (converted) into a set of simple instructions that a computer can use. Each instruction is used to instruct the computer to perform a specific operation. C programming environment: C is a programming language of many different dialects because there are so many compilers. Each compiler is a little different. The library functions of one will have all of ANSI C, the standard, but will also contain additional functions. The version used on this course is Borland C version 2. To start it type tc2 at the F: prompt. This will take you into the C programming environment, which contains the following functions. AN EDITOR: this is a basic text editor, which allows the user to write C code any text editor can be used. The C program is called to C source code and is saved as a source file (*.c). A COMPILER: C is a high level language and in order for it to run on a PC, a C program must be broken down in to a set of machine code instructions which can be processed. This is the first part of the process of making an executable program. It takes in a source file (*.c) and it produces object code which is stored in an object file (*.obj). A LINK EDITOR: As part of writing a program, code that has been written by other developers can be inserted into a program that is being developed. A simple example of this is the stdio.h file which contains input and output functions like printf() and scanf(), that are used to print text to the computer monitor or received input typed from the keyboard. The output of the link editor is an executable file (*.exe). A DEBUGGER: This is used to debug problems in the code that has been written.

2 Sheet 2 of 14 Edit: create/modify source code Compile: generates machine instructions yes Error? No Link: Link library files yes Error? No Execute: Run the program source file (myprog.c) object file (myprog.obj) executable file (myprog.exe) yes Error? No Success! The C Environment Structure of a C Program A C program would typically consist of the following sections: 1. The Pre-Processor Directives 2. Programmer s Block descriptive comments by the programmers 3. Main Function containing various types of C statements 4. Other Functions Example: Hello World Program: C Program Code /**************************************/ /* Sample Program */ /**************************************/ /* Developed by: A Programmer */ /* Date: Nov. 1, 1999 */ /**************************************/ /* This program prints the text */ /* HELLO WORLD on the PC monitor */ /**************************************/ main() printf( HELLO WORLD \n ); /* C statements end with ; */ /* printf is a function in */ /* stdio.h that allows data */ /* to be printed on the */ /* screen (stdout) */ /* end of function main */ Description 1. Pre-Processor Directives - used to tell the compiler of header files that have to be included, and to declare constants and global variables. These will be covered later 2. Programmer s Block /* and */ are used to enclose pieces of text which describe what the program does. This text is called a comment 3. main() is the start of the function main. The body of the function is enclosed between the curly brackets. 4. printf() is a function used to display a string of text on the screen

3 Sheet 3 of 14 What did it all mean? In C, programs are organised into blocks, called `functions'. A C function is similar to a mathematical function: it typically takes arguments; it performs an operation on these, and typically returns a result. For example, the addition of two numbers, a computer takes two numbers and performs the addition operation on them and then returns the result of the operation. In C, the function called `main' is where the program execution starts. In the case of a very simple program, the lines which make a `main function' look like: main() However, this function doesn't do anything until instructions are put inside the squiggly brackets. In the example program above, there is one instruction inside: printf( HELLO WORLD \n ); This is in fact an invocation of another function, `printf'. The `printf' function is provided with the compiler or operating system. In this example, it takes a single operand, which is a `quoted string' ( HELLO WORLD \n ) and displays this on the PC monitor. Now look at the first line of code: The # indicates that this is a pre-processor directive, which is an instruction to the comipler to do something before compiling the source code. If the main function is to call another function, in this case `printf', the preprocessor directive should instruct the compiler to include in the program the file stdio.h. This file is called a header file, because it is usually included at the head of a program. It defines information about functions provided by a standard C library. The stdio.h header file contains declarations for the standard input and output functions available and must be included in the program to allow the use of the printf() function. Creating and Editing a Basic Program Exercise 1: Example C Program 1. Create a directory on your F drive to store your C programs: C:\TURBOC\MYLABS\ 2. Start the C programming environment. 3. Type in the following program code exactly as written below: /* exercise 1.1 Hello World */ /* This program prints the text */ /* HELLO WORLD on the PC monitor */ main() printf( HELLO WORLD \n ); 1. Save the file as lab1ex1.c 2. Compile the file using the Compile/compile to obj option 3. Link the code using the Compile/Link exe option 4. Execute the file using the Run/R option 5. From the OS shell print out all files in your C:\TURBOC\MYLABS\ directory There should now be 3 files called lab1ex1: lab1ex1.c, lab1ex1.obj, lab1ex1.exe

4 Sheet 4 of 14 Exercise 2: Modify the example Open the file lab1ex1.c Add the following line after the printf statement printf( \\n means New Line \t ); printf( \\t means Tab \n ); Save the file (lab1ex2.c) Compile, Link and Run the file What is displayed on the DOS screen? Exercise 3: Create a new file called lab1ex3.c which prints the following text on the PC monitor: Hello World My name is Joe Bloggs Goodbye World Save, Compile, Link and Run the file LAB 2: Fundamentals of C Objective: In this laboratory session you will learn: 4. The fundamental elements required to write a C programs 5. What is meant by a token in C. 6. What are the major data types used in C 7. What is meant by a keyword. 8. How to write a basic program to display different data types on the screen Declaring Variables A variable is a specific memory location set aside for a specific type of data and given a name for easy reference. The value stored in this memory location is variable, i.e. it can be changed. For example, if you are calculating the voltage across a fixed value of resistance as the current changes, the voltage variable would have a different value each time the current changed. Data Store resistance current voltage C statement to declare a memory location to store resistance values, where the value will be an integer (whole number), is as follows: int resistance; C statement to declare a memory location to store current values, where the value will be a real number, is as follows: float current; C statement to assign a value 200 to the variable called resistance is as follows: resistance = 200; C statement to assign a value 0.1 to the variable called current is as follows: current = 0.1; In C, all variables MUST be declared before they can be used in a program. To declare a variable, you must declare its type and identifier.

5 Sheet 5 of 14 Data Type Ranges C recognises the data types shown in the table below. NAME SIZE DETAILS COVERAGE int * signed integer System dependent unsigned int * unsigned System dependent char 1 signed char 128 to 127 unsigned char 1 none 0 to 255 short 2 signed short int 32,768 to 32,767 unsigned short 2 unsigned short int 0 to 65,535 long 4 signed long int 2,147,483,648 to 2,147,483,647 unsigned long 4 unsigned long int 0 to 4,294,967,295 enum * None Same as int float 4 None 3.4E +/- 38 (7 digits) double 8 None 1.7E +/- 308 (15 digits) long double 10 None 1.2E +/ (19 digits) The smallest location in memory which can be addressed is a byte, a byte consists of 8 bits, hence a byte can hold 256 possible numbers (2 8 ). An integer is normally 16 bits or 32 bits long. A float is normally 32 bits long. A char is 8 bits long Signed and unsigned are modifiers that can be used with any integral type. The char type is signed by default, but you can specify /J to make it unsigned by default. For example, a variable of data type integer can be declared as follows: int my_data; This piece of code creates an integer variable called my_data. To assign a value to this variable (load memory location) the C assignment operator (=) is used: my_data = 10; This line of code assigns the value 10 to the variable my_data. Note an integer variable can only store integer values. A float is used to declare a floating point variable. float more_data; /* declares a floating point variable called more_data */ more_data = 10.01; /* more_data now assigned a value of */ Example 2: Consider this piece of code. /******************************************************/ /* Add Two Numbers Program */ /******************************************************/ /* Developed by: A Programmer */ /* Date: Nov. 1, 1998 */ /******************************************************/ /* */ int number_1; /* first number */ int number_2; /* second number */ int result; /* result of addition */ /* */

6 Sheet 6 of 14 number_1 = 2; /* assign value 2 to number_1 */ number_2 = 5; /* assign value 5 to number_2 */ result = number_1 + number_2; printf( the first number is %d \n, number_1); printf( the second number is %d \n, number_2); printf( first number + second number = %d, result); Example 3: Consider this piece of code. /******************************************************/ /* Area of rectangleprogram */ /******************************************************/ /* Developed by: A Programmer */ /* Date: Nov. 1, 1998 */ /******************************************************/ main() float length; /* length of rectangle */ float width; /* width of rectangle */ float area; /* area of rectangle */ width =7.5; /* assign value 7.5 to width */ length = width; /* length assigned 11.4 longer width*/ area = length*width; /* multiplying to get area */ printf( the length is %f, and the width is %f \n, length, width ); printf( the area is %f \n,area); The %f and %d are called format specifications. They tell the printf function how the data should be printed. %d prints data as an integer %f prints data as a floating point number. There are many different format specifications which will be encountered as the course progresses. More Data Types: Some examples of data types were introduced: Integers can be declared using int, for example, int a,b,c; declares 3 integer variables called a,b and c. Floating Point numbers can be declared using float keyword. For example, float a,b,c; declares 3 float variables called a,b and c. Char data type. Another data type is the char, it is declared using the keyword char, for example: char a; /* declaration */ char a= a ; /* declaration and assignment */

7 Sheet 7 of 14 Double data type Double data type is a larger floating-point number (see the table in last weeks notes). It is declared using the keyword double. For example: double a; double a=10.05; printf Format Specifications Examples: Format Specifier Data Type Format Specifier Data Type %d Signed decimal integer %e Floating point exponential notation %f A floating point number. %o Unsigned octal integer %c A single character %u Unsigned decimal integer %s Text string %x Unsigned hexadecimal integer Exercises Exercise 4: Executing example 2 Start the TC environment and enter the code given above in example 2. Save the file as lab1ex4.c Save, Compile, Link and Run the file What is displayed on the DOS screen? Modify the values of number_1 and number_2 and recompile, link and execute: Did your program give the correct result? Exercise 5: Addition and Multiplication Modify the program is exercise 4 to do the following: Add number_1 and number_2 Multiply result by number_3 Print out the final result to your screen Save the file as lab1ex5.c, and compile, link and execute the program List the tests in your logbook you carried out to ensure your program was working correctly Exercise 6: Division Example Create a new file called lab1ex6.c to do the following: Assign the values 100 and 200 and 300 to three resistors R1 and R2 and R3. Calculate the resistance in series Rs = R1 + R2 + R3 Calculate the resistance in parallel Rp = 1/(1/R1 + 1/R2 + 1/R3) print out the resistance in series and resistance in parallel to your screen Save the file as lab1ex6.c, and compile, link and execute the program Draw a flow chart in your logbook for the program. Save the file as lab1ex6.c, and compile, link and execute the program Were the results as you expected? If not what modifications did you need to make to your program?

8 Sheet 8 of 14 LAB 3: Fundamentals of C: USER INPUT The scanf() function. The function scanf in stdio.h allows user data to be entered as the program is executing. It has the following form scanf( %f,&a); This will write floating-point data to the memory address where the variable is stored. Whenever & is placed in front of a variable it refers to the address where the data is stored. Example 1: scanf function. /* Getting user input. */ float value; /* A number inputted by the program user. */ printf("input a number => "); scanf("%f", &value); printf("the value is => %f", value); Example 2 /* Ohms Law */ float voltage; /* Value of the voltage. */ float current; /* Value of the current. */ float resistance; /* Value of the resistance. */ printf("input the current in amps => "); scanf("%f", &current); printf("input the resistance in ohms => "); scanf("%f", &resistance); voltage = current * resistance; /* Compute the voltage. */ printf("the value of the voltage is %f volts", voltage);

9 Sheet 9 of 14 Example 3 This example also illustrates another function for writing text to the screen: puts( the text you want ) It automatically places a new line at the end of the text. float fahrenheit_temp; float centigrade_temp; /* Explain program to user. */ puts(""); puts("this program will convert a temperature reading in"); puts("degrees Fahrenheit to its equivalent temperature in"); puts("degrees centigrade."); puts(""); puts("you only need to enter the temperature in Fahrenheit"); puts("and the program will do the rest."); /* Get Fahrenheit value from user. */ puts(""); printf("enter temperature value in Fahrenheit => "); scanf("%f", &fahrenheit_temp); /* Do computations. */ centigrade_temp = 5/9 * (fahrenheit_temp - 32); /* Display the answer. */ /* insert the final statement here */

10 Sheet 10 of 14 More on assigning values to variables. To assign a value to a variable (i.e. load value to a memory location) the C assignment operator (=) is used: The format is as follows variable_1 =10; This assigns the value 10 on the right of the = sign to variable variable_1 on the left of the = sign. The assignment statement can be combined with the declaration statement as follows: int variable_1 =10; This declares variable_1 as an integer and then assigns the value 10 to the variable. a=a+5; /* Assigns to the variable a value of +5, so if a was 10, it is now 15. */ In C this can also be written in shorthand as a+=5; Example 4; Examples of += -= and /=; int number = 10; /* Value of number for example. */ number += 5; printf("value of number += 5 is %d\n",number); number -= 3; printf("value of number -= 3 is %d\n",number); number *= 3; printf("value of number *= 3 is %d\n",number); number /= 5; printf("value of number /= 5 is %d\n",number); number %= 3; printf("value of number %%= 3 is %d\n",number);

11 Sheet 11 of 14 Exercises: Complete the following exercises, making sure that each program is saved on completion of each exercise. Ex1: Data Types Create a new program called program4.c as follows: char a_character; /* This declares a character. */ int an_integer; /* This declares an integer. */ float floating_point; /* This declares a floating point.*/ a_character = 'a'; an_integer = 15; floating_point = 27.62; printf("%c is the character.\n",a_character); printf("%d is the integer.\n",an_integer); printf("%f is the floating point.\n",floating_point); Modify the above program so the declaration and assignment statements are combined Save, Compile, Link and Run the file to confirm it works Save your working program as C:\TURBOC\MYLABS\lab3ex1.c Ex2: User Input of data Create a new program called lab3ex2.c Modify the program in exercise 1 so the program asks the user to input An integer number A floating point number A character Print out the three data types to your monitor as in exercise 1. Save, Compile, Link and Run the file to confirm it works Save your working program as C:\TURBOC\MYLABS\lab3ex2.c Ex3: Variable Assignments Create a new program called lab3ex3.c to do the following: 1. Assign value of 10 to a variable called var_1 2. Add 5 to the number and save result in var_1 3. Subtract 3 from the number and save result in var_1 4. Multiply number by 3 and save result in var_1 5. Divide number by 5 and save result in var_1 6. Print out the resulting number and save result in var_1 Save, Compile, Link and Run the file to confirm it works Save your working program as C:\TURBOC\MYLABS\lab3ex3.c

12 Sheet 12 of 14 Block Structured Programs LAB 4 In this section we will look at examples of programs and comment on their structure. A badly structured program may perform its function correctly, however, if the program is not easy to read and understand it will be very difficult to debug and modify. GOOD STRUCTURE => EASY TO READ, UNDERSTAND, DEBUG AND MODIFY Program Flow The programs we have seen so far are very simple, they runs straight through from the first statement to the last, and then stop. Often you will come across situations where your program must change what it does according to the data which is given to it. Basically there are three types of program flow : straight line ( Sequential Blocks ) chosen depending on a given condition (Branch Block) repeated according to a given condition (Loop Block) Every program ever written is composed of the three elements above, and very little else! You can use this to good effect when designing an overall view of how your program is going to work. FUNCTIONS C FUNCTION is an independent collection of source code designed to perform a specific task. Functions are identified by name and can return a single value. They act on parameters, which are used to pass information into them. We need to tell the compiler the name of our function, what parameters it has, and the type of information it returns. All programs have at least one function called main. We have seen examples of functions in the C Library, such as printf and scanf. These functions were called from the main function whenever data was to be displayed on the monitor or data input from the keyboard. Make your own simple functions We can also write our own functions to perform a particular task. For example, consider the follow program which calls a function called draw_line to display a line on the monitor. Example 1 using a function to perform a simple task /* Function prototype. */ void draw_line(void); /* This is the function we will use in our program*/ printf( This program calls a function to draw a single line\n\n ); draw_line(); /* call function to draw a line*/ printf( End of program\n ); /* Function Definition */ void draw_line(void) printf( ***********************\n );

13 Sheet 13 of 14 Example 2 using a function to perform a simple task #include <conio.h> /* Function prototype. */ void beeper(void); printf("press any key to continue program \n"); getch(); /* waits to get key input from keyboard */ beeper(); /* call function make a beep*/ /* Function Definition */ void beeper(void) printf("beep!!\a \n"); 1. Declaring a function: The FUNCTION PROTOTYPE is used to declare a function, i.e. tell the compiler the name of our function, what parameters it has, and the type of information it returns. void draw_line(void); void draw_line (void) tells us that the function does not return any data to main is the name of the function which we use in main to call the function tells us that no data is passed to the function 2. Defining a function: The FUNCTION DEFINITION describes exactly what action the function is to take. The first line of the function definition is similar in format to the function prototype but it does NOT require a semicolon. void draw_line(void) printf( ********************\n ); 3. Calling a Function The function is called using the function name, for example: draw_line(); will tell the program flow to go to the draw_line() function. The draw_line() code is then executed and on completion the program execution returns to the NEXT line of the calling function. Thus the above example has the following program execution flow: 1) printf( This program calls a function to draw a single line\n\n ); 2) printf( ********************\n ); 3) printf( End of program\n );

14 Sheet 14 of 14 Exercises: Simple Functions Exercises 1 Create complete programs to utilise the above examples 1. Compile and run the programs in step mode using Turbo C compiler. Save the programs in your area as C:\TurboC\mylabs\lab4ex1.c Exercises 2 Create complete programs to utilise the above examples 2. Compile and run the programs in step mode using Turbo C compiler. Look up conio.h under help and explain what the getch and getche function is used for. Save the programs in your area as C:\TurboC\mylabs\lab4ex2.c Exercises 3 Modify the program in exercise 1, so that the program displays a rectangle as follows: *********************** *********************** *********************** *********************** Use two functions: draw_rectangle and draw_line in thus program, where main calls the draw_rectangle function and draw_rectangle calls the draw_line function. Save the program in your area as F:\ clabs\lab4ex3.c Exercises 4 Create a program using the functions from exercise 2 and 3 can be used to display a rectangle, then beep and ask the user to hit enter to display the rectangle again. (hint: use getch function to wait for user to enter any character on keyboard before the program continues) Save the program in your area as F:\ clabs\lab4ex4.c Exercise 5 Create a program using a simple function to display a Christmas tree composed of stars. Save the program in your area as F:\ clabs\lab4ex5.c

Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating

Adjusted/Modified by Nicole Tobias Chapter 2: Basic Elements of C++ Objectives In this chapter, you will: Become familiar with functions, special symbols, and identifiers in C++ Explore simple data types

The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan

Introduction to C Language A look at C We are going to learn a language called C. C is a very flexible and powerful programming language originally designed in the early 1970s. It is famous as the language

Introduction to C++ January 4, 2011 Massachusetts Institute of Technology 6.096 Lecture 1 Notes: Introduction 1 Compiled Languages and C++ 1.1 Why Use a Language Like C++? At its core, a computer is just

3 Compiling and Running Your First Program IN THIS CHAPTER,YOU ARE INTRODUCED to the C language so that you can see what programming in C is all about.what better way to gain an appreciation for this language

Chapter 4 Processing Character Data So far we have considered only numeric processing, i.e. processing of numeric data represented as integer and oating point types. Humans also use computers to manipulate

WEEK ONE Introduction to Python Python is such a simple language to learn that we can throw away the manual and start with an example. Traditionally, the first program to write in any programming language

About The Tutorial C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system.

First Bytes Programming Lab 2 This lab is available online at www.cs.utexas.edu/users/scottm/firstbytes. Introduction: In this lab you will investigate the properties of colors and how they are displayed

Computer Programming (CP) Lab 2, 2015/16 1 CP Lab 2: Writing programs for simple arithmetic problems Instructions The purpose of this Lab is to guide you through a series of simple programming problems,

CS 16: Assembly Language Programming for the IBM PC and Compatibles First, a little about you Your name Have you ever worked with/used/played with assembly language? If so, talk about it Why are you taking

Automatic Threshold Values and Variables In this lesson, we re going to look a little deeper into the world of values, and pay special attention to the programming structures that are used to represent

Access Tutorial 12: An Introduction to Visual Basic 12.1 Introduction: Learning the basics of programming Programming can be an enormously complex and difficult activity. Or it can be quite straightforward.

LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.

Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two

University of Pennsylvania Department of Electrical and Systems Engineering ESE171 - Digital Design Laboratory VHDL Test Bench Tutorial Purpose The goal of this tutorial is to demonstrate how to automate

Modbus Frequently Asked Questions WP-34-REV0-0609-1/7 The Answer to the 14 Most Frequently Asked Modbus Questions Exactly what is Modbus? Modbus is an open serial communications protocol widely used in

Chapter One Introduction to Programming 1-1 Algorithm and Flowchart Algorithm is a step-by-step procedure for calculation. More precisely, algorithm is an effective method expressed as a finite list of

cplusplus.com C++ Language Tutorial Written by: Juan Soulié Last revision: June, 2007 Available online at: http://www.cplusplus.com/doc/tutorial/ The online version is constantly revised and may contain

2 2 Programs: Instructions in the Computer Figure 2. illustrates the first few processing steps taken as a simple CPU executes a program. The CPU for this example is assumed to have a program counter (PC),

Data Types and Variables Imed Hammouda Department of Software Systems Tampere University of Technology Objectives In this lecture you will learn: What is a data type and how types are represented in C++.

Chapter 3 Input and output The programs we ve looked at so far just display messages, which doesn t involve a lot of real computation. This chapter will show you how to read input from the keyboard, use

Signed Binary Arithmetic In the real world of mathematics, computers must represent both positive and negative binary numbers. For example, even when dealing with positive arguments, mathematical operations

Exam Name MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) The JDK command to compile a class in the file Test.java is A) java Test.java B) java

Chapter 1 The C Programming Language In this chapter we will learn how to write simple computer programs using the C programming language; perform basic mathematical calculations; manage data stored in

CHAPTER 3 Numbers and Numeral Systems Numbers play an important role in almost all areas of mathematics, not least in calculus. Virtually all calculus books contain a thorough description of the natural,

UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming 1 2 Foreword First of all, this book isn t really for dummies. I wrote it for myself and other kids who are on the team. Everything

CandC++ 2. Functions Preprocessor Stephen Clark University of Cambridge (heavily based on last year s notes (Andrew Moore) with thanks to Alastair R. Beresford and Bjarne Stroustrup) Michaelmas Term 2011

Introduction to the TI-83/TI-83+ and TI-84+ for College Algebra. Turning it on and off: To turn the calculator on, press the ON key in the lower left corner. You should now see a flashing rectangle, the

arrays So far, we have been using only scalar variables scalar meaning a variable with a single value But many things require a set of related values coordinates or vectors require 3 (or 2, or 4, or more)

Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy

Keil C51 Cross Compiler ANSI C Compiler Generates fast compact code for the 8051 and it s derivatives Advantages of C over Assembler Do not need to know the microcontroller instruction set Register allocation

TN203 Porting a Program to Dynamic C Introduction Dynamic C has a number of improvements and differences compared to many other C compiler systems. This application note gives instructions and suggestions

PHP Intro, Syntax, Variables, Echo, Data Types Introduction PHP scripts are executed on the server. What You Should Already Know Before you continue you should have a basic understanding of the following:

Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through

Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is preceded by an equal sign d. its name has undereline 2. Associations

Arrays and Structs and Pointers, Oh My! Programming in C Input and output Using printf Standard input and output Pointers Arrays Structures Combining these things together Arrays and Structs and Pointers,