![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C Primer Plus
「已注销」
这个作者很懒,什么都没留下…
展开
-
Chapter 1 Getting Ready
What Computers DoThe life of a CPU, at least in this simplistic account, is quite simple. It fetches an instruction from memory and executes it. It fetches the next instruction from memory and execu...原创 2018-12-08 11:58:45 · 603 阅读 · 0 评论 -
Chapter 6 : C Control Statements : Looping - Review Questions
8. Given the input Go west, young man!, what would each of the following programs produce for output? (The ! follows the space character in the ASCII sequence.)a .#include <stdio.h>int m...原创 2019-03-21 15:31:47 · 408 阅读 · 0 评论 -
Chapter 6 : Control Statements : Looping
sas原创 2019-03-21 12:52:26 · 358 阅读 · 0 评论 -
Chapter 5 :Operators,Expressions and Statements - Programming Exercises
1. Write a program that converts time in minutes to time in hours and minutes. Use #define or const to create a symbolic constant for 60. Use a while loop to allow the user to enter values repeate...原创 2019-02-13 10:04:08 · 472 阅读 · 0 评论 -
Chapter 5 :Operators,Expressions and Statements - Review Questions
1. Assume all variables are of type int. Find the value of each of the following variables:a. x = (2 + 3) * 6; b. x = (12 + 6)/2*3;c. y = x = (2 + 3)/4;d. y = 3 + 2*(x = 7/2);a. x = 30 ...原创 2019-02-13 09:50:20 · 439 阅读 · 0 评论 -
Chapter 5 : Operators, Expressions, and Statements
An advantage of the increment operator is that it usually produces slightly more efficient machine language code because it's similiar to actual machine language instructions. However, as vendors prod...原创 2019-02-13 08:14:21 · 350 阅读 · 0 评论 -
Chapter 4 : Character Strings and Formatted Input/Output
//The talkback.c Program#include <stdio.h>#include <cstring>#define DENDITY 62.4int main(void) { float weight, volume; int size, letters; char name[40]; printf("Hi!...原创 2019-01-22 15:03:36 · 1155 阅读 · 0 评论 -
Chapter 3 :Data and C
A Sample ProgramAs before, you'll find some unfamiliar wrinkles that we'll soon iron for you.#include "stdio.h"int main(void) { float weight; //user weight float value; //platinum equi...原创 2019-01-09 13:23:47 · 1522 阅读 · 0 评论 -
Chapter 4 : Character Strings and Formatted Input/Output - Programming Exercises
1. Write a program that asks for your first name, your last name, and then prints the names in the format last, first.#include <stdio.h>int main(void) { char firstName[40]; char las...原创 2019-01-24 08:55:32 · 461 阅读 · 0 评论 -
Chapter 4 : Character Strings and Formatted Input/Output - Review Questions
2.Assuming that each of the following examples is part of a complete program, what will each one print?a. printf("He sold the painting for $%2.2f.\n", 2.345e2);b.printf("%c%c%c\n", 'H', 105...原创 2019-01-23 23:33:46 · 990 阅读 · 0 评论 -
Chapter 3 : Data and C - Programming Exercises
1. Find out what your system does with integer overflow, floating-point overflow, and floating-point underflow by using the experimental approach; that is, write programs having these problems.#...原创 2019-01-10 14:22:41 · 838 阅读 · 0 评论 -
Chapter 3 : Data and C - Review Questions
1. Which data type would you use for each of the following kinds of data(sometimes more than one type could be appropriate)?a. The population of East Simplesonb. The cost of a movie on DVDc. Th...原创 2019-01-10 13:18:29 · 353 阅读 · 5 评论 -
Chapter 2 Introducting C-Programming Exercises
Reading about C isn’t enough. You should try writing one or two simple programs to see whether writing a program goes as smoothly as it looks in this chapter. A few suggestions follow, but you should ...原创 2018-12-28 00:20:52 · 894 阅读 · 0 评论 -
Chapter 2 Introducing C-Review Questions
1.What are the basic module of a C program called?They are called functions.2.What is a syntax error? Give an example of one in English and one in C.A syntax error is a violation of the rules go...原创 2018-12-27 23:50:25 · 399 阅读 · 0 评论 -
Chapter 2 Introducing C
A Simple Example of C#include <stdio.h>int main(void) { /* a simple program */ int num; /* define a variable called num */ num = 1; ...原创 2018-12-27 19:00:48 · 1031 阅读 · 0 评论 -
Chapter 1 Getting Ready - Review Questions
Review Questions1. What does portability mean in the context of programming?A perfect portable program is one whose source code can,without modification,be compiled to a successful program on a...原创 2018-12-21 20:43:20 · 275 阅读 · 0 评论 -
Chapter 6 :C Control Statements - Programming Exercises
1. Write a program that creates an array with 26 elements and stores the 26 lowercase letters in it. Also have it show the array contents./* this implementation assumes the character codes *//* ar...原创 2019-03-21 17:36:57 · 487 阅读 · 0 评论