Programming for Chemical Engineers Using C, C++, and MATLAB

Part I: Using C and C++

CHAPTERS LIST

Chapter 1: Review on C Programming
Chapter 2: Numerical Computation using C
Chapter 3: Physical Properties Prediction and Approximation
Chapter 4: Applications using C
Chapter 5: Overview of C++

OVERVIEW

Let's begin by reviewing what we know so far about the C computer language. Although C is a powerful programming language, it is quite easy to learn.

This chapter will review C programming that involves:

Constant and Variable Name Declaration

Constant Name Declaration

Variable Name Declaration

Basic Output and Input Statements

Output Statements

Input Statements

Operators

Arithmetic Operators

Assignment Operators

Relational Operators

Logical Operators

Conditional Statements

if - else Statement

Nested if - else if Statement

switch/case Statement

Looping Statements

for Loop Statement

while Loop Statement

do - while Loop Statement

Arrays

Creating Functions

All program listings discussed in this chapter can be found on the CD-ROM.

\Program Listings\Chapter 1\PL1_1.c  Program Listing 1.1\Program Listings\Chapter 1\PL1_2.c  Program Listing 1.2\Program Listings\Chapter 1\PL1_3.c  Program Listing 1.3\Program Listings\Chapter 1\PL1_4.c  Program Listing 1.4\Program Listings\Chapter 1\PL1_5.c      Program Listing 1.5\Program Listings\Chapter 1\PL1_6.c  Program Listing 1.6\Program Listings\Chapter 1\PL1_7.c  Program Listing 1.7\Program Listings\Chapter 1\PL1_8.c  Program Listing 1.8\Program Listings\Chapter 1\PL1_9.c  Program Listing 1.9\Program Listings\Chapter 1\PL1_10.c     Program Listing 1.10\Program Listings\Chapter 1\multiply.h Multiply Header File

CONSTANT AND VARIABLE NAME DECLARATION

In order for any constant or variable name to be used in a C program, it must first be declared. However, there are some limitations when naming constants...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Programmable Logic Controllers (PLC)
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.