U E D R , A S I H C RSS

새싹교실/2012/열반/120319


1.




  • 3 1 30

2.

  • 모른 .
  • -> 빈 : ..(?) , , , .
  • 빈 -> : . .
    • . -
    • -
      • -

3.

3.1. main



main()
{
	1+1;
}  

3.2. printf


  • stdio.h

main()
{
	printf("%d\n", 1+1);
}
  • printf , .

3.3. include

  • .
  • .h :

#include <stdio.h>
main()
{
	printf("%d\n", 1+1);
}

3.4.

  • // 를 !

3.5. %d

  • print decimal ( )

3.6.

printf("%d", 10000000000);
printf("%lld", 10000000000);
  • lld는 더 능 (long long)
  • %f %lf

3.7. 논리, ,

  • : <<(left shift), >>(right shift), &(and), |(or), ^(xor), ~(not)
  • 논리 : &&(and), ||(or) !(not)
  • : ==, !=, >=, <=, >, <
    • !=, >=, <= 에서 등호가 오른쪽에 있는 것이 중요합니다. 예를 들어, x=!y 는 x y를 비교한 것이 아니라, y에 !(not) 논리 연산을 한 결과를 x에 대입한 것입니다.
    • C는 boolean . 보 int , 모 0 , .

3.8. if

  • 떤 명 는 문

//	if(x=0)		// x 0
//	if(x==0)	// x 0 
	if(문){
		명1;
	}
	//  1 .
	// .

4.

  • else if, ,
  • : (?:)
  • 복문 .

5.

  • : 논리 .
  • : 못물보는 .
  • : 리눅 는데, . . 모르. C 미루는 , 리는 . 보면 .
    • . ? -

6.

  • goto ? -

while(){
	while(){
		while(){
			//  복문     goto를  .
			// .
			if(문){ goto exit_loop; }
		}
	}
}
exit_loop:



Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:47
Processing time 0.0178 sec