1. Introduction


Objectives

In this chapter you’ll:

Image Learn the history of the C programming language.

Image Learn the purpose of the C Standard Library.

Image Become familiar with the elements of a typical C program development environment.

Image Test-drive a C game application in Windows, Linux and Mac OS X.

Image Take a brief tour of proprietary and open source desktop and smartphone operating systems for which you can develop C applications.


1.1. Introduction

Welcome to C—a concise yet powerful computer programming language that’s appropriate for building substantial software systems. C for Programmers is an effective learning tool for this purpose. The book emphasizes effective software engineering through the proven methodology of structured programming and includes 130 complete working programs along with the outputs produced when those programs are executed. We call this the “live-code approach.” All of these example programs may be downloaded from www.deitel.com/books/cfp/.

1.2. The C Programming Language

C evolved from two previous languages, BCPL and B. BCPL was developed in 1967 by Martin Richards as a language for writing operating systems and compilers. Ken Thompson modeled many features in his B language after their counterparts in BCPL, and in 1970 he used B to create early versions of the UNIX operating system at Bell Laboratories.

The C language was evolved from B by Dennis Ritchie at Bell Laboratories and was originally implemented in 1972. C initially became widely known as the development language of the UNIX operating system. Many of today’s leading operating systems are written in C and/or C++. C is mostly hardware independent—with careful design, it’s possible to write C programs that are portable to most computers.

Built for Performance

C is widely used to develop systems that demand performance, such as operating systems, embedded systems, real-time systems and communications systems (Figure 1.1).

Image

Fig. 1.1 Some popular performance-oriented C applications.

By the late 1970s, C had evolved into what’s now referred to as “traditional C.” The publication in 1978 of Kernighan and Ritchie’s book, The C Programming Language, drew wide attention to the language. This became one of the most successful computer science books of all time.

Standardization

The rapid expansion of C across various hardware and software platforms led to many variations that were similar but often incompatible. This was a serious problem for programmers who needed to develop code that would run on several platforms. It became clear that a standard version of C was needed. In 1983, the X3J11 technical committee was created under the American National Standards Committee on Computers and Information Processing (X3) to “provide an unambiguous and machine-independent definition of the language.” In 1989, the standard was approved as ANSI X3.159-1989 in the United States through the American National Standards Institute (ANSI), then worldwide through the International Standards Organization (ISO). We call this simply Standard C. This standard was updated in 1999—its standards document is referred to as INCITS/ISO/IEC 9899-1999 and often referred to simply as C99. Copies may be ordered from the American National Standards Institute (www.ansi.org) at webstore.ansi.org/ansidocstore.

The New C Standard

We also introduce the new C standard (referred to as C11), which was approved as this book went to publication. The new standard refines and expands the capabilities of C. Not all popular C compilers support the new features. Of those that do, most implement only a subset of the new features. We’ve integrated into the text (and appendices)—in easy-to-include-or-omit sections—many of the new features implemented in leading compilers.


Image Portability Tip 1.1

Because C is a hardware-independent, widely available language, applications written in C often can run with little or no modification on a range of different computer systems.


1.3. C Standard Library

C programs consist of functions. You can program all the functions that you need to form a C program, but most C programmers take advantage of the rich collection of existing functions called the C Standard Library. Thus, there are really two parts to learning how to program in C—learning the C language itself and learning how to use the functions in the C Standard Library. Throughout the book, we discuss many of these functions. P. J. Plauger’s book The Standard C Library is must reading for programmers who need a deep understanding of the library functions, how to implement them and how to use them to write portable code. We use and explain many C library functions throughout this text. Visit the following website for the C Standard Library documentation:

C encourages a building-block approach to creating programs. Avoid “reinventing the wheel.” Instead, use existing pieces—this is called software reuse. When programming in C you’ll typically use the following building blocks:

• C Standard Library functions

• Functions you create yourself

• Functions other people (whom you trust) have created and made available to you

The advantage of creating your own functions is that you’ll know exactly how they work. You’ll be able to examine the C code. The disadvantage is the time-consuming effort that goes into designing, developing and debugging new functions.


Image Performance Tip 1.1

Using Standard C library functions instead of writing your own comparable versions can improve program performance, because these functions are carefully written to perform efficiently.



Image Portability Tip 1.2

Using Standard C library functions instead of writing your own comparable versions can improve program portability, because these functions are used in virtually all Standard C implementations.


1.4. C++ and Other C-Based Languages

C++ was developed by Bjarne Stroustrup at Bell Laboratories. It has its roots in C, providing a number of features that “spruce up” the C language. More important, it provides capabilities for object-oriented programming. Objects are essentially reusable software components that model items in the real world. Figure 1.2 introduces several other popular C-based programming languages.

Image

Fig. 1.2 Popular C-based programming languages.

1.5. Typical C Program Development Environment

C systems generally consist of several parts: a program development environment, the language and the C Standard Library. The following discussion explains the typical C development environment shown in Fig. 1.3.

Image

Fig. 1.3 Typical C development environment.

C programs typically go through six phases to be executed (Fig. 1.3). These are: edit, preprocess, compile, link, load and execute. We concentrate in this section on a typical Linux-based C system.

1.5.1. Phase 1: Creating a Program

Phase 1 consists of editing a file. This is accomplished with an editor program. Two editors widely used on Linux systems are vi and emacs. Software packages for the C/C++ integrated program development environments such as Eclipse and Microsoft Visual Studio have editors that are integrated into the programming environment. You type a C program with the editor, make corrections if necessary, then store the program on a secondary storage device such as a hard disk. C program file names should end with the .c extension.

1.5.2. Phases 2 and 3: Preprocessing and Compiling a C Program

In Phase 2, you give the command to compile the program. The compiler translates the C program into machine language-code (also referred to as object code). In a C system, a preprocessor program executes automatically before the compiler’s translation phase begins. The C preprocessor obeys special commands called preprocessor directives, which indicate that certain manipulations are to be performed on the program before compilation. These manipulations usually consist of including other files in the file to be compiled and performing various text replacements. The most common preprocessor directives are discussed in the early chapters; a detailed discussion of preprocessor features appears in Chapter 13.

In Phase 3, the compiler translates the C program into machine-language code. A syntax error occurs when the compiler cannot recognize a statement because it violates the rules of the language. The compiler issues an error message to help you locate and fix the incorrect statement. The C Standard does not specify the wording for error messages issued by the compiler, so the error messages you see on your system may differ from those on other systems. Syntax errors are also called compilation errors, or compile-time errors.

1.5.3. Phase 4: Linking

The next phase is linking. C programs typically contain references to functions defined elsewhere, such as in the standard libraries or in the private libraries of groups of programmers working on a particular project. The object code produced by the C compiler typically contains “holes” due to these missing parts. A linker links the object code with the code for the missing functions to produce an executable image (with no missing pieces). On a typical Linux system, the command to compile and link a program is called gcc (the GNU C compiler). To compile and link a program named welcome.c, type

gcc welcome.c

at the Linux prompt and press the Enter key (or Return key). [Note: Linux commands are case sensitive; make sure that each c is lowercase and that the letters in the filename are in the appropriate case.] If the program compiles and links correctly, a file called a.out is produced. This is the executable image of our welcome.c program.

1.5.4. Phase 5: Loading

The next phase is loading. Before a program can be executed, the program must first be placed in memory. This is done by the loader, which takes the executable image from disk and transfers it to memory. Additional components from shared libraries that support the program are also loaded.

1.5.5. Phase 6: Execution

Finally, the computer, under the control of its CPU, executes the program one instruction at a time. To load and execute the program on a Linux system, type ./a.out at the Linux prompt and press Enter.

1.5.6. Standard Input, Standard Output and Standard Error Streams

Most C programs input and/or output data. Certain C functions take their input from stdin (the standard input stream), which is normally the keyboard, but stdin can be connected to another stream. Data is often output to stdout (the standard output stream), which is normally the computer screen, but stdout can be connected to another stream. When we say that a program prints a result, we normally mean that the result is displayed on a screen. Data may be output to devices such as disks and printers. There’s also a standard error stream referred to as stderr. The stderr stream (normally connected to the screen) is used for displaying error messages. It’s common to route regular output data, i.e., stdout, to a device other than the screen while keeping stderr assigned to the screen so that the user can be immediately informed of errors.

1.6. Test-Driving a C Application in Windows, Linux and Mac OS X

In this section, you’ll run and interact with your first C application. You’ll begin by running a guess-the-number game, which randomly picks a number from 1 to 1000 and prompts you to guess it. If your guess is correct, the game ends. If your guess is not correct, the application indicates whether your guess is higher or lower than the correct number. There’s no limit on the number of guesses you can make but you should be able to guess any of the numbers in this range correctly in 10 or fewer tries. There’s some nice computer science behind this game—in Section 6.8, Searching Arrays, you’ll explore the binary search technique.

Normally this application would randomly select the correct answers. The application here uses the same sequence of correct answers every time you execute the program (though this may vary by compiler), so (hopefully) you can use the same guesses we use in this section and see the same results.

We’ll demonstrate running a C application using the Windows Command Prompt, a shell on Linux and a Terminal window in Mac OS X. The application runs similarly on all three platforms. After you perform the test drive for your platform, you can try the randomized version of the game, which we’ve provided with each test drive’s version of the example in a subfolder named randomized_version.

Many development environments are available in which you can compile, build and run C applications, such as GNU C, Dev C++, Microsoft Visual C++, CodeLite, NetBeans, Eclipse, Xcode, etc. Most C++ development environments can compile both C and C++ programs.

In the following steps, you’ll run the application and enter various numbers to guess the correct number. The elements and functionality that you see in this application are typical of those you’ll learn to program in this book. We use fonts to distinguish between features you see on the screen (e.g., the Command Prompt) and elements that are not directly related to the screen. We emphasize screen features like titles and menus (e.g., the File menu) in a semibold sans-serif Helvetica font, and to emphasize filenames, text displayed by an application and values you should enter into an application (e.g., GuessNumber or 500) we use a sans-serif Lucida font. As you’ve noticed, the defining occurrence of each key term is set in bold type. For the Windows version of the test drive in this section, we’ve modified the background color of the Command Prompt window to make the Command Prompt windows more readable. To modify the Command Prompt colors on your system, open a Command Prompt by selecting Start > All Programs > Accessories > Command Prompt, then right click the title bar and select Properties. In the “Command Prompt” Properties dialog box that appears, click the Colors tab, and select your preferred text and background colors.

1.6.1. Running a C Application from the Windows Command Prompt

1. Checking your setup. It’s important to read the Before You Begin section at www.deitel.com/books/cfp/ to make sure that you’ve copied the book’s examples to your computer correctly.

2. Locating the completed application. Open a Command Prompt window. To change to the directory for the completed GuessNumber application, type cd C:examplesch01GuessNumberWindows, then press Enter (Fig. 1.4). The command cd is used to change directories.

Image

Fig. 1.4 Opening a Command Prompt window and changing the directory.

3. Running the GuessNumber application. Now that you are in the directory that contains the GuessNumber application, type the command GuessNumber (Fig. 1.5) and press Enter. [Note: GuessNumber.exe is the actual name of the application; however, Windows assumes the .exe extension by default.]

Image

Fig. 1.5 Running the GuessNumber application.

4. Entering your first guess. The application displays "Please type your first guess.", then displays a question mark (?) as a prompt on the next line (Fig. 1.5). At the prompt, enter 500 (Fig. 1.6).

Image

Fig. 1.6 Entering your first guess.

5. Entering another guess. The application displays "Too high. Try again.", meaning that the value you entered is greater than the number the application chose as the correct guess. So, you should enter a lower number for your next guess. At the prompt, enter 250 (Fig. 1.7). The application again displays "Too high. Try again.", because the value you entered is still greater than the number that the application chose.

Image

Fig. 1.7 Entering a second guess and receiving feedback.

6. Entering additional guesses. Continue to play the game by entering values until you guess the correct number. The application will display "Excellent! You guessed the number!" (Fig. 1.8).

Image

Fig. 1.8 Entering additional guesses and guessing the correct number.

7. Playing the game again or exiting the application. After you guess correctly, the application asks if you’d like to play another game (Fig. 1.8). At the prompt, entering 1 causes the application to choose a new number and displays the message “Please type your first guess.” followed by a question-mark prompt (Fig. 1.9), so you can make your first guess in the new game. Entering 2 ends the application and returns you to the application’s directory at the Command Prompt (Fig. 1.10). Each time you execute this application from the beginning (i.e., Step 3), it will choose the same numbers for you to guess.

Image

Fig. 1.9 Playing the game again.

Image

Fig. 1.10 Exiting the game.

8. Close the Command Prompt window.

1.6.2. Running a C Application Using GNU C with Linux

For this test drive, we assume that you know how to copy the examples into your home directory. Also, for the figures in this section, we use a bold font to point out the user input required by each step. The prompt in the shell on our system uses the tilde (~) character to represent the home directory, and each prompt ends with the dollar-sign ($) character. The prompt will vary among Linux systems.

1. Checking your setup. It’s important to read the Before You Begin section at www.deitel.com/books/cfp/ to make sure that you’ve copied the book’s examples to your computer correctly.

2. Locating the completed application. From a Linux shell, change to the completed GuessNumber application directory (Fig. 1.11) by typing

    cd examples/ch01/GuessNumber/GNU


~$ cd examples/ch01/GuessNumber/GNU
~/examples/ch01/GuessNumber/GNU$


Fig. 1.11 Changing to the GuessNumber application’s directory.

then pressing Enter. The command cd is used to change directories.

3. Compiling the GuessNumber application. To run an application on the GNU C++ compiler, you must first compile it (Fig. 1.12) by typing

    gcc GuessNumber.c -o GuessNumber


~/examples/ch01/GuessNumber/GNU$ gcc GuessNumber.c -o GuessNumber
~/examples/ch01/GuessNumber/GNU$


Fig. 1.12 Compiling the GuessNumber application using the gcc command.

This compiles the code and produces an executable file called GuessNumber.

4. Running the GuessNumber application. To run the executable file GuessNumber, type ./GuessNumber at the next prompt, then press Enter (Fig. 1.13).


~/examples/ch01/GuessNumber/GNU$ ./GuessNumber

I have a number between 1 and 1000.
Can you guess my number?
Please type your first guess.
?


Fig. 1.13 Running the GuessNumber application.

5. Entering your first guess. The application displays "Please type your first guess.", then displays a question mark (?) as a prompt on the next line (Fig. 1.13). At the prompt, enter 500 (Fig. 1.14).


~/examples/ch01/GuessNumber/GNU$ ./GuessNumber

I have a number between 1 and 1000.
Can you guess my number?
Please type your first guess.
? 500
Too high. Try again.
?


Fig. 1.14 Entering an initial guess.

6. Entering another guess. The application displays "Too high. Try again.", meaning that the value you entered is greater than the number the application chose as the correct guess (Fig. 1.14). At the next prompt, enter 250 (Fig. 1.15). This time the application displays "Too low. Try again.", because the value you entered is less than the correct guess.


~/examples/ch01/GuessNumber/GNU$ ./GuessNumber

I have a number between 1 and 1000.
Can you guess my number?
Please type your first guess.
? 500
Too high. Try again.
? 250
Too low. Try again.
?


Fig. 1.15 Entering a second guess and receiving feedback.

7. Entering additional guesses. Continue to play the game (Fig. 1.16) by entering values until you guess the correct number. When you guess correctly, the application displays "Excellent! You guessed the number!".


Too low. Try again.
? 375
Too low. Try again.
? 437
Too high. Try again.
? 406
Too high. Try again.
? 391
Too high. Try again.
? 383
Too low. Try again.
? 387
Too high. Try again.
? 385
Too high. Try again.
? 384

Excellent! You guessed the number!
Would you like to play again?
Please type ( 1=yes, 2=no )?


Fig. 1.16 Entering additional guesses and guessing the correct number.

8. Playing the game again or exiting the application. After you guess the correct number, the application asks if you’d like to play another game. At the prompt, entering 1 causes the application to choose a new number and displays the message "Please type your first guess." followed by a question-mark prompt (Fig. 1.17) so that you can make your first guess in the new game. Entering 2 ends the application and returns you to the application’s directory in the shell (Fig. 1.18). Each time you execute this application from the beginning (i.e., Step 4), it will choose the same numbers for you to guess.


Excellent! You guessed the number!
Would you like to play again?
Please type ( 1=yes, 2=no )? 1

I have a number between 1 and 1000.
Can you guess my number?
Please type your first guess.
?


Fig. 1.17 Playing the game again.


Excellent! You guessed the number!
Would you like to play again?
Please type ( 1=yes, 2=no )? 2

~/examples/ch01/GuessNumber/GNU$


Fig. 1.18 Exiting the game.

1.6.3. Running a C Application Using GNU C with Mac OS X

For the figures in this section, we use a bold font to point out the user input required by each step. You’ll use Mac OS X’s Terminal window to perform this test dive. To open a Terminal window, click the Spotlight Search icon in the upper-right corner of your screen, then type Terminal to locate the Terminal application. Under Applications in the Spotlight Search results, select Terminal to open a Terminal window. The prompt in a Terminal window has the form hostName:~ userFolder$ to represent your user directory. For the figures in this section we use the generic name userFolder to represent your user account’s folder.

1. Checking your setup. It’s important to read the Before You Begin section at www.deitel.com/books/cfp/ to make sure that you’ve copied the book’s examples to your computer correctly. We assume that the examples are located in your user account’s Documents/examples folder.

2. Locating the completed application. In the Terminal window, change to the completed GuessNumber application directory (Fig. 1.19) by typing

    cd Documents/examples/ch01/GuessNumber/GNU


hostName:~ userFolder$ cd Documents/examples/ch01/GuessNumber/GNU
hostName:GNU$


Fig. 1.19 Changing to the GuessNumber application’s directory.

3. Compiling the GuessNumber application. To run an application on the GNU C compiler, you must first compile it by typing

    gcc GuessNumber.c -o GuessNumber

then pressing Enter. The command cd is used to change directories.

as in Fig. 1.20. This command compiles the application and produces an executable file called GuessNumber.


hostName:~ userFolder$ gcc GuessNumber.c -o GuessNumber
hostName:~ userFolder$


Fig. 1.20 Compiling the GuessNumber application using the gcc command.

4. Running the GuessNumber application. To run the executable file GuessNumber, type ./GuessNumber at the next prompt, then press Enter (Fig. 1.21).


hostName:~ userFolder$ ./GuessNumber

I have a number between 1 and 1000.
Can you guess my number?
Please type your first guess.
?


Fig. 1.21 Running the GuessNumber application.

5. Entering your first guess. The application displays "Please type your first guess.", then displays a question mark (?) as a prompt on the next line (Fig. 1.21). At the prompt, enter 500 (Fig. 1.22).


hostName:GNU~ userFolder$ ./GuessNumber

I have a number between 1 and 1000.
Can you guess my number?
Please type your first guess.
? 500
Too low. Try again.
?


Fig. 1.22 Entering an initial guess.

6. Entering another guess. The application displays "Too low. Try again." (Fig. 1.22), meaning that the value you entered is greater than the number the application chose as the correct guess. At the next prompt, enter 750 (Fig. 1.23). Again the application displays "Too low. Try again.", because the value you entered is less than the correct guess.


hostName:GNU~ userFolder$ ./GuessNumber

I have a number between 1 and 1000.
Can you guess my number?
Please type your first guess.
? 500
Too low. Try again.
? 750
Too low. Try again.
?


Fig. 1.23 Entering a second guess and receiving feedback.

7. Entering additional guesses. Continue to play the game (Fig. 1.24) by entering values until you guess the correct number. When you guess correctly, the application displays "Excellent! You guessed the number!"


Too low. Try again.
? 825
Too high. Try again.
? 788
Too low. Try again.
? 806
Too low. Try again.
? 815
Too high. Try again.
? 811
Too high. Try again.
? 808

Excellent! You guessed the number!
Would you like to play again?
Please type ( 1=yes, 2=no )?


Fig. 1.24 Entering additional guesses and guessing the correct number.

8. Playing the game again or exiting the application. After you guess the correct number, the application asks if you’d like to play another game. At the prompt, entering 1 causes the application to choose a new number and displays the message "Please type your first guess." followed by a question-mark prompt (Fig. 1.25) so you can make your first guess in the new game. Entering 2 ends the application and returns you to the application’s folder in the Terminal window (Fig. 1.26). Each time you execute this application from the beginning (i.e., Step 3), it will choose the same numbers for you to guess.


Excellent! You guessed the number!
Would you like to play again?
Please type ( 1=yes, 2=no )? 1

I have a number between 1 and 1000.
Can you guess my number?
Please type your first guess.
?


Fig. 1.25 Playing the game again.


Excellent! You guessed the number!
Would you like to play again?
Please type ( 1=yes, 2=no )? 2

hostName:GNU~ userFolder$


Fig. 1.26 Exiting the game.

1.7. Operating Systems

Operating systems are software systems that make using computers more convenient for users, application developers and system administrators. They provide services that allow each application to execute safely, efficiently and concurrently (i.e., in parallel) with other applications. The software that contains the core components of the operating system is called the kernel. Popular desktop operating systems include Linux, Windows and Mac OS X. Popular mobile operating systems used in smartphones and tablets include Google’s Android, Apple’s iOS (for iPhone, iPad and iPod Touch devices), BlackBerry OS and Microsoft’s Windows Phone. You can develop applications in C for all four of the following key desktop and mobile operating systems, and many others.

1.7.1. Windows—A Proprietary Operating System

In the mid-1980s, Microsoft developed the Windows operating system, consisting of a graphical user interface built on top of DOS—an enormously popular personal-computer operating system that users interacted with by typing commands. Windows borrowed from many concepts (such as icons, menus and windows) developed by Xerox PARC and popularized by early Apple Macintosh operating systems. Windows is by far the world’s most widely used operating system and is a proprietary system—it’s exclusively controlled by Microsoft.

1.7.2. Linux—An Open-Source Operating System

The Linux operating system is perhaps the greatest success of the open-source movement. Open-source software departs from the proprietary software development style that dominated software’s early years. With open-source development, individuals and companies contribute their efforts in developing, maintaining and evolving software in exchange for the right to use that software for their own purposes, typically at no charge. Open-source code is often scrutinized by a much larger audience than proprietary software, so errors are often removed faster. Open source also encourages more innovation. Enterprise systems companies, such as IBM, Oracle and many others, have made significant investments in Linux open-source development.

Some key organizations in the open-source community are the Eclipse Foundation (the Eclipse Integrated Development Environment helps programmers conveniently develop software), the Mozilla Foundation (creators of the Firefox web browser), the Apache Software Foundation (creators of the Apache web server used to develop web-based applications) and SourceForge (which provides the tools for managing open-source projects—it has hundreds of thousands of them under development). Rapid improvements to computing and communications, decreasing costs and open-source software have made it much easier and more economical to create a software-based business now than just a decade ago. A great example is Facebook, which was launched from a college dorm room and built with open-source software.

The Linux kernel is the core of the most popular open-source, freely distributed, full-featured operating system. It’s developed by a loosely organized team of volunteers and is popular in servers, personal computers and embedded systems. Unlike that of proprietary operating systems like Microsoft’s Windows and Apple’s Mac OS X, Linux source code (the program code) is available to the public for examination and modification and is free to download and install. As a result, Linux users benefit from a large community of developers actively debugging and improving the kernel, an absence of licensing fees and restrictions, and the ability to completely customize the operating system to meet specific needs.

A variety of issues—such as Microsoft’s market power, the small number of user-friendly Linux applications and the diversity of Linux distributions, such as Red Hat Linux, Ubuntu Linux and many others—have prevented widespread Linux use on desktop computers. Linux has become extremely popular on servers and in embedded systems, such as Google’s Android-based smartphones.

1.7.3. Apple’s Mac OS X; Apple’s iOS® for iPhone®, iPad® and iPod Touch® Devices

Apple, founded in 1976 by Steve Jobs and Steve Wozniak, quickly became a leader in personal computing. In 1979, Jobs and several Apple employees visited Xerox PARC (Palo Alto Research Center) to learn about Xerox’s desktop computer that featured a graphical user interface (GUI). That GUI served as the inspiration for the Apple Macintosh, launched with much fanfare in a memorable Super Bowl ad in 1984.

The Objective-C programming language, created by Brad Cox and Tom Love at Stepstone in the early 1980s, added capabilities for object-oriented programming (OOP) to the C programming language. Steve Jobs left Apple in 1985 and founded NeXT Inc. In 1988, NeXT licensed Objective-C from StepStone and developed an Objective-C compiler and libraries which were used as the platform for the NeXTSTEP operating system’s user interface and Interface Builder—used to construct graphical user interfaces.

Jobs returned to Apple in 1996 when Apple bought NeXT. Apple’s Mac OS X operating system is a descendant of NeXTSTEP. Apple’s proprietary operating system, iOS, is derived from Apple’s Mac OS X and is used in the iPhone, iPad and iPod Touch devices.

1.7.4. Google’s Android

Android—the fastest growing mobile and smartphone operating system—is based on the Linux kernel and Java. Experienced Java programmers can quickly dive into Android development. One benefit of developing Android apps is the openness of the platform. The operating system is open source and free.

The Android operating system was developed by Android, Inc., which was acquired by Google in 2005. In 2007, the Open Handset Alliance™—a consortium of companies—was formed to continue developing Android. As of September 2012, more than 1.3 million Android smartphones were being activated each day!1 Android smartphones are now outselling iPhones in the United States.2 The Android operating system is used in numerous smartphones, e-reader devices, tablet computers, in-store touch-screen kiosks, cars, robots, multimedia players and more.

1. www.pcworld.com/article/261981/android_hits_1_3_million_daily_device_activations.html.

2. www.pcworld.com/article/196035/android_outsells_the_iphone_no_big_surprise.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.53.93