![](https://img-blog.csdnimg.cn/20200413003734340.jpeg?x-oss-process=image/resize,m_fixed,h_224,w_224)
C Primer Plus
C Primer Plus 习题答案
OoopsG
这个作者很懒,什么都没留下…
展开
-
C Primer Plus(第六版)第12章 编程练习答案(有题目)
有问题欢迎留言讨论~如果要书pdf可以在评论里留下邮箱IDE: Xcode12-1#include <stdio.h>void critic(int *unit_p); //不使用全局变量,就通过指针将参数带下来int main(void){ int units; printf("How many pounds to a firkin of butter?\n"); scanf("%d", &units); while(units !原创 2021-03-22 00:49:16 · 218 阅读 · 0 评论 -
C Primer Plus(第六版)第11章 编程练习答案(有题目)
题目字太多了略????有问题欢迎留言讨论~如果要题目可以在评论里留下邮箱,可以把书的pdf发给你IDE: Xcode11-1#include <stdio.h>void save_in(char *array, int n){ int i; for(i = 0; i < n; i++) array[i] = getchar(); //用getchar输入时键盘上的tab占1字节,因为是char类型,而sizeof('\t')占4字符,是原创 2020-12-21 00:48:34 · 456 阅读 · 1 评论 -
C Primer Plus(第六版)第10章 编程练习答案
题目字太多了略????有问题欢迎留言讨论~IDE: Xcode10-1#include <stdio.h>#define MONTHS 12 //一年的月份数#define YEARS 5 //年数int main(void){ const float rain[YEARS][MONTHS] = { { 4.3, 4.3, 4.3, 3.0, 2.0, 1.2, 0.2, 0.2, 0.4, 2.4, 3.5, 6.6 },原创 2020-09-16 01:52:03 · 253 阅读 · 0 评论 -
指向多维数组的指针声明
int (*pz1)[2]; //pz1指向一个二维数组,里面的元素是含有2个int类型值的一维数组,int *pz2[2]; //pz2是一个二维数组,里面的元素是含有2个int型指针的一维数组因为 [] 的优先级高于 * ,所以 pz1 是指针,pz2 是数组。指向多维数组的指针声明可类比二维数组。使用范例如下:#include <stdio.h>int main(){ int array[2][3] = {{1,2,3},{4,5,6}};原创 2020-09-13 16:26:31 · 246 阅读 · 0 评论 -
C Primer Plus(第六版)第9章 编程练习答案
题目字太多了略????有问题欢迎留言讨论~IDE: Xcode9-1#include <stdio.h>double min(double x, double y){ if(x < y) return x; else return y;}int main(){ double a, b; printf("please enter 2 ...原创 2020-04-08 00:30:37 · 410 阅读 · 0 评论 -
C Primer Plus(第六版)第8章 编程练习答案
题目字太多了略????有问题欢迎留言讨论~这章重定向在mac os上我也没搞清楚怎么搞,mark一下。IDE: Xcode8-1#include <stdio.h>int main(){ int nchar = 0; char ch; while((ch = getchar()) != EOF) nchar++; printf(...原创 2020-02-24 00:58:07 · 263 阅读 · 0 评论 -
C Primer Plus(第六版)第7章 编程练习答案
题目字太多了略????有问题欢迎留言讨论~IDE: Xcode7-1#include <stdio.h>int main(){ char ch; int n_word = 0; int n_line = 0; int n_space = 0; printf("enter text to be analyzed('#' to exit):\...原创 2020-02-24 00:47:36 · 473 阅读 · 2 评论 -
C Primer Plus(第六版)第6章 编程练习答案
题目字太多了略????有问题欢迎留言讨论~IDE: Xcode6-1#include <stdio.h>int main(){ const int SIZE = 26; char alphabet[SIZE]; printf("Please enter 26 letters:"); for(int i = 0; i < SIZE; i++)...原创 2020-02-24 00:36:50 · 259 阅读 · 0 评论 -
C Primer Plus(第六版)第5章 编程练习答案
题目字太多了略????有问题欢迎留言讨论~IDE: Xcode5-1#include <stdio.h>#define MIN_TO_HOUR 60int main(){ int time, min, hour; //int默认是有符号型 printf("Please enter time(min):"); scanf("%d", &time...原创 2020-02-24 00:15:07 · 190 阅读 · 0 评论 -
C Primer Plus(第六版)第4章 编程练习答案
4-14-24-34-44-54-9原创 2020-02-23 23:55:00 · 187 阅读 · 1 评论 -
C Primer Plus(第六版)第3章 编程练习答案
之前都是看书,头一回做书本的课后题,如有错误,留言一起讨论~~IDE: Xcode3-1 通过试验观察系统如何处理整数上溢、浮点数上溢和浮点数下溢的情况。#include <stdio.h>int main(){ int a; float b; float c; a = 4294967296; //=2^32,整数上溢。int:-2^30 ...原创 2019-08-02 00:28:00 · 352 阅读 · 0 评论 -
C Primer Plus(第六版)第2章 编程练习答案
是原创 2019-01-07 21:00:47 · 174 阅读 · 0 评论