C++教程教学课件 作者 郑莉 李宁 02_简单数据及运算.pptVIP

  • 1
  • 0
  • 约1.53万字
  • 约 61页
  • 2019-10-04 发布于广东
  • 举报

C++教程教学课件 作者 郑莉 李宁 02_简单数据及运算.ppt

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2.3.6 sizeof运算 Sizeof功能 返回一个对象或类型的字节长度。 三种形式 sizeof (类型名称); sizeof (对象) sizeof 对象 * 2.3 简单运算 例2-13:sizeof运算符的应用 #include iostream #include iostream #include string using namespace std; int main() { cout “sizeof(short)= ”sizeof(short)endl; cout sizeof(unsigned short)= sizeof(unsigned short)endl; cout “sizeof(int)= ”sizeof(int)endl; cout sizeof(unsigned int)= sizeof(unsigned int)endl; cout “sizeof(long)= ”sizeof(long)endl; * 2.3 简单运算——2.3.6 sizeof运算 例2-13(续)

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档