首页 > 科技 > array and string

array and string

2007年8月24日 23点17分 发表评论 阅读评论

In many cases, you need to declare a set of variables that are of the same data type. Instead of declaring each variable separately, you can declare all hte variables collectively in the format fo an array. Each variable, as an element fo the array, can be accessed either through the array reference or through a pointer that references the array.

An array consists of consecutive memory locations.
datatype Array_Name[Array-Size];
The total bytes of the array:
sizeof(data-type)* Array-size;
Or sizeof(Array_Name);

A character string is actually a character array ended with a null character

分类: 科技 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.
您必须在 登录 后才能发布评论.