All Chinese characters!

Source: Internet
Author: User

Teacher: "Go, write a program and output all Chinese characters to us"

Me: "Ah? What is all Chinese Characters ?"

Teacher: "Chinese characters used in our life"

Me: "Amazing! That's okay !"

Teacher: "Well, hurry up !"

Let's take a look at what's going on ???

Q: How many Chinese characters are stored in the computer using the International Chinese Character Mark?

A:No more than 65536.

Explanation: one Chinese character is two bytes, and one byte is an 8-bit binary number, that is, a total of two 16-power binary numbers. Each binary number corresponds to a Chinese character, therefore, the number of Chinese characters cannot exceed 65536.

The output program is as follows:

For (char I = '1'; I <= 'hangzhou'; I ++) {if (65536-I + 1) % 30 = 0) {Console. writeLine ("");} Console. write (I);} Console. readKey ();

As the saying goes, "tai chi is born with two instruments, and the two are born with Four elephants, gossip is born with everything !" Therefore, Chinese characters should also start from the very beginning, that is, tai chi. But how much does it end? After positioning "<65536", execute a program to find the last Chinese character, which does not contain any strange symbols!

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2030235624-0.gif "/> today only found that the original computer is amazing, the original programmer more amazing! Come on! 650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2030235624-0.gif "/>

This article is from the "Ajax girl" blog!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.