当前位置:网站首页>C language a little bit (may increase in the future)

C language a little bit (may increase in the future)

2022-07-01 02:30:00 Xingchen Beitian

C Develop learning records

Import standard library , Write an entry

#include <stdio.h> //  Import standard library 

// Entry function ( Beginner fixed format )
int main(){
    
    
    return 0;
}


Use of symbols

1. % Reference data type ( Abbreviation )
    %d : double ------  Integer type 
    %s :  String ------  String type 
    %c :  char ------  Character  
    %f :  float -----  floating-point 
    \n :   Line break 
        
       
 2. The pointer ( Pointing to the address --- And scanf Continuous use )
        & Reference variable address 
        
        
        

Common functions

printf(" type ",  Variable );
scanf(" type ", & Reference data );


Method definition ( Output Hello)

Bear in mind C The method needs to be in mian Write before method !!!
void sayHello(){
    printf("%s", "Hello,Function");
}
原网站

版权声明
本文为[Xingchen Beitian]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207010017211397.html