昆明理工大学C语言用什么APP,昆明理工大学C语言复习资料

这篇内容介绍了C语言的基本数据类型,包括int、char、float和double,并讨论了它们的取值范围。同时,文章讲解了混合数据类型的运算规则,如错误的表达式示例。还涉及了字符的ASCII值及其在程序中的应用,以及输入字符的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

复习资料

第一章 C语言基础

1)int, char, float, double are all basic data types in C language. (对)

2)Provided that the length of int is 16 bits, then the value scope of unsigned int is:(B)

A.0~255 B.0~65535 C.-32768~32767 D.-256~255

3)The declaration is:

int k=0,a=0,b=0;

unsigned long w=5;

double x=1.42,y=0;

then the incorrect expression is_A__

A.y=x%3 B. w+= -2 C. x=w+5 D. k*=a+b 5) Given declaration: char c= \035 ; the size of c i混合数据类型的运算

1)Suppose declaration: char a= c ; then statement: printf(“%d”,a); is wrong.(错)

2)Suppose declaration:

int a;

float x,y;

then the result data type of expression: 3)The data type of expression: 18/4*sqrt(4.0) is float. (错)

字符的ASCII值及其合理应用

1)Suppose declaration: char a; then expression: ch= 5+9 is correct.(错)

2) ASCII of A is 65.then read the following programand the result of it.

Fill the blanks:

main()

{

char a;

a= A +__ printf(“%c”,a);

}

result: L

3) To get a character with getchar(), you can input corresponding ASCII number of the desired character from keybord.(错)

1) Suppose declaration:

int a;

float f;

double i;

then the result data type of expression:

10+ a +i*f is _1. 常量

字符常量的定义形式:

#define PRICE 30

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值