Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

You can omit rows or columns in a two-dimensional array

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Can you omit rows or columns in a two-dimensional array? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.

A two-dimensional array can omit rows. Because two-dimensional array storage is "first column", if you do not specify the number of columns, you can not know how many data a row put, as long as you know the number of columns, the row head can know how many rows can be put.

A two-dimensional array can omit rows.

Reason:

Because the two-dimensional array is stored as "first and then column", if he does not specify a strong number, he will not be able to know how many data are put in a row.

As long as you know the number of columns, you can know how many rows you can put at the head of the row.

When defining a two-dimensional array, after omitting it, let the computer determine how many rows and columns you define.

If you omit the number of rows, but determine the number of columns, the computer will automatically determine the number of rows based on the number of your columns and the data you give during initialization, so the number of rows can be omitted.

But if you give the number of rows but do not determine the number of columns, for your initialized data, the computer does not know how to divide, is the average score? Or is it divided in other ways? There are no rules, and mistakes will occur in this way.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report