Showing posts with label C Programming. Show all posts
Showing posts with label C Programming. Show all posts

Saturday, 29 January 2011

C Programming for Engineering and Computer Science (B.E.S.T. Series)

C Programming for Engineering and Computer Science
C Programming for Engineering and Computer Science (B.E.S.T. Series)
 C Programming for Engineering and Computer Science (B.E.S.T. Series) C Programming for Engineering and Computer Science (B.E.S.T. Series)
C Programming for Engineering and Computer Science (B.E.S.T. Series)


C Programming for Engineering and Computer Science (B.E.S.T. Series)

Editorial Reviews

Product Description

C Programming for Engineering B.E.S.T (Basic Engineering Series and Tools) consists of modularized textbooks offering virtually every topic and specially likely to be covered in an introductory engineering course. All the texts boast distinguished authors and the most currant content. These inexpensive BEST modules are easily combined with each other to construct the ideal intro to Engineering course. The goal of this series is to provide the educational community with material that is timely, affordable, of high quality, and flexible in how it is used.read more...

Learning C Programming With C++

Learning C Programming With C++
An Introduction to Programming With C++

Sample Chapter From An Introduction to C++ Programming
     Copyright © Björn Fahller

Introduction

An Introduction to Programming With C++C++ is a programming language substantially different from C. Many see C++ as "a better C than C," or as C with some add-ons. I believe that to be wrong, and I intend to teach C++ in a way that makes use of what the language can offer. C++ shares the same low level constructs as C, however, and I will assume some knowledge of C in this course. You might want to have a look at the C introduction course to get up to speed on that language.

Basic I/O

All intro courses in programming begin with a "Hello World" program [except those that don't -- Ed], and so does this one.

  #include <iostream.h>

  int main(void)
  {
    cout << "Hello EDM/2" << endl;
    return 0;
  }
Line 1 includes the header <iostream.h>, which is needed for the input/output operations. In C++ writing something on standard output is done by:

  cout << whatever;
Here "whatever" can be anything that is printable; a string literal as "Hello EDM/2", a variable, an expression. If you want to print several things, you can do so at the same time with:

  cout << expr1 << expr2 << expr3 << ...;
Again, expr1, expr2 and expr3 represents things that are printable. In the "Hello EDM/2" program above, the last expression printed is "endl" which is a special expression (called a manipulator. Manipulators, and details about I/O, will be covered in a complete part sometime this fall) which moves the cursor to the next line. It's legal to cascade more expressions to print after "endl," and doing so means those values will be printed on the next line.
read more...
An Introduction to Programming With C++