U E D R , A S I H C RSS

새싹교실/2012/열반/120319


1.


2.

  • .
  • -> : 고..(?) 고, 고, 공 고, .
  • -> : . .
    • 궁금. -
    • -
      • -

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.


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.0332 sec