Branch-07. Compare the size

Source: Internet
Author: User

1/* 2 * Main. c 3 * B7-branch-07. compare 4 * Created on: June 16, 2014 5 * Author: Boomkeeper 6 */7 8 # include <stdio. h> 9 10 int main () 11 {12 int a, B, c, * temp; 13 int * pa = & a, * pb = & B, * pc = & c; 14 15 scanf ("% I", pa, pb, pc); 16 if (* pa> * pb) 17 {18 temp = pa; 19 pa = pb; 20 pb = temp; 21} 22 if (* pb> * pc) 23 {24 temp = pb; 25 pb = pc; 26 pc = temp; 27} 28 if (* pa> * pb) 29 {30 temp = pa; 31 pa = pb; 32 pb = temp; 33} 34 printf ("% I-> % I", * pa, * pb, * pc); 35 36 return 0; 37}

Tested,

Pointer usage: memory consumption: KB; no pointer used; memory consumption: KB,

Look at the questions that have been submitted using Java, and there are tens of thousands or even tens of thousands of questions in the memory !!! Scared...

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.