C language library function strtol fprintf memcpy memset sizeof

Source: Internet
Author: User

Strtol

Convert the string A, B, and C into numbers in hexadecimal notation (10, 2, 16 ).

# Include
Main ()

Char A [] = "1000000000 ";

Char B [] = "1000000000 ";

Char C [] = "FFFF ";
Printf ("A = % d/N", strtol (A, null, 10 ));

Printf ("B = % d/N", strtol (B, null, 2 ));
Printf ("C = % d/N", strtol (C, null, 16 ));

A = 1000000000

B = 512
C = 65535.

 

 

Fprintf:

Can be output to more types of devices, not just as printf defaults to stdout

 

Memcpy (& H-> param, Param, sizeof (x264_param_t); returns the start space directed by the param pointer to the number of param copy byte to sizeof ()

Memset sets the param value to the & H-> param address sizeof times.

 

Sizeof ()

Number of returned bytes

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.