Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ The array of C language     - Use Bosh deploy CloudFoundry problems encountered on OpenStack (Server)

- Intruder tools Knark Analysis and Prevention Linux environment (Linux)

- Ubuntu the ARP (arptables) (Linux)

- How to install Bugzilla 4.4 on Ubuntu / CentOS 6.x (Linux)

- Docker startups use continuous integration deployment (Server)

- Novice Advanced Ubuntu7.10 configured IP address (Linux)

- Object-oriented language Java some of the basic features (Programming)

- Linux dd command make U disk boot disk (Linux)

- Oracle 10g after the failure to start the upgrade (Oracle instance terminated. Disconnection forced) (Database)

- XtraBackup achieve non-stop use of master-slave synchronization service (Database)

- Linux under HAProxy + Keepalived dual-availability program (Server)

- RHEL 6.4 installed MySQL 5.6.27 (Database)

- SaltStack installation and testing (Server)

- Linux simple commands (Linux)

- Ten SCP transfer command example (Linux)

- Java, extends and implements Usage (Programming)

- sed and awk in shell usage and some examples (Linux)

- Install VMware Tools in Debian (Linux)

- Mumble installation source VoIP application on Ubuntu (Linux)

- Do not enter password login ssh (Server)

 
         
  The array of C language
     
  Add Date : 2018-11-21      
         
         
         
  A one-dimensional array of C language

1, find the maximum and minimum values of a number of

     int age [5];
     float sum = 0;
    
     printf ( "Please enter the five integers: \ n");
     for (int i = 0; i <5; i ++) {
         scanf ( "% d", & age [i]);
     }
     int min = age [0];
     int max = age [0];
    
     for (int i = 1; i <5; i ++) {
         sum = sum + age [i];
         if (age [i]> max) {
             max = age [i];
         }
         if (age [i]              min = age [i];
         }
     }
     printf ( "max =% d \ n", max);
     printf ( "min =% d \ n", min);

2. Bubble Sort

  int arr [5] = {1,5,9,3,4}, t;
     for (int i = 0; i <4; i ++) {
         for (int j = 0; j <4-i; j ++) {
             if (arr [j]> arr [j + 1]) {
                 t = arr [j];
                 arr [j] = arr [j + 1];
                 arr [j + 1] = t;
             }
         }
     }
    
     for (int i = 0; i <5; i ++) {
         printf ( "% d \ t", arr [i]);
     }
     
         
         
         
  More:      
 
- Bash environment is automatically install and initialize oh-my-zsh & autojump zsh (Linux)
- xargs Detailed description (Linux)
- xCAT install and update software (Linux)
- Django 1.8 TEMPLATE_DIRS configuration and STATICFILES_DIRS (Server)
- Detailed PHP code optimization [section] (explain reasons) (Programming)
- CentOS 6.6 install Oracle 11gR2 database (Database)
- Oracle Database High-Risk Vulnerability Warning (Database)
- Linux kernel RCU (Read Copy Update) lock Brief (Linux)
- Installation Strongswan: on a Linux IPsec-based VPN tool (Linux)
- Linux server startup and logon security settings (Linux)
- Offline (local) Yum source structures (Linux)
- Actual custom yum repository ---- gem commands commonly used parameters (Linux)
- Five strokes to find out the IP address you want to know (Linux)
- VirtualBox virtual machine to install Linux (Linux)
- Ora-00439: feature not enabled: managed standby (Database)
- C ++ you can become a new scripting language (Programming)
- Oracle metadata Reconstruction experiments (Database)
- Linux tool curl and wget advanced use (Linux)
- Java Generics (Programming)
- Java inner classes (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.