C Primer Plus(第6版)第三章编程练习答案

本文提供了C Primer Plus第六版第三章的编程练习详细解答,涵盖基本语法和编程技巧。
摘要由CSDN通过智能技术生成
//观察程序如何处理整数上衣,浮点数上溢和浮点数下溢
#include <stdio.h>
int main(void)
{	
	printf("This is int overflow: %d\n", 2100000000*10000000);
	printf("This is float overflow: %f\n", 9e1000000);
	printf("This is float underflow: %f\n", 0.2e-50);
	
	return 0;
}

程序运行结果
2.

//编写一个程序,提示输入ASCII码,然后打印输入的字符
#include <stdio.h>
int main(void)
{
	char ch;

	printf("\aPlease enter an ASCII Code and the I will get you the correspond character:");
	printf("_\b");
	scanf("%d", &ch);
	printf("%d is the ASCII code for %c. \n", ch);

	return 0;
}
#include <stdio.h>
int main(void)
{	
	printf("\aStartled by the sudden sound, sally shouted,\n");
	printf("\"By the Great Pumpkin, what was
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值