正在加载图片...
The C Programming language Chapter 5 Control Flow 5.1 Overview of c statements .C statements: using a semicolon as a statement terminator ☆ Kinds of c statements EXI fye归 Cor as total=total+limit a=3 switch Corhpour func(trents for(tb group dec as i h]l()~ int x=l,y=2, Z statdgrewhile( OT zX+y hcEcontinue printf( %od”,z) break goto returnThe C Programming Language Chapter 5 Control Flow  5.1 Overview of C Statements ❖ C statements: using a semicolon “ ;” as a statement terminator ; ❖ Kinds of C statements: • Expression statements:an expression flowed by “;” • Control statements (9): if( )~else~ switch for( )~ while( )~ do~while( ) continue break goto return branches loops others As total=total+limit ; a=3 ; func( ) ; printf(“Hello,world!\n”) ; • Compound statements:using braces {…} to group declarations and statements ,so that they are syntactically equivalent to a single statement. oThere is no “;” after the right brace. As { int x=1,y=2,z ; z=x+y ; printf(“%d”,z) ; }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有