More actions
imported>장용운 No edit summary |
imported>vkdnjdldnjsw No edit summary |
||
| Line 71: | Line 71: | ||
== 이원준 == | == 이원준 == | ||
=== 숙제1 === | |||
void show(int *brr, int n){ | |||
int num=0; | |||
for (int i = 0; i < n; i++){ | |||
num += brr[i]; | |||
} | |||
printf("%d ", num); | |||
} | |||
int main(){ | |||
int a = 6; | |||
int arr[6] = { 1, 2, 3, 4, 5, 6 }; | |||
show(arr, 6); | |||
return 0; | |||
} | |||
=== 숙제2 === | |||
void show(char **brr){ | |||
for (int i = 0; i < 5; i++){ | |||
printf("%c\n", *brr[i]); | |||
} | |||
} | |||
void main(){ | |||
char a = 'a'; | |||
char b = 'b'; | |||
char c = 'c'; | |||
char d = 'd'; | |||
char e = 'e'; | |||
char *arr[5] = {&a, &b, &c, &d, &e}; | |||
show(&arr); | |||
} | |||
== 조종현 == | == 조종현 == | ||
Revision as of 07:54, 22 May 2015
참여자 명단
| 함장 | 장용운 | 11학번 | 출석 |
| 선원 | 천준현 | 15학번 | 출석 |
| 최지혁 | 출석 | ||
| 박인서 | 출석 | ||
| 이정재 | 출석 | ||
| 이원준 | 출석 | ||
| 조종현 | 출석 | ||
| 남헌 | 출석 |
수업
진행
- 장소 : 6층 학회실
- 시간 : 15시 ~ 17시
내용
수심 200m. 포인터
- 포인터
- 배열
- 문자열
실습
- 손코딩
코드
예제1
숙제
- 복습하기
- 복습하기
- 복습하기
숙제 제출
천준현
최지혁
박인서
이정재
이원준
숙제1
void show(int *brr, int n){
int num=0;
for (int i = 0; i < n; i++){
num += brr[i];
}
printf("%d ", num);
}
int main(){
int a = 6;
int arr[6] = { 1, 2, 3, 4, 5, 6 };
show(arr, 6);
return 0;
}
숙제2
void show(char **brr){
for (int i = 0; i < 5; i++){
printf("%c\n", *brr[i]);
}
}
void main(){
char a = 'a';
char b = 'b';
char c = 'c';
char d = 'd';
char e = 'e';
char *arr[5] = {&a, &b, &c, &d, &e};
show(&arr);
}
