Skip to Main Content
Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles
book

Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles

by James S. Evans - Lawrence University, Gregory L. Trimper - viika
April 2003
Intermediate to advanced content levelIntermediate to advanced
576 pages
15h 13m
English
Pearson
Content preview from Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles

9.3. SCANTERM: Using C Standard I/O

We presented in Chapter 6 the simple SCANTEXT program to scan through a stored string, byte by byte, looking for space characters as separators between words. That program, like many of our other illustrations, had no provision for I/O outside of the debugger.

We will rework the SCANTEXT program to add input and output from the “terminal” (i.e., the keyboard and display), using external calls to standard C library functions (Table 9-1). The new SCANTERM program in Figure 9-3 displays a prompt with puts, obtains a line of input using gets, counts the number of words and the total number of characters, and then prints a summary line containing two embedded numeric fields in decimal radix using printf.

We encourage ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ARM System Developer's Guide

ARM System Developer's Guide

Andrew Sloss, Dominic Symes, Chris Wright
Intel Xeon Phi Processor High Performance Programming, 2nd Edition

Intel Xeon Phi Processor High Performance Programming, 2nd Edition

James Jeffers, James Reinders, Avinash Sodani

Publisher Resources

ISBN: 0131013726Purchase book