External Variables and Scope

External Variables and Scope2018-10-02 14:14:56

In the program of previous chapter, the variables in main, such as line, longest, etc., are private or local to main. Because they are declared within main, no other function can have direct access to them.

Character Arrays

Character Arrays2018-09-29 06:42:51

The most common type of array in C is the array of characters. To illustrate the use of character arrays and functions to manipulate them, let's write a program that reads a set of text lines and prints the longest. The outline is simple enough...

Use Functions In C Program

Use Functions In C Program2018-09-26 13:59:00

In C, a function is equivalent to a subroutine or function in Fortran, or a procedure or function in Pascal. A function provides a convenient way to encapsulate some computation, which can then be used without worrying about its implementation.

Use Arrays In C Program

Use Arrays In C Program2018-09-22 02:14:35

Let is write a program to count the number of occurrences of each digit, of white space characters (blank, tab, newline), and of all other characters. This is artificial, but it permits us to illustrate several aspects of C in one program.

Character Input and Output

Character Input and Output2018-09-21 03:14:20

In this chapter, we are going to consider a family of related programs for processing character data. You will find that many programs are just expanded versions of the prototypes that we discuss here.

The for statement and the symbolic constants

The for statement and the symbolic constants2018-09-20 13:56:29

We teach a program for temperature converter in the last chapter. There are plenty of different ways to write a program for a particular task. Let's try a variation on the temperature converter.

Variables and Arithmetic Expressions

Variables and Arithmetic Expressions2018-09-17 14:26:51

The previous section introduced how to define functions. In this section we describe how to use variables and arithmetic expressions in functions.

Getting Started With C Language

Getting Started With C Language2018-09-16 07:15:12

Let us begin with a quick introduction in C. Our aim is to show the essential elements of the language in real programs, but without getting bogged down in details, rules, and exceptions.

total 8 records / total 1 page