C Language Learning Three

Source: Internet
Author: User

Now in the company to do PHP development, today boss let me solve a Linux curl problem, to tell the truth, I can not solve. Then he let me rent a server myself. I am, I am now one months only 1000 yuan, except the rent left the poor hundreds of, which is not counted to eat, transportation. He said one months on 50 dollars, I want to say is, if the boss to open my 7, 8K, I will certainly rent a server, but I now even basic life has problems. For him, 50 dollars is not a pack of cigarettes or a few bottles of water money. But for me, it's my one-tenth of available expenses. Finally, he set up a server for me. Rent out, today I also have to personally build lamp environment, I was drunk, used a morning to set up the environment. Finally the code is put up and basically can run smoothly. I've also got a work-out.

Do not say, every day crowded subway all kinds of people will be next to you, I will occasionally think, those who are very big age people are still like us, living in a very far place. And looked very sad kind of. To tell the truth, I feel myself very much, I feel that the big place is not the place where I am. My friend said I was too self-abased. To tell the truth, I also feel a little inferiority, think they also from the cock silk metamorphosis into high-rich handsome. The key is to see if you struggle when you are young. No matter what the industry, as long as dare to fight, I believe that the general will have good results. Those who are sad, I think they may not want to struggle, may have but did not persist to the end, this is why the 28 principle exists reason. I admit that opportunity and luck are also important, but I want to say that the best opportunities and luck also need your ability and talent, only one you can not succeed ...

Not much nonsense, say something about today's study. C Language data types are: shaping, floating-point, character, array, struct, common, enumerated, and very heavy pointer type.

Unlike high-level languages, the C language has a string type, and a class concept.

C language Shaping has: int long short int these three kinds of only the number of bytes accounted for is different, it also shows that their range is different. If you look at their scope, you can introduce:
#include <limits.h> This header file, you can view their maximum value. At the same time, the shaping also includes unsigned. (the so-called unsigned is a binary representation of whether the first bit represents a sign bit).

and printf () This function will not help you to convert the type, it just according to your given type output.

Also note: ① we define a number when programming, must not overflow.

The ② character is stored in memory with its corresponding ASCII value, so that the character and shaping are interchangeable.

③ such as printf ()

Acquisition of ④ random numbers

Code:

#include <stdio.h>

#include <time.h>

int main () {

time_t time2;

Srand ((unsigned int) time (&time2));

int A=rand ()%100;

}

⑤c the spatial expansion of the language, the string constant is allocated four bytes, and the variable value is assigned a byte.

The Terminator of the ⑥ string is.

⑦ carriage return is also a character.

⑧long long should be converted to float to output

C Language Learning Three

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.