Difference between r1.3 and the current
@@ -1,16 +1,39 @@
[[TableOfContents]]
==권우성==
void swap(int *a, int *b){
int temp;
temp=*a;
*a=*b;
*b=temp;
}
}}}
void printstring(char *ptr){
while(*ptr){
=출석=
==스왑==
= 출석 =
*권우성
= 수업 내용 =
== 스왑 ==
{{{void swap(int *a, int *b){
int temp;
*a=*b;
*b=temp;
}
//분석해보세요
void swap(int *a, int *b){
if((*a)!=(*b)){
*a^=*b^=*a^=*b;
}
}
int main()
{
int x=5, y=10;
printf("%d %d\n", x, y);
swap(&x, &y);
printf("%d %d\n", x, y);
return 0;
}
==문자열 출력==
== 문자열 출력 ==
{{{void printstring(char *ptr){
while(*ptr){
@@ -18,8 +41,11 @@
ptr++;
}
}
void main(){
prints("abcd");
}
}
}
int main()
{
printstring("abcd");
return 0;
}
}}}