Google

«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
BLOG Total Visitors
Today Hit, Yesterday Hit
BLOG main image


visitor stats
'study'에 해당되는 글 51건
[Schizo!, 2007. 12. 9. 00:30, study/programming]
//배열에 입력된 수를 오름차순으로 정렬하시오.

#include <stdio.h>

int sort(int *i,int w);

int main(void){
    int k;
    int n;

    int arr[100];
    int *i;//포인터변수 선언
    i=&arr[0];//포인터 변수 i에 배열 arr 의 주소값을 넣는다
    printf("몇개를 입력할지\n");
    scanf("%d",&n);
    for(k=0;k<n;k++){
        printf("입력\n");
        scanf("%d",&i[k]);
    }
    printf("당신이 입력한수는?\n");
    for(k=0;k<n;k++){
        printf("%d\n",*(arr+k)); //arr[k]
    }
    sort(arr,n);
    return 0;
}

int sort(int *i,int n){
    int j,k;
    int temp;
    
    for(k=0;k<n;k++){
        for(j=k+1;j<n;j++){
            if(i[k]<i[j]){
                temp=i[k];
                i[k]=i[j];
                i[j]=temp;
            }
        }
    }
    printf("정렬!\n");
    for(k=0;k<n;k++)
    printf("%d\n",i[k]);
    return 0;
}

/*
int sort(int *i,int n){
    int j,k;
    int temp;
    
    for(k=0;k<n;k++){
        for(j=k+1;j<n;j++){
            if(*(i+k)<*(i+j)){
                temp=*(i+k);
                *(i+k)=*(i+j);
                *(i+j)=temp;
            }
        }
    }
    printf("정렬!\n");
    for(k=0;k<n;k++)
    printf("%d\n",*(i+k));
    return 0;
}
*/

'study > programming' 카테고리의 다른 글

문자열  (0) 2007.12.10
소수구하기,이분검색  (0) 2007.12.09
포인터  (2) 2007.12.07
포인터  (0) 2007.12.07
포인터  (0) 2007.12.04


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 12. 7. 18:24, study/programming]

포인터는 처음 들어갈 때 아주 중요합니다. 구조에 대한 정확한 이해가 있어야 파일 입출력에 가서도 헷갈리지 않아요.


 int a[3][2]= { {1,2},{3,4},{5,6}};

기본적으로 C에서의 배열은 행과 열로 이루어진 것이 아니라 하나의 선 위에 위치해 있다는 표현이 좋겠네요.(그림을 그려가면서 설명하면 좋은데 조금 아쉽네요.)

교수에 따라 처음에 문제를 빠르게 이해시키려고 행과 열로 설명하는 교수도 있는데 그건 잘못된 교육이라고 생각합니다. 그런 사람들이 하는 것은

a라는 배열 안에

12

34

56

이렇게 자료가 들어가 있다는 말인데 C에서는 그런 식으로 자료가 들어가지 않습니다.


 int a[3][2]= { {1,2},{3,4},{5,6}};

이 선언문을 예로 들면

 int a[3][2]에서 일단 a라는 이름을 가진 int형 공간을 2*3개만큼 만들어 줍니다.

배열은 가장 뒷자리 부터 생각하셔야 합니다.

"int형을 가진 2개의 자료가 3개 모여서 a라는 배열을 이룬다."

{ {1,2},{3,4},{5,6}};는 자료를 넣어주는 거죠

1은 a[0][0], 2는 a[0][1]의 자리에 들어갑니다. (배열의 자리가 0부터 시작하는 건 아시죠?)

이 둘을 a[0]으로 표현할수 있습니다.  *a[0]을 하면 1과 2가 나오죠.

마찬가지로

a[1][0] = 3, a[1][1] = 4, a[2][0] = 5, a[2][1] = 6

이렇게 들어갑니다.


또한  a[3][3] 이렇게 고쳐 보니

*(ptr+0)=1

*(ptr+1)=2

*(ptr+2)=0

*(ptr+3)=3

*(ptr+4)=4

*(ptr+5)=0

이렇게 나오는 이유는

int a[3][3]은 "int형을 가진 3개의 자료가 3개 모인 배열a"

이렇게 되죠.

그리고 초기값을 지정해 줄때

{ {1,2},{3,4},{5,6}};이렇게만 넣어줬기 때문에

3번째 자리 즉,  a[0][2], a[1][2], a[2][2]의 자리에 아무런 값이 들어가지 않았다는 말입니다.

값을 지정해주지 않고 프린트문을 넣을 경우 프로그램에 따라 쓰레기값이 나올수도 있습니다.

지금 배열에는 1,2,??,3,4,??,5,6,??

이렇게 들어가 있죠. 그리고 앞에서 부터 3개씩 끊어 배열에 넣습니다.

a[0][0]부터시작해서 1을 넣고 뒷자리를 늘려주죠

a[0][1]에 2를 넣고 a[0][2]에 초기화되지 않은 값을 넣고,

이제 뒷자리가 3개 다 입력되었으니 다시 앞의 자리를 늘려주고(a[1][0])

다시 자료를 대입하는 식이죠.


*******

만약 { {1,2},{3,4},{5,6}};이 식이 { 1,2,3,4,5,6};이런 식으로 중괄호 없이 넣어줬다면

a[0][0] = 1

a[0][1] = 2

a[0][2] = 3

a[1][0] = 4

a[1][1] = 5

a[1][2] = 6

a[2][0] = 비초기화

a[2][1] = 비초기화

a[2][2] = 비초기화

이렇게 대입됩니다. 가능하면 중괄호를 넣어주는 습관을 기르시는 게 좋겠네요.

'study > programming' 카테고리의 다른 글

소수구하기,이분검색  (0) 2007.12.09
정렬하기 (포인터함수)  (2) 2007.12.09
포인터  (0) 2007.12.07
포인터  (0) 2007.12.04
불 대수의 법칙..  (0) 2007.11.26


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 12. 7. 13:56, study/programming]

#include <stdio.h>

int main(void){
 int arr, *i;
 arr=2;
 i=arr;

// int arr=2;
// int *i=arr;
 printf("%d\n",i);
}

위에거는 *i = arr 이 아니라 i = arr으로 해야죠.
이미 i가 *로 선언이 되어 있으니까요.
밑에는 선언과 동시에 하는거니까는 괜찮죠

위의 *i=arr 은 어딘지 알 수 없는 메모리 공간에 2 를 할당하는 꼴

맞아요.
i는 주소값이고 *i는 그 주소에 들어 있는 실제 데이터를 지칭하는거니까
i는 arr이 들어가는게 아니라 arr의 주소인 &arr이 들어가야죠.

'study > programming' 카테고리의 다른 글

정렬하기 (포인터함수)  (2) 2007.12.09
포인터  (2) 2007.12.07
포인터  (0) 2007.12.04
불 대수의 법칙..  (0) 2007.11.26
배열 c  (3) 2007.11.26


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 12. 4. 23:11, study/programming]
이번 과제는 포인터를 사용하여 스트링에서 부분적으로 일치하는 스트링을 찾는 것이다.  스트링과 관련된 함수로 strcpy, strcmp, strcat, strlen, strlwr, strupr, strchr, strstr, strdup, strspn,  등 많은 함수들을 제공한다.  이들 함수들에 대하여 숙지하기 바라며 이번 과제는 strstr을 구현하는 과제이다.  문서에 보면 이 함수는 다음과 같이 선언된다.
char *strstr(const char *string, const char *strCharSet);
여기서 const는 함수의 정의 내에서 그 매개변수는 변경시킬 수 없음을 의미한다.  이 함수는 string에서 strCharSet를 찾아서 처음으로 나타나는 스트링의 위치를 return 하는데 찾을 수 없으면 NULL을 return한다.   이러한 기능을 가지는 함수
myStrstr(const char *string, const char *strCharSet);
를 구현하라.  더 필요한 것이 있으면 strstr를 참고하기 바랍니다.
예를 들어 string이 “abcdefghijklmnopqrstuvwxyz”일 경우 찾는 문자열을 입력받아 실행되는 과정은 다음과 같다.
? bced
No ...
? bcde
bcdefghijklmnopqrstuvwxyz
? hijkl
hijklmnopqrstuvwxyz
? stuv
stuvwxyz
? xyz
xyz
? opqr
opqrstuvwxyz
?
Bye ...
Press any key to continue


[프로그램]
#include <stdio.h>

#defineN50

void main()
{
char strMsg[] = "abcdefghijklmnopqrstuvwxyz";
char strMyStr[N];

while (1) {
printf("? ");
gets(strMyStr);
if (*strMyStr == NULL)
break;
char *myStrStr(const char *string, const char *strCharSet);
char *strFound = myStrStr(strMsg, strMyStr);
if (strFound == NULL)
printf("No ...\n");
else
printf("%s\n", strFound);
}
printf("Bye ...\n");
}

char *myStrStr(const char *string, const char *strCharSet)
{
// ???
// ???
}

'study > programming' 카테고리의 다른 글

포인터  (2) 2007.12.07
포인터  (0) 2007.12.07
불 대수의 법칙..  (0) 2007.11.26
배열 c  (3) 2007.11.26
배열 오름차순  (0) 2007.11.21


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 11. 26. 21:21, study/programming]
기본 논리회로
⑴ 불 대수(Boolean Algebra)
    컴퓨터는 디지털 회로로 구성된 디지털 시스템으로 참(True)과 거짓(False), 0 또는 1, 전기신호의 유무등 두가지 상태로 표현하여 처리하는 이진 논리회로로 구성됨
   1) 불 대수의 기본공식
    정리1
    정리2
    교환법칙
    결합법칙
    배분법칙
    드모르강의
    법칙
    흡수법칙
   2) 카르노도(Kamaugh Map 또는 K-Map)를 이용한 간략화
    ① 카르노도의 특징
    • 맵은 여러 개의 사각형으로 구성
    • 각각의 사각형은 민텀을 표시
    • 출력값에 따라 각 사각형에 0이나 1을 표시(일반적으로 0은 공백으로 놓아둠)
    • 인접한 민텀끼리 묶어서 공통된 부분만을 표시
    • 민텀(Minterm) : 진리표(Truth Table)에서 그 결과 1이 되는 변수들의 각 조합
    ② 변수가 2개인 경우
    ③ 변수가 3개인 경우
⑵ 기본 논리 게이트(Logic Gate)
    게이트란 2진 입력 정보를 이용해서 논리적인 값 ( 0또는 1의 값) 을 생성하는 기본적인 논리회로를 의미
    게이트
    의미
    회로도형
    AND
    두 개의 입력정보가 모두 1일 때 1이 출력
    논리식
    진리표
    게이트
    의미
    회로도형
    OR
    두 개의 입력 중 하나가 1이면 1이 출력
    논리식
    진리표
    게이트
    의미
    회로도형
    NOT
    (Inverter)
    입력정보 1의 보수를 출력
    논리식
    진리표
    게이트
    의미
    회로도형
    NAND
    Not AND의 의미로 AND 게이트 결과의 반대값을 출력
    논리식
    진리표
    게이트
    의미
    회로도형
    NOR
    Not OR의 약자로 OR게이트 결과의 반대 값을 출력
    논리식
    진리표
    게이트
    의미
    회로도형
    XOR
    (eXcusive-OR)
    두 개의 입력정보가 서로 베타적일 때(반대일 때) 1이 출력
    논리식
    진리표
    게이트
    의미
    회로도형
    XNOR
    (eXclusive-NOR)
    XOR 게이트 결과의 반대값을 출력
    논리식
    진리표
    게이트
    의미
    회로도형
    Buffer
    입력 정보를 그대로 출력
    논리식
    진리표


    <질문>

    A+A' * B = A+B

    <답글>

    질문내용을 풀이해 보면 이렇게 됩니다.

    A+A' * B = (A+A') * (A+B)
                 =1 * (A + B)
                 =A + B

    A+A' * B에서 (A+A') * (A+B)로 풀이 되는 것은 분배법칙에 의해서 풀이 되는 것입니다.

    분배법칙은 2가지 예로 볼수 있습니다.

    1. A*(B+C)=(A*B)+(A*C)
    2. A+B*C=(A+B)*(A+C)

    위에서 설명한 것처럼
    (A+A') * (A+B)를 계산하여 보겠습니다.
    일단 첫 괄호인 (A+A')

    이것을 보수법칙으로 풀이하면 1 이란 결과가 나옵니다.

    보수법칙은

    A+A'=1
    A*A'=0

    즉,

    1 * (A + B)라는 결과가 나타납니다.
    1곱하기 (A + B)는 즉 (A + B)와 같으니

    A + B가 됩니다.

'study > programming' 카테고리의 다른 글

포인터  (0) 2007.12.07
포인터  (0) 2007.12.04
배열 c  (3) 2007.11.26
배열 오름차순  (0) 2007.11.21
배열 오름차순  (0) 2007.11.13


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 11. 26. 00:22, study/programming]
#include <stdio.h> //printf() 의 이용을 위한 헤더 파일 포함

#define SIZE 60

void mean(int [] );
void mode(int [], int []) ;
void printArray(int []);

/*>>>>>>>>>>>>>>> main() 함수 시작 <<<<<<<<<<<<<<<<<<<<*/
int main()
{
int frequency[10] = { 0 };
int response[SIZE] = {
5, 6, 7, 2, 5, 3, 9, 4, 6, 4,
4, 8, 0, 6, 3, 7, 0, 2, 0, 8,
7, 8, 0, 5, 8, 7, 3, 9, 7, 8,
3, 5, 2, 9, 7, 5, 3, 8, 7, 2,
7, 4, 7, 2, 5, 3, 8, 7, 5, 6,
4, 7, 6, 1, 6, 5, 7, 7, 7, 6 };

/* fill here to call printArray() */
printArray(response); //배열명은 배열의 시작주소

/* fill here to call mean() */
mean(response);

/* fill here to call mode() */
mode(frequency,response);

return 0;
}
/*>>>>>>>>>>>>>>> main() 함수 종료 <<<<<<<<<<<<<<<<<<<<*/

void printArray(int a[])
{
int j;
printf("다음과 같은 0에서 9까지의 정수에서 \n");
for (j = 0; j < SIZE; j++) {
if (j%20 == 0)
printf( "\n" );

printf("%d ",a[j]);

}
printf("\n\n");
}

void mean(int answer[])
{
int j, total = 0;

printf("%s\n%s\n%s\n", "********", " 평균", "********");

for (j = 0; j < SIZE; j++)
{

total += answer[j];
}

printf( "배열 원소의 평균을 구하려한다.\n"
"배열 원소의 수는 %d 이고 \n"
"배열 원소의 전체 합은 %d 이므로\n"
"평균은 %.4f 이다.\n",


j,total,(total*1.0)/j


);
}

void mode(int freq[], int answer[])

{
int rating, j, h, largest = 0, modeValue = 0;

printf( "\n%s\n%s\n%s\n",
"********", " 분포", "********" );

for ( rating=0; rating<=9; rating++ )
{
freq[rating]=0;
}

for ( j=0; j <= SIZE - 1; j++ )
{
for(rating=0;rating<=9;rating++)
if (answer[j]==rating) { freq[rating]++; break; }

}

printf("-------------------------------------------------------\n");
printf("%10s%10s%8s%-20s\n\n", "수", "횟수", " ", "히스토그램");
printf("%28s%-40s\n%28s%-40s\n", " ",
" 1 1 2 2", " ",
"1 5 0 5 0 5" );
printf("-------------------------------------------------------\n");

for (rating = 0; rating <= 9; rating++) {
printf("%10d%10d%8s", rating, freq[rating], " ");
if (freq[rating] > largest) {
largest = freq[ rating ];
modeValue = rating;
}

/* Fill here to print '*' as many as the histogram value.
You have to use for loop. */
for(h=0;h<freq[rating];h++) printf("*");

printf( "\n" );
}
printf("-------------------------------------------------------\n");


printf( "분포에서는 수의 빈도 횟수를 나타낸다.\n"
"분석 결과, 가장 많은 빈도수는 수 "
"%d이(가) %d번 나타났다.\n",modeValue,largest);
}

'study > programming' 카테고리의 다른 글

포인터  (0) 2007.12.04
불 대수의 법칙..  (0) 2007.11.26
배열 오름차순  (0) 2007.11.21
배열 오름차순  (0) 2007.11.13
배열  (0) 2007.11.13


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 11. 21. 14:17, study/programming]

/*
#include <stdio.h>

int main(void){
    char arr2[]="lprea";
 
 printf("%s",arr2);
 
 return 0;
 }
*//*
#include <stdio.h>

int main(void){
 int i;
    int arr2[]={122,3,4,5};
 for(i=0;i<arr2[i];i++){
  printf("%d\n",arr2[i]);
 }
 return 0;
 }*/

#include <stdio.h>
#define max 10
int main(void)
{
 int z,j;
 int i=0;
 int arr2[max];
 printf("정수 10개를 입력하시오\n");
 for(i=0;i<max;i++)
 {
  printf("%d번째:",i+1);
  scanf("%d",&arr2[i]);
 }

 for (i=0; i<max; i++) {  
        for(j=i+1; j<max; j++) {
   if(arr2[i] > arr2[j])  {
    z = arr2[i];
    arr2[i] = arr2[j];
    arr2[j] = z;
   }
  }
 }

for(i=0;i<max;i++){
 printf("\n%d",arr2[i]);
 }
 return 0;
 
}


 

'study > programming' 카테고리의 다른 글

불 대수의 법칙..  (0) 2007.11.26
배열 c  (3) 2007.11.26
배열 오름차순  (0) 2007.11.13
배열  (0) 2007.11.13
c  (0) 2007.11.13


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 11. 13. 19:51, study/programming]


#include <stdio.h>
 void sort(int* i, int n);

 int main()
 {
  int arr[100];
  int *i=arr;
  int j,n;

  printf("몇개까지 입력할래?");
  scanf("%d",&n);

  for(j=0;j<n;j++)
  {
   printf("숫자 처넣어 ~ :");
   scanf("%d",&i[j]);
  }

  for(j=0; j<n; j++)
  {
   printf("니가 처넣은 수는 %d \n",arr[j]);
  }

  sort(i,n);
  return 0;
 }

 void sort(int *i,int n)
 {
  int y,j,k;
  int temp;

 
  printf(" sort 시작 \n");

for(y=0; y<n; y++)
 {
  for(j=0; j<n; j++)
 {
  if(i[y] < i[j])
  {
    temp = i[y];
    i[y] = i[j];
    i[j] = temp;
   }
  }
 }
     for(k=0;k<n;k++)
   printf("%d\n",i[k]);
 }


'study > programming' 카테고리의 다른 글

배열 c  (3) 2007.11.26
배열 오름차순  (0) 2007.11.21
배열  (0) 2007.11.13
c  (0) 2007.11.13
c  (0) 2007.11.12


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 11. 13. 15:16, study/programming]

제 7 강 : 배열

학습목표 : 배열 데이터에 데이터를 입력하고 출력하는 기법을 배운다.

*요점정리 :

배열이란 같은형의 데이터 n개가 연속적으로 설정되어 있는 것을 의미한다.

1차원 배열은 변수끝에 [ ]을 사용하여 배열을 설정한다.

2차원 배열은 [][]을 사용하여 그안에 배열의 수를 설정한다.


7-1.배열의 형식

배 열이란 여러개의 데이터형을 한꺼번에 설정하는 것을 말합니다. 다시 말하면 여러개의 데이터가 한  묶음으로 되어있다는 말입니다. 문자데이터를 연결하여 30개를 사용하고자 할때나 정수형 데이터를 5개를 한번에 사용할 때 배열을 사용합니다. 그럼 이런 배열은 어떻게 표현 되는지 알아보겠습니다. 형식을 보면 형을 선언하고, 변수를 선언하고, 대괄호 다음에 배열개수를 선언합니다. 문자열 배열 5개를 한다고 하면 char형을 선언하고 string[5](변수명은 자기가 마음대로 쓰면 된다.)라고 표현하면 됩니다 여기서 가로안에 5라는 것은 문자를 5개 저장할 수 있다는 뜻입니다. 그렇다면 정수형 3개가 들어가는 배열이 있다 라고 한다면 어떻게 표현하면 될까요? 임의적으로 배열의 이름을 num이라고 한다면 int num[3] 이라고 표현하면 될 것입니다 float형이나 double형 등도 같은 방법으로 표현 할 수 있습니다. 그림 7-1은 배열의 형태를 도시한 것입니다.


(그림 7-1) 여러 가지 배열


그 림 7-1)에 있는 그림은 문자열 배열, 정수형 배열, 실수형 배열의 예를 보여주고 있습니다 문자열 배열 string[5]라는 것은 문자열이 5개가 있는 배열이라는 것 입이다. 문자형은 1바이트이니까 1바이트가 하나, 둘, 셋, 넷, 다섯 개 이렇게 쭉 일렬로 연결되어 있다, 라는 것입니다. 거기서 첫 번째 값에는 L, 두 번째  값에는 O, 세 번째 V, E, 마지막에 0값 이렇게 데이터가 들어갈 수 있다는 것입니다. 그 다음 int[3] 이라고 하는 것은 int형 대이타가 배열로 3개가 있다는 것입니다 그런데 그림 7-1)을 보면 문자열 하고는 모양이 틀리지요? 문자열은 1바이트이지만 정수형은 4바이트를 쓰기 때문에 4byte 짜리가 연결돼서, 3개가 연결돼서 들어가 있다라는 얘기가 되기 때문입니다. float형도 4바이트를 쓰기 때문에 정수형과 같은 모습을 하게 됩니다. 결론적으로 int num 3개라는 것은 가로로 4개, 세로로 3개니까 12개의 바이트를 소유하게 됩니다. 또 float 데이터 4개라고 하면, 이렇게 데이터가 들어가 있는 것이 하나, 둘, 셋, 네 개가 들어가 있는 것입니다. 정리하면 문자형 같은 경우에는 문자는 1byte니까 배열을 5개를 주겠다 하면 문자가 5개가 연속으로 있는 것이고, 정수형일 때의 배열은 정수형이 4byte이니까 4byte짜리가 3개가 연속적으로 있는 것이고 , float형일 경우에는 4byte이니까 4byte가 쭉 연속돼서 들어가 있다는 이야기 입니다. 그래서 정수형일 때는 3015가 4byte 안에 들어가 있고 6234라는 값이 4byte, 그 다음에 7262라는 값이 4byte 안에 이렇게 들어가 있다는 이야기 입니다. 프로그램을 하다 보면 배열을 많이 씁니다. 문자배열로 예를 들어보면 ‘안녕하세요’, ‘ABCD’, ‘LOVE’ 이런 것들은 글자들을 하나 하나들을 쭉 연결시킨 배열 형태입니다. 숫자 같은 경우도 100, 110, 120, 130 이렇게 값을 연속적으로 저장하고자 할 때에는 배열을 이용할 경우가 많습니다.  배열을 이용하고자 할 때 그 배열의 저장방식은 바로 이렇게 크기에 따라서 그 자기의 크기가 일렬로 연결되어 있는 형태입니다.


7-2.문자형배열

앞에서 문자, 정수, 실수배열을 어떤 식으로 처리해 나가는가하는 것을 배웠습니다. 이제 문자배열이 대해 좀 더 알아보도록 하겠습니다.

문자형 배열은 char라고 선언해 주고, 변수명을 선언해 주고, 배열 개수 선언해 주면 문자열 배열이 되는 것입니다. char temp[8] 이라고 한다면 문자형 8개가 일렬로 나열되어있는 배열의 이름이 temp 라는 것입니다.

8 개의 배열 중에 첫 번째 주소값은 0입니다. 그래서 temp[0]이라고 표현 됩니다. 이 첫 번째 값에 A를 놓고자 한다면 temp[0]=‘A'; 이렇게 해서 문자를 넣어 주면 됩니다. 두 번째가 1, 세 번째가 2, 네 번째가 3, 이렇게 한 값씩 지정되게 됩니다. 조심하셔야 할 것은 배열의 주소값이 1부터 시작하는 것이 아니라 0부터 시작한다는 것입니다. 문자열을 처리하는 함수들은 많습니다. 왜냐하면 우리가 문자를 많이 쓰기 때문입니다. 대표적인 함수로 strcpy라는 함수가 있는데 string copy의 약자입니다. strcpy(문자배열 변수1, 문자배열 변수2) 라고 하면 문자배열 변수2에 있는 데이터를 문자배열 변수1로 저장하겠다, 라는 말이 됩니다.


알 고 가자^^) 나중에 또 다루겠지만 문자열 배열은 다른 정수형배열이나 실수형 배열과 값을 입력하는 방법이 다릅니다 정수형 배열이나 실수형 배열은 직접 넣어주면 되지만 정수형 배열은 strcpy나 strcat 등의 문자열 함수를 이용하면 편리하게 처리할수 있습ㅈ니다. 뒤에서 다루게 되는 예제중에 이름과 전화번호를 입력받는 예제가 있는데 전화번호는 정수이기 때문에 바로 변수를 입력받아서 배열에 입력할 수가 있습니다 그러나 이름의 경우에는 strcpy를 써서 입력하는 방법을 사용했습니다.. 많은 분들이 그것을 잊어버리시고 헤메는 것을 볼 수 있는데 여러분들은 꼭 기억하시기 바랍니다. 무슨 소리인지 모르시겠다고요? 그럼 일단 넘어가세요. 같이 공부하시다보면 “아 이 소리였군” 하시게 될 것입니다.

 

문 자열 배열에는 다른 형의 배열에는 없는 것이 있는데 문자열 배열 마지막에는 꼭 “null" 값이 들어간다는 것입니다. ”null"이라는 값은 코드값으로 0에 해당됩니다. 예를 들어서 “test”라는 문자가 들어있는 문자형 배열이 있다고 하면 ‘t’ ‘e’ ‘x’ ‘t’라는 4개의 문자가 들어가고 마지막에는 숫자 ‘0’ 값이 들어간다는 것입니다 보통 0을 null이라고 하는데, 0값, 아무것도 없다, 라는 뜻입니다. 문자열 배열은 일반적으로 문자열이 끝나는 지점에 0값이 집어넣어진 것까지 포함시킨 것이 바로 문자열 배열이라고 합니다. 이 ‘null'값은 한 분장이 끝났다라는 것을 알려주는 역할을 하게 됩니다. 그림 7-1에서 LOVE 다음에 숫자 0이 설정된것도 바로 이런 예입니다.

문 자열 배열을 출력할 때는 printf 함수로 %s 기호를 이용해서 출력할 수가 있습니다. printf 함수를 이용하여 문자열을 출력할때는 printf("%s", 출력하고자하는 문자형 배열) 과 같은 형식을 사용하게 됩니다. 다른 방법으로 큰 타옴표를 이용하는 방법이 있는데 printf("출력하고자 하는 내용\n")라고 코딩을 하면 큰따옴표 안에 있는 내용을 그대로 화면에 출력하게 됩니다. 큰따옴표 안에 있는 ‘\n'의 의미는 한줄이 끝났다라는 것을 알려주는 것입니다 그럼 이젠 한 단계 더 발전된 형태로 화면에 출력해볼까요? 예를 들어 printf("이것은 %s 입니다.“, ”테스트“); 라고 코딩을 한다면 어떻게 화면애 출력될까요? 화면에는 ”이것은 테스트 입니다.“ 라고 출력될 것입니다 %s는 문자형 배열을 듯한다면 앞에서 말슴드렸지요? 그러면 여기서는 문자형 배열 테스트가 %s 대신에 출력되게 됩니다.

C 언어에서는 문자를 출력하는 기능들을 많이 사용하고 있기 때문에 문자형 배열에 대한 함수들이 많이 있습니다. 그 함수들을 string함수라 하는데 물론 나중에 가서 string함수에 대한 것들을 많이 배우겠지만, 중요한 것은 문자형 printf함수도 문자열을 출력하라는 함수다, 라는 것을 기억하시면 됩니다.

다음의 두 예제는 문자형 배열에 “Love is"라는 문자열을 입력하는 프로그램입니다.

예제 1)문자를 직접 할당해서 출력 하는 예

#include <stdio.h>

void main()

{

        char string[8];

        string[0]='L';

        string[1]='o';

        string[2]='v';

        string[3]='e';

        string[4]=' ';

        string[5]='i';

        string[6]='s';

        string[7]=0;

        printf("%s\n", string);

}

결과)


예제2)문자열 함수를 이용한 예

#include <stdio.h>

#include <string.h>


void main()

{

        char string[8];

        strcpy(string, "Love is");

        printf("%s\n", string);

}

결과)


첫 번째 예제는 string문자열에 문자를 하나씩 넣어주는 프로그램입니다. string이란 이름의 8개의 문자형 공간을 가지는 문자형배열을 만든 다음 첫 번째부터 L, o, v, e, 공백(스페이스, 32번이라고도 하는데 빈칸을 말함), i, s하고 마지막에 0 까지 8개의 문자를 하나씩 넣어 줍니다. 여기서 0은 맨 마지막에 문자열 끝에 항상 0번을 넣는다고 했죠? 이렇게 해서 printf함수를 써서 화면에 출력하면 "Love is" 라는 문자가 출력되게 됩니다. 2번째 예제는 strcpy라는 함수를 사용해서 문자열을 입력하는 프로그램입니다. 여기서 주목해야 하는 것은 프로그램 처음에 #include <string.h>를 꼭 집어넣어 주어야 한다는 것입니다 이 #include 부분은 나중에 뒤에 가서 다시 설명하도록 하겠습니다. 문자열 8개 해주고, 그 다음에 strcpy(string, "Love is"); 이렇게 코딩하시면 “Love is” 라는 문자열이 string으로 들어가게 됩니다. 이 방법은 첫 번째 방식과 결과는 같지만 더 간결하게 프로그램을 만들 수 있습니다.

만 약 Love is 다음에 뒤에 더 많은 글자들을 집어넣게 되면 어떤 문제가 발생될까요? 배열은 8개 밖에 없는데, 8개 이상으로 데이터를 집어넣게 되면 error가 납니다. 글자를 8개 이상 넣고 싶다면 원하는 만큼 배열을 미리 늘려 놓아야 한다, 라는 것입니다. 배열을 선언하게 된다는 건 미리 내가 어느 정도의 크기의 데이터를 가지고 쓰겠다, 라는 것을 미리 설정하는 의미가 됩니다.

scanf 함수를 이용해서 문자열을 입력 받을수 있습니다. 다음 예는 scanf 함수를 이용해서 string[20]개의 배열에 문자를 입력받는 예입니다.

예)scanf("%s",string);

scanf 함수로 입력을 받게 되면 공백 문자가 나올때까지만 string에 입력됩니다. 예를 들어서 “Love is" 라고 입력을 하였을 경우 Love 와 is 사이에 공백이 있기 때문에 string안에는 "Love" 만 들어오게 됩니다. 예제3)은 scanf 함수를 이용한 문자열 입력 예입니다.

예제3)scanf 함수를 이용한 문자열 입력 예

#include <stdio.h>

#include <string.h>


void main()

{

        char string[50];

        printf("문자열을 입력 받습니다.\n");

        scanf("%s", string);

        printf("입력한 문자열은\n");

        printf("%s\n", string);

}


결과)


예제3) 문자를 입력받는 예제인데, scanf함수에도 마찬가지로 %s로 문자를 입력받을 수 있습니다. string의 배열로 50개를 잡고 문자를 입력하게 되면  string(scanf("%s", string);) 에 들어가게 됩니다. 입력한 문자열이 저장된 string을 다시 출력하면 “안녕하세요”가 출력되게 됩니다. scanf에서 %s로 문자를 입력 받으면 공백이 나오기 전까지 문자열을 받습니다. 여기서 주의 하실게 있는데 영어는 한글자가 1바이트이지만 한글은 한글자가 2바이트라는 것입니다 입력을 할때 “안녕하세요”라고 한글을 입력했기 때문에 한글자당 2바이트를 차지해서 “안녕하세요”가 차지하는 배열은 11개가 됩니다 (문자열을 마지막에 무조건 'null'이 한바이트 차지한다는 것을 잊지마세요)

배 열은 '&'기호를 사용하지 않습니다. 지금까지 단일 문자형 데이터일 경우 scanf함수를 이용한다고 할 경우 '&'을 사용하였습니다. 배열은 단일형이 아니라 하나의 포인터 개념이기 때문에 사용하지 않는다고 말씀드릴수 있습니다. 이부분에 대한 내용도 뒤에 자세히 설명하겠습니다.

공백을 포함한 문자를 모두 받고자 한다면 gets함수를 사용하면 됩니다. 예를 들어서 string[20]에 문gets를 사용하여 문자열을 받고자 한다면 다음 예와 같이 쓸수 있습니다.

예)gets(string);

gets 함수의 인수에는 문자열 배열이나 문자열 포인터 변수를 설정할수 있습니다. 설정된 인수로 명령 프롬포트에서 Enter 키가 눌리기 전까지의 문자열을 string에 저장합니다.

예제 4)는 gets함수를 이용한 문자열 입력 예제 입니다.

예제 4)문자열 입력 예제

#include <stdio.h>

#include <string.h>


void main()

{

        char string[80];

        printf("입력할 문자열\n");

        gets(string);

        printf("%s\n",string);

}

결과)

예제 4)는 string 문자 배열을 설정하고 gets함수를 이용하여 문자열을 입력 받은 예입니다. 출력 결과를 보면 알수 있듯이 공백을 포함한 모든 문자열이 string에 저장됩니다.


7-3.정수형 배열

정 수형 배열은 int 변수[배열개수]와 같은 방법으로 표현합니다. 예를 들어 int data[8]이라고 한다면 8개의 정수를 넣을 수 있다는 말이 되고 data[0] = 3625 라고 한다면 배열의 첫 번째 자리에 3625 라는 값을 넣어 준다는 말입니다.

정 수형 배열에 정수를 넣을 때는 4byte의 int의 배열이나 long의 배열을 사용합니다. 정수형 배열은 문자열 배열처럼 strcpy와 같은 함수가 없고 scanf함수를 이용할 때 %s 기호로 한 번에 입력받을 수 없습니다. 그것은 정수가 4byte 단위로 들어가고 또 따로따로 입력받는 것이 사용할 때 정확하기 때문입니다. 물론 나중에 배우시게 될 포인터를 이용해서 한번에 지정하는 방법이 있기는 합니다. 그래서 정수형 데이타는 입력 받을 때와 마찬가지로 출력하고자 할 경우에도 따로따로 해서 %d를 이용해서 출력합니다. 부호가 없는 정수형일 때 앞에 unsigned %u를 해주고, 뒤에 []안에 숫자를 써주면 됩니다.

다음에는 이런 배열을 가지고, 정수형 배열과 소수형 배열들이 예제를 어떻게 작성 한 번 해보면서 데이터를 넣고, 빼는 방법들을 알아보도록 하겠습니다.


예제5)정수형 배열 예제

#include <stdio.h>


void main()

{

        int data[5];

        int i;

        printf("5개의 수를 입력받습니다.\n“);


        for(i=0; i<5; i++)

        scanf("%d", &data[i]);

       

        printf("입력한 수를 씁니다.\n");


        for(i=0; i<5; i++)

        printf("%d,", data[i]);


        printf("\n“);

}

결과)


이 예제는 먼저 5개의 정수를 입력받고 입력받은 정수를 다시 화면에 출력하는 프로그램입니다. 여기서는 for문을 이용하여 5개의 정수를 5번을 반복하여 하나씩 입력을 받고 다시 for문을 이용하여 5개의 정수를 출력하는 예제입니다. scanf함수를 이용하여 데이터를 받아다가 반복번호에 해당되는 data[i]에 해당하는 값을 입력하게 되는데, 배열 첫 번째 주소는 0 이므로 첫 번째 데이터는 0번째에 이 들어가고 두 번째는 1에 들어가는 방식으로 하나씩 메모리를 차지하게 되는 것입니다 출력하는 것도 마찬가지로 printf 함수를 이용하여 정수를 하나씩 for문의 반복에 의해 출력하게 되는데, 이런 식으로 데이터를 입력받을 수가 있고, 그리고 출력할 수 있게 됩니다. 또 하나 중요한 것은 int data라는 배열을 놓고 원하는 배열 순서에 데이터 값을 놓고 싶다고 할 경우에는 data[2]=365처럼 직접 원하는 배열 번호에 값을 입력할 수 있습니다. 일단 이런 데이터들을 우리가 입력하고 난 다음에 산술연산을 하게 됩니다.


예제6).실수형 배열 예제


#include <stdio.h>

void main()

{

        float data[7], total;

        int i;


        printf("소수 7개를 입력 받습니다.\n");


        for(i=0; i<7; i++)

        scanf("%f", &data[i]);


        total = 0;


        for(i=0; i<7; i++)

        total = total + data[i];


        printf("총계 %f", total);

}

결과)


실 수형 배열 예제도 정수형 예제와 같습니다. 다만 형식을 쓸 때 float로만 썼다는 것입니다. 데이터 7개를 받고, total이라는 것을 하나 넣었습니다. 그래서 이렇게 데이터 값을 7개를 받은 다음에 total=0 해주고 total을 이용해서 계속적으로 받은 값들을 반복(for문)시켜서 더한 합계를 내는 프로그램입니다. 여기서 결과를 보시면 화면에 총계가 353.200012 라고 나왔는데 밑줄 친 부분의 값이 외 나왔을가요? 이렇게 되는 이유가 무엇인가 하면, 데이터 값들을 초기화하지 않아서입니다. 원래 float를 쓸 때는 data[0]=0이렇게 초기화를 해줘야 합니다. 물론 초기화하지 않아도 값은 비슷하게 나옵니다. 그렇지만 float는 4바이트 중에서 지수부하고 가수부로 나뉘어 지면서 안 쓰는 데이터들이 쓰레기 값이 들어가는 문제점이 있습니다. 그래서 초기화 해주는 버릇도 들이셔야 합니다. 아래와 같이 초기화부분을 삽입하여 주시면 값이 깨끗하게 나오는 것을 확인 하실 수 있으실 것입니다.


for(i=0;i<7;i++)

{

        data[i]=0 //이렇게 해주면 초기화되고 그 다음에 들어간다. 이렇게 하면 그 뒤로 값이

                  깨끗하게 나올 것이다.

        scanf("%f", &data[i]);

}


7-4.Select Sort

이 제 배열을 배웠으니까 배열을 이용한 하나의 알고리즘을 이용해 보도록 하겠습니다. 배열을 사용하여 데이터를 설정하였을 경우 가장 흔하게 이용하는 것이 배열의 데이터를 정렬하는 방법입니다. 이런 정렬 방법에는 Select Sort, Quict Sort, Bubble Sort 등이 있습니다. 그중에서 가장 간단한 방법으로 정렬하는 방식이 Select Sort 라고 하고 합니다. 보통 선택정렬이라고 하기도 합니다.  그림 7-2는 Select Sort 의 알고리즘을 그림으로 표현한것입니다.

(그림 7-2)선택정렬


데 이터들이 그림7-2)에서 처럼 3 6 8 4 2가 0번부터 차례로 들어가 있는데 이것을 나중에 2 3 4 6 8로 정렬을 해주고 싶다는 것입니다.  정렬을 하는 방식은 먼저 첫 번째 다섯 번을 반복하면서, 가장 작은 값을 찾습니다. 가장 작은 값을 찾은 다음에 그 값을 맨 위로 올려줍니다. 그러면서 맨 위에 있던 값 3은 가장 작은 값이 있던 자리로 보내집니다. 이제 맨 위에는 데이터는 빼고 다음 부분부터 시작해서 가장 작은 값을 찾고 그 중에서 가장 작은 값은 2번째 배열로 올립니다. 이런 방식으로 하다가 보면 정렬이 되는 것을 보실 수 있을 것입니다 이런 식으로 반복해서 정렬하는 방식이 Select Sort방법인데, 이 방법은 총계산량은 n(n-1)/2 정도가 됩니다. 이런 방식은 연산량이 굉장히 많은 편에 속합니다. 이 외에 여섯 가지 정도가 있는데 Select Sort말고 버블 소트, 쉘 소트, 퀵 소트.. 버블 소트등이 있습니다. 예제 7은 Select Sort를 사용한 예입니다.


예제7).Select Sort 예제

#include <stdio.h>

void main()

{

        int i, num, j, tem;

        int data[5];

        for(i=0; i<5;i++)

                scanf("%d",&data[i]);

        for(i=0; i<5; i++)

        {

                num = i;

                for(j=i; j<5; j++)

                {

                        if(data[j]<data[num])

                                num = j;

                }

                tem = data[i];

                data[i] = data[num];

                data[num] = tem;

        }

        for(i=0; i<5; i++)

                printf("%d",data[i]);

        printf("\n");

}

결과)



아까 말한 Select Sort의 예제입니다. 프로그램을 보면 for(i=0;i<5;i++) 에 의해서 점점 비교해야 하는 수가 줄어듭니다. 준다는 것이 반복이 줄지만 시작점에 처음에는 0으로 들어갔다가 그 다음엔 1로 들어가고, 2로 들어가고, 3으로 들어가고, 4가 들어가는 방식으로 진행 되어 나갑니다. 결국 여기 i값부터 시작되는 것인데, 처음에는 0으로 들어가는 것으로 해서 i값이 초기 값으로 들어갑니다. 이렇게 5번 반복해서 반복을 해서 데이터 j값이 (j값이라 함은 검색해서 첫 번째 값이 된다.) 데이터 num(첫 번째 값들) 값보다 작으면 이것이 최소 값이 되는 것입니다. 여기서부터 최소 값이 작아지는 것인데 최소 값의 번호를 잡은 다음에 이 반복을 종료하고 temp라는 곳에 data i값을 넣습니다. data I값이라는 것은 5, 4, 3, 2, 1인 것들 입니다. 첫 번째 값은 0이 되고, 그 다음엔 1값이 되고, 그 다음엔 2값이 되는 형식으로 데이터 i값을 채워가는 것입니다. 이렇게 채어들어 가는 값들을 temp에 저장을 하고, 최소 값에 있는 값을 바로 data[i] 고 위치에 집어넣고, 그 다음에 원래자리에다가 temp값을 다시 집어넣는 것이지요. 그러니까 이 자리에 있었던 것을 최소 값이 있는 자리로 집어넣으면서 반복을 하게 되면 sorting이 됩니다.


7-5. 2차원 배열

2차원 배열 역시 다차원 배열에 속하는 것이지만 보통 많이 쓰는 것이 2차원 배열이기 때문에 2차원 배열만 먼저 설명하겠습니다.


char data[5][5]를 그림으로 표현하면 그림 7-14와 같은식으로 표현 할 수 있습니다.

그림 7-3)2차원 배열


이 차원배열은 데이터형 변수명 [변수][변수] 와 같은 방식으로 표현되는데 앞에 있는 가로의 수가 세로열의 수를 표시하고 뒤에 있는 가로의 변수가 가로열의 수를 표시합니다. 예를 들면 char data[4][20] 이라고 했을 때 20바이트짜리 char형 배열 4개가 있다는 뜻이 됩니다. 이 이차원배열에 데이터를 넣어보면 첫 번째 배열에는 ‘태권V’, 2번째 배열에는 ‘지구천왕’, 세 번째 배열에는 가오가이거, 네번째 배열에는 ‘디지몬’ 식으로 입력할 수 있습니다 정수와 소수의 2차원 배열은 행렬 데이터를 정렬시키거나 계산할 때 굉장히 유리한 방법입니다.


예제8). 2차원 배열 예제

#include <stdio.h>
void main()
{    
  char name[5][20];
        int i;
        printf("이름5개를 입력하세요\n");
        for(i=0; i<5; i++)  {
        scanf("%s", name[i]);
        printf("출력 합니다.\n");
  }
        for(i=0; i<5; i++){
        printf("%s",name[i]);
  }

}

결과)


이 름을 입력 할 때 “만득이, 천득이, 백득이, 십득이, 일득이” 5개를 입력해서 입력한데로 출력하는 예제입니다. 일반적으로 문자열 2차원 배열은 1차원 문자열 배열로 보시는 것도 좋습니다. char name[5][20]이라고 설정하였다면 20개의 문자열을 가질수 있는 5개의 배열로 생각한다는 것입니다. 이렇게 보면 name[0]이라고 선언하게 되면 name[0]은 20개의 문자열을 가질수 있는 변수가 됩니다.

정수형이나 실수형 2차원 배열은 각각의 배열을 하나하나 사용해야 합니다. 예제9)는 2차원 소수 배열의 각 가로열의 평균을 구하는 예입니다.

예 9)실수형 2차원 배열

#include <stdio.h>


void main()

{

        float data[5][4],sum[5];

        int i,j;

        printf("실수 4개의 값을 5번 입력하세요\n");

        for(i=0;i<5;i++)

        {

                sum[i]=0;

                for(j=0;j<4;j++)

                {

                        scanf("%f",&data[i][j]);

                        sum[i]+=data[i][j];

                }

        }

        printf("각 항의 총합은 \n");

        for(i=0;i<5;i++)

                printf("%f\n",sum[i]);

}


결과)

2 중 for 반복문에서 총 20개의 실수형 데이터를 받습니다. 이때 Enter키는 상관이 없습니다. 결과 그림에서 보듯이 5개씩 입력을 했다 하더라도 처음 4개만 data[0]의 4개항목에 입력이 됩니다. 이렇게 입력된 데이터를 1차원 실수 배열 sum[5]에 총 합을 출력합니다.



12.다차원 배열

다 차원 배열은 3차원 배열 이상을 말하는 배열입니다. 에를 들어 char data[3][4][10]; 이라고 한다면 문자열 10개를 쓸 수 있는 것이 4개가 있는데, 그 4개 짜리가 3개가 있다, 라는 말입니다. 2차원배열, 3차원배열 하면 어렵게 생각 하시는 분들이 있는데 우리가 어린 시절에 받았던 종합선물 세트를 생각하시면 이해하시기 쉽습니다. 종합선물 세트가 3개 있다고 하고 안에는 껌이 한 3통 정도 들어있습니다 그리고 그 껌한통에는 껌이 한 5개 정도 들어 있습니다. 이것이 3차원 배열입니다 만약 4차원 배열이라고 한다면 이 종합선물 세트가 들어있는 박스가 3개 정도 있다고 생각하시면 됩니다 이 4차원배열을 표현식으로 표현해 보면, “과자(데이타형) 종합선물세트(배열명) [3](박스가 3개)[3](종합선물세트 3개)[3](껌이 3통)[5](껌이 5개) 와 같은 방식으로 표현 됩니다

다차원 배열들을 갈 때 너무 많은 다차원 배열을 쓰는 것이 좋다고는 볼 수 없습니다. 왜냐하면, 데이터들을 처리할 때 자기 자신도 많이 헷갈리고 프로그램에서의 퍼포먼스도 많이 떨어집니다.

다 차원배열은 이런 것들이 있지만 일반적으로 정수형 데이터나, 소수형 데이터, 숫자형 데이터는 2차원까지 쓰는 것이 좋고, 문자 데이터는 3차원까지 쓰는 것이 좋습니다. 이 부분에 대해서는 나중에 포인터로 가면서 더욱 자세하게 설명하게 될 것입니다

'study > programming' 카테고리의 다른 글

배열 오름차순  (0) 2007.11.21
배열 오름차순  (0) 2007.11.13
c  (0) 2007.11.13
c  (0) 2007.11.12
07.11.04 정보처리산업기사 합격수기  (0) 2007.11.11


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 11. 13. 13:37, study/programming]

#include < stdio.h>

#define MAX_CNT 20 //최대 문자열 개수

void main()
{
int cnt,n,k;
char s[MAX_CNT][81]; //문자열 저장할 변수 최대 80자
char temp[81]; //sorting 시 사용할 임시 변수

cnt=0;
while(1) {
printf("%d 번째 string(종료:.) ", cnt+1);
scanf("%s", s[cnt]);
if (s[cnt][0]=='.') break;
cnt++;
if (cnt==MAX_CNT) break;
}

//sorting
for (n=0; n < cnt-1; n++)
for (k=n+1; k < cnt; k++)
if (strcmp(s[n],s[k])<0) {
strcpy(temp, s[n]);
strcpy(s[n], s[k]);
strcpy(s[k], temp);
}

for (n=0; n < cnt; n++)
printf("%s\n", s[n]);
}

'study > programming' 카테고리의 다른 글

배열 오름차순  (0) 2007.11.13
배열  (0) 2007.11.13
c  (0) 2007.11.12
07.11.04 정보처리산업기사 합격수기  (0) 2007.11.11
c  (0) 2007.11.10


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 11. 12. 19:24, study/programming]
/*
#include <stdio.h>

int main(void){
    char  answer;
    int course=0;
    answer = (course == 0) ? 'A': 'B';

    printf("%c\n",answer);
    return 0;
}
*/
/*
#include <stdio.h>
int main(void)
{
int str[11];
int n,j,i=0;
printf("10진수 입력");
scanf("%d",&n);

for(j=0;j<10;j++){
str[j]=n%2;
n=n/2;
}

printf("2진수:");

for(j=9;j>=0;j--){
printf("%d",str[j]);
}
printf("\n");
return 0;
}
*/
/*
#include <stdio.h>

int main(void)
{
    int invalid_operator = 0;
    char operator;
    float number1,number2,result;
    printf("두 수를 다음과 같은 형태로 입력하세요.\n");
    printf("number1 연산자 number2\n");
    scanf("%f %c %f", &number1, &operator, &number2);

    switch(operator){
    case '*':
        result = number1 * number2;
        break;
    case '/':
        result = number1 / number2;
        break;
    case '+':
        result = number1 + number2;
        break;
    case '-':
        result = number1 - number2;
        break;
    default :
        invalid_operator = 1;
    }
    switch(invalid_operator){
    case 1:printf("연산자가 잘 못 입력되었습니다.\n");
        break;
    default :
        printf("\n>>>>>>>>결과는\n");
        printf("%5.2f %c %5.2f = %5.2f\n", number1, operator, number2, result);
        break;
    }
    return 0;
}
*/

#include <stdio.h>

int main(void){
    int x=0;
    scanf("%d",&x);
    (x%2==0)?printf("짝수입니다"):printf("홀수입니다");
    return 0;
}

'study > programming' 카테고리의 다른 글

배열  (0) 2007.11.13
c  (0) 2007.11.13
07.11.04 정보처리산업기사 합격수기  (0) 2007.11.11
c  (0) 2007.11.10
반복문 9월 17일  (0) 2007.09.17


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 11. 11. 20:52, study/programming]

75점 이상으로 합격예상입니다!

사실 걱정을 많이 했었는데 알고리즘이 생각보다 쉽게 나와서..

필기실기 둘다 한번에 합격입니다/


1. 알고리즘(30점):

무조건 다 맞아야 합니다.

공부하기 전에 솔직히 무슨 말인지 전혀 몰랐는데..저같은 경우 인강을 보면서 하니까

금방금방 이해 되더군요..

산업기사셤에서는 주로 수학과 자료구조에서 문제가 출제되는 듯 합니다.

 이번 시험에서는 7의 배수 구하기가 나왔습니다.


2. 데이타베이스(30점)

24점 이상을 목표로 공부해야 합니다. 개념을 확실히 이해 하시면 될듯.

알고리즘과 함께 가장 시간을 많이 투자해야하는 과목.

3. 업무프로세스(20점)

예전엔 국어만 할줄 알면 붙는다고 생각했었는데,, 좀 어려워졌더군요.

이번 시험 1,2번 같은 경우 본문에 나오지 않는 경영용어가 튀어나와서

당황스러웠습니다.

4. 신기술 동향(10점) & 전산영어(10점)

비전공자이신 경우 힘드실듯..

범위가 상당히 광범위하거니와 시간대비점수가 낮기 때문에 ...


07년 4회 정보처리산업기사 알고리즘

<문제>
10개의 정수가 배열 T(10)에 기억되어 있다.
10개의 정수 중에서 7에 가장 가까운 정수를 찾아 그 정수를 출력하고자 한다.
배열에 기억되어 있는 순서에 따라 10개의 정수와 7과의 차이값을 구하여 그 차이값이 가장 최소의 차이값을 가지는 정수를 7에 가장 가까운 값으로 선택하여 출력하는 방법으로 알고리즘을 구현하고자 한다.
제시된 (그림)의 괄호 안 내용에 가장 적합한 항목을 <답항보기>에서 선택하여 답안지의 해당번호에 마크하라.

<처리조건>
- 그림에 제시되어 있는 알고리즘과 연계하여 가장 적합한 조직으로 구현될 수 있게 유의하라
- 배열에 기억된 10개의 데이터를 절대값이 500이하 정수라고 가정한다.
- 10열의 크기가 10일 경우 배열의 요소는 0부터 9까지 구성된다.



사용자 삽입 이미지


<답안>
1. -1 (21)     2. S = T(N)-7 (17)     3. S = 7-T(N) (39)     4. C=S (24)     5. T(N) (18)

'study > programming' 카테고리의 다른 글

c  (0) 2007.11.13
c  (0) 2007.11.12
c  (0) 2007.11.10
반복문 9월 17일  (0) 2007.09.17
tcp/ip  (0) 2007.09.13


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 11. 10. 21:18, study/programming]

1번

#include < stdio.h>

void main()
{
 int nMonth, nCheck;

 printf("달을 입력하세요 : ");
 scanf("%d", &nMonth);

 nCheck = nMonth > 0 ? (nMonth <= 12 ? ((nMonth < 7) ? 0 : 1) : -1 ) : -1;
 

 if(nCheck == -1)
  printf("달의 범위가 아닙니다.\n");
 else if(nCheck == 0)
  printf("상반기\n");
 else
  printf("하반기\n");
}


2번

#include < stdio.h>

void main()
{
 int nNumber, nCheck;

 printf("정수를 입력하세요 : ");
 scanf("%d", &nNumber);

 nCheck = nNumber % 2 == 0 ? 0 : 1;
 
 if(nCheck == 0)
  printf("짝수입니다.\n");
 else
  printf("홀수입니다.\n");
}

3번

#include < stdio.h>

void main()
{
 int a, b, c, max;

 printf("정수를 입력하세요 : ");
 scanf("%d %d %d", &a, &b, &c);

 max = (a>b) ? ((a>c) ? a : c) : ((b>c) ? b : c);
 
 printf("가장 큰 수는 %d입니다.\n", max);
}

5번

#include < stdio.h>

void main()
{
 int a, b[32]={0,}, i=31, temp;

 printf("정수를 입력하세요 : ");
 scanf("%d", &a);

 while(a!=0)
 {
  temp = a % 2;
  a /= 2;
  b[i] = temp;
  i--;  
 }
 
 for(i=0; i<32; i++)
  printf("%d", b[i]);

 printf("\n");
}

'study > programming' 카테고리의 다른 글

c  (0) 2007.11.12
07.11.04 정보처리산업기사 합격수기  (0) 2007.11.11
반복문 9월 17일  (0) 2007.09.17
tcp/ip  (0) 2007.09.13
dd  (0) 2007.09.13


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 9. 28. 20:30, study/toeic]

Mini Test


파트 5


예제

Because the equipment is very delicate, it must be handled with _____.

a) caring b) careful c) care d) carefully


- care

*전치사 + 명사/대명사/동명사(-ing)

*with care = carefully

*불가산명사 - 셀 수 없는 명사 (언제나 단수)

furniture, equipment, merchandise, baggage/luggage, information, advice 등

*delicate = fragile, frail, weak


101. The publishers suggested that the envelopes be sent to _____ by courier so that the film can be developed as soon as possible.

a) they b) their c) theirs d) them


- them

*전치사 다음의 대명사는 목적격

they - their - them - theirs

*주장, 명령, 소망, 요구, 제안, 결정, 충고, 추천 동사 + that 주어 + 원형

(insist, command, order, demand, request, require, ask, suggest, propose, decide, advise, recommend)

*by courier 퀵서비스로

*so that 주어 can/may ~: ~할 수 있도록 (목적)

*so 형/부 that ~: 너무 ~해서 그 결과 ~하다

*develop 현상하다

*as soon as possible = asap, ASAP 가능한 한 빨리


102. Board members _____ carefully define their goals and objectives for the agency before the monthly meeting next week.

a) had b) should c) used d) have


- should

*조동사 + 원형

*be + -ing (진행)

*be + pp. (수동)

*have + pp. (완료)

*used to 원형: -하곤 했다

*be used to 명/-ing: -에 익숙하다

*monthly/daily/weekly/yearly 형용사, 부사 둘 다 가능

*board 명) 칠판, 위원회(board of directors)

동) 탑승하다(get on)


103. For business relations to continue between our two firms, a satisfactory agreement must be _____ reached and signed.

a) yet b) both c) either d) as well as


- both

*between (둘) 사이에 >> 전치사

*among (셋 이상) 사이에 >> 전치사

*satisfactory 만족스런

*satisfy 만족시키다

*satisfaction 만족

*be satisfied/content/pleased with ~: ~에 만족하다

*both A and B: 둘 다

*either A or B: 둘 중 하나

*neither A nor B: 둘 다 ~아니다

*not only A but (also) B: A뿐만 아니라 B도 역시

= B as well as A


104. The corporation, which underwent a major restructuring seven years ago, has been growing steadily _____ five years.

a) for b) on c) from d) since


- for

*undergo - underwent - undergone

*undergo = go through = experience

*~ ago >> 과거 시제에만 사용

*have been -ing: 현재완료 진행형

*for five years 5년동안 (불특정 기간을 나타내는 for)

*since 1971: 1971년부터 (과거 시점과 함께 사용되는 since)

>> since 는 완료 시제와 함께 사용

*which (관계대명사) >> 선행사가 사물, 동물일 때

*who (관계대명사) >> 선행사가 사람일 때


105. Making advance arrangements for audiovisual equipment is _____ recommended for all seminars.

a) sternly b) strikingly c) stringently d) strongly


- strongly

*동명사, to 부정사 주어 >> 단수 취급

*make arrangements for: ~를 준비/마련하다

*advance approval: 사전 승인

*advance tickets: 예매권

*in advance: 미리, 사전에 (beforehand)

*recommend strongly: 강력히 추천/권고하다


106. Two assistants will be required to _____ reporters' names when they arrive at the press conference.

a) remark b) check c) notify d) ensure


- check

*assistant 보조원, 조수

*assistance 도움 (help, aid)

*be required to do = should do ~해야한다

*when ~: 시간 부사절 >> 미래 대신 현재형, 미래완료 대신 현재완료형 사용 (will arrive: x)

*press conference 기자회견

*notify/inform A of B: A에게 B를 알리다/통보하다

*without notice: 통보/예고없이


107. The present government has an excellent _____ to increase exports.

a) popularity b) regularity c) celebrity d) opportunity


- opportunity

*present 명) 선물, 현재

형) 참석중인(서술적), 현재의 (한정적)

동) A with B = B to A: A에게 B를 제공/제시하다

*관사 + 부사 + 형용사 + 명사

*관사 + 형용사 + 명사

*관사 + 명사

*관사: a/an/the


108. While you are in the building, please wear your identification badge at all times so that you are _____ as a company employee.

a) recognize b) recognizing c) recognizable d) recognizably


- recognizable

*while (접) + 주어 + 동사

*during (전) + 명/대/-ing

*please + 동사원형

*늘, 항상: always, all the time, at all times

*so that ~: (목적) -할 수 있도록

*recognize 알아보다

*recognizable: 알아볼 수 있는

*as (전): -로서

*identification badge: 신분증


109. Our studies show that increases in worker productivity have nor been adequately rewarded by significant increases in _____.

a) compensation b) commodity c) compilation d) complacency


- compensation

*show/indicate/demonstrate/suggest that ~: 보여주다, 나타내다

*increase in : -의 증가

*drop/decrease in: -의 감소

*productivity: 생산성

*produce 명) 농산물 동) 생산하다

*production 생산(량)

*productive 생산적인

*adequately 충분히, 적절하게

*be rewarded: 보상받다

*significant 중대한, 상당한(considerable)

*compensation 보상

*compensate for = make up for 보상/보충하다

*get/be reimbursed for: ~에 대해 변상/배상받다


110. Conservatives predict that government finances will remain _____ during the period of the investigation.

a) authoritative b) summarized c) examined d) stable


- stable

*conservative 보수주의자

*liberal 개방주의자, 자유주의자

*predict that ~: 예상하다

*finances 재정 상태

*remain/stay/seem + 형용사/분사: (2형식 동사)

*remain stable: 안정을 유지하다

*stability 안정성

*stabilize 안정적으로 유지하다

*investigation 조사, 수사

*investigate = look into: 조사하다


111. Mr. Kobayashi spoke quite _____ while he was making sales presentation.

a) exciting b) excitable c) excitedly d) excitement


- excitedly

*speak - spoke - spoken

*부사: 동사, 형용사, 부사, 문장 전체 수식

*make a presentation: 발표하다

*sales division: 영업부

*sales representative: 영업 사원, 대리점

*while (접) + 주어 + 동사

*during (전) + 명사


112. It is essential that we operate ____ the parameters of time and a limited budget.

a) among b) about c) within d) onto


- within

*within (전): ~이내에 (범위, 한계)

*within three weeks: 3주 이내에

*parameters 한계, 제한 범위

*budget 예산

*limited 제한된

*It is essential/imperative/necessary/important that + 주어 + 동사원형


113. The success _____ the new manufacturing process has doubled the number of requests for the product.

a) to b) of c) for d) by


- of

*the success of ~: ~의 성공

*manufacturing process: 제조 공정

*double: 두 배로 만들다

*requests/demands/needs for ~: ~에 대한 요구


114. Interviewees should be given the company brochure to read _____ they are waiting for their interviews.

a) during b) after c) with d) while


- while

*interviewee: 면접 응시생

*interviewer: 면접 시험관

*be given: 받다

*brochure: 안내 책자 (pamphlet)

*while (접) + 주어 + 동사

*wait for = await: ~를 기다리다

*접속사: while, because, though, although, unless, before

*전치사: during, because of, in spite of, despite, without, prior to


파트 6


141. According to the press release, the company is planning (on) introduce several new machines in the coming year.


- on > to

*according to 명사: ~에 따르면

*according as + 주어 + 동사

*press release: 언론 보도

*press conference: 기자회견

*plan to 원형

*plan on + 명사/-ing

*數: several, many, a few, few

*量: much, a little, little

*in the coming year = in the next year: 다음 해에


142. A total of ten (thousand of) dollars was spent on radio advertising, despite recent requests for budget-cutting measures.


- thousand of > thousand

*ten thousand: 10,000

*thousands of: 수천의

*spend 시간/돈 on 사물: ~에 돈/시간을 소비하다

*despite = in spite of: ~에도 불구하고

*requests/demands/needs for: ~에 대한 요구

*budget-cutting: 예산 삭감

*measures, steps, actions: 조치

*조치를 취하다: take measures/steps/actions


143. Employees will be reimbursed for business travel expenses incurred while on assignment away from the normal (work located).


- work location

*be reimbursed for: ~에 대해 변상받다

*incur: 초래시키다

*~ expenses (which are) incurred: 주격 관계대명사 + be 생략

*on assignment = on duty 근무중

*from (전치사) 뒤에는 명사형: work located > work location (근무지)

*be located at/in: ~에 위치하다


144. The staff was told by their supervisor that the new safety inspection schedule would take effect (on the end) of the year.


- at the end

*at the end of the year: 연말에

*by the end of the year: 연말까지 (완료)

*staff: 직원들 (문맥에 따라 단/복수 가능)

*safety inspection: 안전 검사

*safety standards: 안전 기준 (복수형 주의)

*take effect = come into effect = become effective: 실행되다, 실시되다


145. Your new credit card will bring you benefits that (provides) greater financial flexibility.


- provide

*관계대명사 주격과 동사 일치 문제

: 선행사가 benefits(복수)이므로: provides > provide (3월 기출문제)

*benefits: 회사 복지 제도 (상여금)

*financial flexibility: 재정상의 융통성


146. Last week the President (has announced) more taxes on many crops grown for overseas markets.


- announced

*last week, three years ago, yesterday 등 > 과거시제

: has announced > announced

*taxes on: ~에 대한 세금

*(which are) grown: 주격 관계대명사 + be 생략

*overseas market: 해외시장 = international market


147. The computer software industry is (one of most) competitive markets in today's technologically advanced society.


- one of the most

*industry: 산업, 근면

*industrial 산업의

*industrious 근면한 = diligent

*one of the 최상급 + 복수명사

: one of most > one of the most

*competitive: 경쟁력 있는, 경쟁이 치열한

*compete with: ~와 경쟁하다

*competitor 경쟁자, 경쟁업체

*competition 경쟁

*competitiveness 경쟁력

*technologically advanced society: 부사 + 형용사 + 명사 (어순 주의)



유형학습 Part 5


101. Battery-operated reading lamps _____ very well right now.

a) sale b) sold c) are selling d) were sold


- are selling

*battery-operated: 배터리로 작동되는 (램프는 작동시키다의 대상)

ex) The machine is being operated.

*sell: 팔리다 (자동사에 수동의 의미가 담겨 있음)

*right now = at the moment 지금


102. In order to place a call outside the office, you have to _____ nine first.

a) tip b) make c) dial d) number


- dial

*in order to do = so as to do: ~하기 위해서 (목적)

*place/make a call: 전화 걸다

*dial nine: 9번을 누르다 (요즘 다이얼 방식은 거의 없지만 습관적으로 dial을 사용함)


103. We are pleased to inform _____ that the missing order has been found.

a) you b) your c) yours d) yourself


- you

*inform A that ~: (A는 목적어)

*inform A of B = notify A of B = remind A of B

> A에게 B를 알리다/상기시키다

*missing 분실된 (lost): missed를 사용하지 않는다

*have/has been pp. : 현재완료 수동태 (3월 기출문제)


104. Unfortunately neither Mr. Sachs _____ Ms. Flynn will be able to attend the awards banquet this evening.

a) but b) and c) nor d) either


- nor

*등위 상관접속사

both A and B: 둘 다

either A or B: 둘 중 하나

neither A nor B: 둘 다 아니다

not only A but (also) B = B as well as A: A뿐만 아니라 B도 역시

*will be able to do: can, be able to 의 미래

*attend the meeting: 회의에 참석하다

= be present at the meeting = be in attendance at the meeting

*awards banquet 시상식


105. According to the manufacturer, the new generator is capable of _____ the amount of power consumed by our facility by nearly ten percent.

a) reduced b) reducing c) reduce d) reduces


- reducing

*according to 명: ~에 따르면

*according as 주어 + 동사: ~에 따르면

*in accordance with: ~와 일치하는

*manufacturer 제조업체

*generator 발전기

*be capable of -ing = be able to do: ~할 수 있다

*reduce = cut down = diminish = decrease 줄이다, 감소시키다

*reduction 감소, 감면

*power 전력

*(which is) consumed: 주격 관계대명사 + be 생략

*consume 소비하다

*consumption 소비

*consumer 소비자

*by nearly ten percent: 거의 10% 만큼

*nearly = almost 거의

*near 가까운, 가까이

*hard 열심히; 어려운, 단단한

*hardly = scarcely, seldom, rarely 거의/좀처럼 ~않다

*late 늦은, 늦게

*lately 최근에 = recently = of late


106. After the main course, choose from our wide _____ of homemade desserts.

a) varied b) various c) vary d) variety


- variety

*main course: 주요리

*a variety of = various 다양한 = diverse

*dessert 후식

*desert 사막; 버리다


107. One of the most frequent complaints among airline passengers is that there is not _____ legroom.

a) enough b) many c) very d) plenty


- enough

*one of the 최상급 + 복수명사

(형용사의 최상급 앞에는 the를 꼭 쓴다)

*complaint 불평

*complain of/about : 불평하다

*complain that 주어 + 동사

*among: (셋 이상) ~중에서

*between A and B: (둘) 사이에

*enough 충분한 (수, 양 공통)

*legroom: 발 뻗을 공간


108. Faculty members are planning to _____ a party in honor of Dr. Walker, who will retire at the end of the semester.

a) carry b) do c) hold d) take


- hold

*faculty member: 교직원

*plan to do

*plan on -ing

*hold a party: 파티를 열다

*hold a conference/meeting: 회의를 열다

*be held = take place: 개최되다

*in honor of: ~를 위하여

*retire 은퇴하다 > retirement 은퇴, 퇴직

*resign 사직하다 > resignation 사직

*at the end of the semester: 학기 말에

*at the end of the month: 월말에

*at the end of the year: 연말에


109. Many employees seem more _____ now about how to use the new telephone system than they did before they attended the workshop.

a) confusion b) confuse c) confused d) confusing


- confused

*employ 고용하다 (hire)

*employer 고용주

*employee 종업원, 직원

*seem + 형용사 보어 (분사도 일종의 형용사)

*감정동사의 분사형

현재분사: 사물 주어 (confusing, interesting, surprising, disappointing)

과거분사: 사람 주어 (confused, interested, surprised, disappointed)

*how to do: ~하는 방법

*비교급 ~ than

*did = seemed (confused)

*attend the worksop: 강습회에 참석하다

*workshop = session, training session, symposium, conference, meeting

*동의어, 반의어 학습도 토익에서는 필수적입니다. 영영사전 활용 습관이 요구됩니다. > Longman, Oxford


110. _____ our production figures improve in the near future, we foresee having to hire more people between now and July.

a) During b) Only c) Unless d) Because


- Unless

*unless(접속사) + 주어 + 동사: ~하지 않는다면

*production figures: 생산 수량

*improve 향상되다

*in the near future: 가까운 장래에

*foresee 전망하다, 예상하다

*between A and B: (둘) 사이에


111. The prime minister is expected to arrive at the convention hall at _____ 7:00 P.M.

a) approximated b) approximates

c) approximate d) approximately


- d

*prime minister 국무총리, 수상

*be expected to do = be scheduled/due/supposed to do: ~할 예정이다

*arrive at/in: ~에 도착하다

= get to = reach

*convention hall = convention center 회의장

*대략: approximately, about, around, roughly

*P.M. = post meridiem 오후

*A.M. = ante meridiem 오전


112. Responses to the proposed work schedule changes are _____ outstanding from several departments.

a) until b) yet c) still d) since


- c

*responses/reactions to: ~에 대한 반응

*위 문장의 주어는? responses

*still 여전히 (지속성)

*yet : 부정문(아직), 의문문(벌써) > 완료 구문

*already : 긍정문 (벌써), 의문문 (아니 벌써) > 완료 구문

*outstanding: 미해결의, 미지불된, 계류중인; 뛰어난


113. As the filming location has not yet been _____, the release date has been postponed.

a) detained b) determined c) delayed d) deleted


- b

*As = Because, Since (이유)

*filming location 촬영지

*determine 결정하다

*release date 개봉일, 발표일

*have been pp.: 현재완료 수동태

*have been -ing: 현재완료 진행형

*be being pp.: 진행 수동태

*postpone 연기하다, 미루다 = put off = delay


114. Extreme _____ should be used when the forklift truck is being operated.

a) caution b) cautioned c) cautiously d) cautious


- a

*명사: 주어, 보어, (타동사나 전치사의) 목적어 역할

*extreme 극도의

*extremity 끝 = tip

*extremely 매우, 극도로

*caution 주의

*forklift truck 지게차

*be being pp.: 진행 수동태


115. The county hospital is currently _____ volunteers to staff the reception.

a) look to b) looking for c) looking around d) looking into


- b

*village < county < town < city < province/ state

*currently = presently 현재, 지금

*look for = search for 찾아보다

*look into = investigate 조사하다

*look after = take care of = care for 돌보다

*look through = browse 훑어보다

*volunteer 자원봉사자

*staff ~에서 일하다

*reception 접수처; 환영회; 피로연

*receptionist 접수계원


116. We are a major international company with a growing number of _____ in Norh America.

a) inferences b) instances c) instincts d) interests


- d

*a growing number of: 점점 더 많은 수의

*interest 동업자


117. The report indicates that the Tibrook Fund is acting properly by delivering policy advice _____ rather than announcing it to the public.

a) privacy b) privately c) private d) privatize


- b

*indicate that ~: ~라고 나타내다

*properly 적절하게

*by -ing: ~함으로써 (기출)

*privately 사적으로, 비밀리에

*privacy 사적 비밀

*privatize 민영화하다

*nationalize 국영화하다

*B rather than A = not so much A as B: A라기 보다는 B

*the public 일반 대중


118. This presentation will demonstrate how Metron computers are superior _____ those of our competitors in terms of both features and speed.

a) from b) than c) to d) as


- c

*presentation 발표, 발표회

*give/make a presentation 발표하다

*demonstrate 입증하다, 보여주다 = show

*라틴어 비교급

superior to = better than

inferior to = worse than

senior to = older than

junior to = younger than

prior to = before

posterior to = after

*those of = the computers of

*competitor 경쟁업체

*competitive 경쟁력 있는

*competitiveness 경쟁력

*competition 경쟁

*compete with ~와 경쟁하다

*in terms of ~의 관점에서

*both A and B; 둘 다

*feature 기능, 특징


119. The Executive Council of the Fashion Buyer's Congress is _____ of fifteen members from various branches of the fashion industry.

a) compose b) composing c) composed d) to compose


- c

*executive council 최고 집행 위원회

*congress 협회, 의회

*be composed of = be made up of = consist of ~로 구성되다

*various 다양한

*branch 분야 = field

*fashion industry 패션 업계


120. Though their performance was relatively unpolished, the actors held the audience's _____ for the duration of the play.

a) attentive b) attentively c) attention d) attentiveness


- c

*though, although, even if, even though: 접속사 (양보)

*performance 공연

*relatively 비교적

*unpolished 다듬어지지 않은, 미숙한

*hold - held - held

*hold/attract/draw one's attention: 주의를 끌다

*pay attention to ~에 관심을 기울이다

*for the duration of = during ~동안

*play 연극


121. Dr. Abernathy's donation to Owston College broke the record for the largest private gift _____ given to the campus.

a) always b) rarely c) once d) ever


- d

*donation 기부금 = gift

*break the record 기록을 깨다

*private 개인의, 사적인

*gift that had ever been given ~ (주격 관계대명사 + be 생략)

> gift ever given ~ : ever (이제까지, 그때까지)


122. Savat National park is _____ by train, bus, charter plane, and rental car.

a) accessible b) accessing c) accessibility c) accesses


- a

*national park 국립 공원

*accessible 접근할 수 있는

*have access to ~: ~에 접근할 수 있다

*access ~에 접근하다

*charter plane 전세 비행기


123. In Piazzo's latest architectural project, he hopes to _____ his flare for blending contemporary and traditional ideals.

a) demonstrate b) appear c) valve d) position


- a

*latest 최근의, 최신의

*architectural 건축의

*architecture 건축물

*architect 건축가

*demonstrate 증명하다, 보여주다 = show

*flare/passion/enthusiam/zeal for ~: ~에 대한 열정

*blend 혼합하다 = mix

*contemporary 동시대의, 현대적인 (modern)

*traditional 전통적인

*conventional weapons 재래식 무기

*ideal 이상


124. Replacing the office equipment that the company purchased only three years ago seems quite _____.

a) waste b) wasteful c) wasting d) wasted


- b

*replacing (주어) : 동명사나 to 부정사가 주어일 땐 > 단수취급 (seems)

*replace A with B: A를 B로 교체하다

*equipment 장비, 설비 (불가산명사)

*불가산명사: furniture, clothing, merchandise, machinery, baggage, luggage, equipment, advice, information, resistance

*purchase 구매하다 = buy

*only three years ago: ago가 나오면 언제나 과거 시제 (purchased)

*seem, remain, stay + 형용사 보어

*wasteful 낭비적인


125. On _____, employees reach their peak performance level when they have been on the job for at least two years.

a) common b) standard c) average d) general


- c

*on average 평균적으로

*in general = generally 일반적으로

*have much in common: 공통점이 많다

*have little in common 공통점이 거의 없다

*reach ~에 이르다

*reach for ~를 잡으려고 손을 뻗다

*peak performance level 최고의 실적 수준

*at least 최소한, 적어도 = not less than


126. We were _____ unaware of the problems with the air-conditioning units in the hotel rooms until this week.

a) complete b) completely c) completed d) completing


- b

*부사의 기능: 동사, 형용사, 부사, 문장 전체 수식

*be unaware of = be ignorant of = don't know

*be aware of = know

*problems/troubles with ~의 문제

*air-conditioning units 냉방 장치

*not A until/till B: B하고 나서야 A하다

*completely 완전히, 전혀 (3월 기출)

ex) fill out the form completely (양식을 완벽하게 작성하다)


127. If you send in an order _____ mail, we recommend that you phone our sales division directly to confirm the order.

a) near b) by c) for d) on


- b

*조건 (if, unless), 시간 (when, until, after, before, as soon as, once) 부사절: 미래 대신 현재 시제

*send in = hand in = turn in = submit 제출하다, 보내다

*by mail 우편으로

*by ship 배로

*recommend (추천하다) that 주어 + 동사원형

*phone = call = telephone = get in touch with = contact = check with ~에 연락하다

*sales division 영업부

*sales representative 영업 사원(salesperson), 대리점 (dealer)

*directly 즉시 = immediately = at once = right away

*confirm 확인하다


128. A recent global survey suggests _____ demand for aluminum and tin will remain at its current level for the next five to ten years.

a) which b) it c) that d) both


- c

*survey 연구, 조사 (study, research)

*suggest that ~: 시사하다

*suggest that 주어 + 원형 : 제안하다

*demand for ~에 대한 수요

*requests/needs/requirements for

*at its current level: 현재 수준에

*for the next five years 다음 5년 동안 (the를 꼭 쓴다)

*tin 주석


129. Rates for the use of recreational facilities o not include tax and are subject to change without _____.

a) signal b) cash c) report d) notice


- d

*rates for ~에 대한 요금

*recreational facilities 오락/유흥 시설

*tax 세금

*be subject to change 변경되기 쉽다 (change는 명사)

*without notice: 예고/통보 없이


130. We conduct our audits in accordance _____ generally accepted auditing standards.

a) of b) with c) in d) across


- b

*conduct 시행하다 = lead

*audit 회계감사

*auditor 회계감사위원

*in accordance with ~에 따라

*according to ~에 따르면

*generally accepted auditing standards: 일반적으로 통용되는 회계감사 기준 (부사 + 형용사 + 명사)

*safety standards: 안전 기준 (standards: 복수형에 주의)


131. The Director of Educational Programs works collaboratively with the Ministry of Education to _____ that the programs are meeting the needs of the institution.

a) ensure b) define c) accept d) imply


- a

*Director of Educational Programs: 교육 프로그램 회장

*work collaboratively with : ~와 협력하다 = collaborate with

*collaboration 협력

*Ministry of Education 교육부

*ensure 확실하게 하다, 보증하다

*meet 충족시키다 = satisfy

*needs 요구사항

*institution 교육 기관


132. Armstrong has the _____ management team of the three companies under consideration.

a) impressive b) more impressive

c) impressively d) most impressive


- d

*the 최상급 of the 복수명사

*the 최상급 in the 단체/지역

*impressive 인상적인, 훌륭한

*management team 경영팀

*of the three companies : 3개 회사 중에서

*under consideration 고려중인

*take ~ into consideration/account = consider 고려하다


133. There are over thirty keyboard commands that can prompt word-processing procedures, but common usage _____ only a few.

a) involves b) receives c) subscribes d) corresponds


- a

*There are 복수명사

*There is 단수명사

*over = more than

*commands 명령어

*prompt 유발하다

*word-processing procedures 문서 처리 절차

*common 일반적인

*usage 용도

*involve 포함하다 = include

*only a few (keyboard commands)


134. The recent storms have led to the _____ closure of our overseas office.

a) temporal b) temporary c) temporarily d) temporaries


- b

*recent 최근의

*recently 최근에 = lately = of late

*lead - led - led

*lead to = result in = contribute to = bring about = cause 초래하다

*temporary 임시의, 일시적인 = transient

*permanent 영구적인 = everlasting = enduring

*closure 폐쇄

*overseas office 해외 사무실

*overseas division 해외 부서 = international division

*overseas call = international call 국제 전화

*from overseas 해외로부터


135. "Accounts receivable" is money owed to a company, _____ "accounts payable" is money owed by the company to creditors.

a) whereas b) otherwise c) such as d) in order that


- a

*accounts receivable 수취 계정, 미수금

*accounts payable 지불 계정, 미불금

*owe A B = owe B to A: A에게 B를 빚지고 있다

*owing to = because of = on account of = due to ~때문에

*,whereas 반면에 = on the other hand = while

*creditor 채권자

*debtor 채무자


136. Cooks must remember that some raw foods are very _____ and should be refrigerated or chilled until ready to be eaten or cooked.

a) peripheral b) perishable c) periodic d) permanent


- b

*cook 요리사; 요리하다

*raw 익히지 않은

*perishable 상하기 쉬운, 부패하기 쉬운

*refrigerate 냉장 보관하다

*refrigerator 냉장고

*chill 차갑게 하다

*until (they are) ready ~

*be ready to do: ~할 준비가 되다

*eat - ate - eaten


137. If savings could have been elsewhere, we _____ to give financial support to local community service organizations last year.

a) continue b) continued

c) had continued d) would have continued


- d

*가정법 과거완료: 과거 사실의 반대

If 주어 had pp., 주어 would/should/could/might have pp.

*if절의 변형: had pp. > could have pp.

*savings 저축

*elsewhere 다른 곳에

*financial support 재정적인 지원

*local community service organization 지역 봉사 활동 단체


138. The telecommunications department is completing a detailed _____ of each factory site to determine the types of equipment and features needed in each area.

a) elaboration b) evolution c) evaluation d) expansion


- c

*telecommunications department 원격통신부

*complete 완료하다 = finish

*detailed 상세한

*in as much detail as possible 가능한 한 상세하게

*evaluation 평가 작업

*factory site 공장 부지

*determine 결정하다

*type 종류

*equipment 장비 (불가산명사)

*be equipped with ~를 갖추고 있다

*feature 기능, 특징


139. Proposed changes that are not _____ with existing safety regulations will not be considered.

a) dependent b) compliant c) relating d) supportive


- b

*proposed changes 제안된 변경 사항

*be compliant with = comply with ~에 따르다

*existing 기존의, 현재의

*safety regulations 안전 규정

*safety standards 안전 기준

*safety inspection 안전 검사

*consider 고려하다

*주어는 changes, 동사는 will not be considered


140. The lecture will cover the relevant methods of _____ the impact of currency fluctuations on international transactions.

a) determination b) determined c) determining d) determine


- c

*lecture 강의

*cover = handle = deal with = take care of 다루다, 처리하다

*relevant 적절한, 관련 있는

*method 방법

*전치사 + 명사/대명사/동명사(-ing)

*determine 결정하다

*determined 결심이 굳은

*determination 결심, 결정

*동명사: 동사적 기능 + 명사적 기능

*of determining the impact ~ = of the determination of the impact ~

*impact 영향, 효과 = influence = effect

*have an impact/influence/effect on ~에 영향을 미치다

*currency fluctuations 통화 변동

*international transactions 국제 거래



유형학습 파트 6


141. (Being) sure to complete the evaluation form before you leave the seminar.


*Being > Be

*명령문: Be sure to do: 반드시 ~하시오.

*be sure to do = be bound to do

*complete 작성하다 = fill out = fill in

*evaluation form 평가서

*application form 지원서, 신청서

*before/after 전치사, 접속사


142. The years I spent working with the children's home (was) the most rewarding of my life.


*was > were (주어는 the years: 시간의 경과는 복수 취급)

*시간, 거리, 가격, 무게는 단수 취급이 원칙 (시간의 경과는 예외)

*spend 시간 ~ing: ~하면서 시간을 보내다

*The years (which) I spent ~

*children's home 어린이집

*rewarding 보람있는


143. After checking the features of the X120 computer, we finally decided to buy (the another) model.


*the another > another

*after ~ing: ~한 후에

*check 점검하다

*feature 기능, 특징

*decide to do: 결정하다

*another + 단수명사

*the other + 단수명사

*other + 복수명사


144. Although the reorganization of the storage system caused some disruption at first, there were (much) benefits.


*much > many

*수: many, several, a few, few + 복수명사

*양: much, a little, little + 단수명사

*although, though, even if, even though: 양보접속사 (비록 ~일지라도)

*reorganization 재조직, 재편성

*storage 저장, 보관

*store 저장/보관하다

*cause 초래하다, 야기하다 = result in = bring about = contribute to

*some/any (수, 양 공통)

*at first 처음에는 = in the beginning = initially

*for the first time 처음으로

*disruption 혼란, 방해

*benefits 이득, 사내 복지 제도 (가산명사)

*there is/was + 단수명사

*there are/were + 복수명사


145. If clients do not know (how respond) to a questionnaire item, ask them to circle "I don't know."


*how respond > how to respond; how they should respond (어떻게 답변할 지)

*client 고객

*respond to ~: ~에 답변하다 = answer

*questionnaire 설문지, 질문서

*item 항목; 물품

*circle ~에 동그라미를 그리다


146. An increasing number of companies (has changed) dress codes, allowing employees to wear casual clothing in the work place.


*has changed > have changed (수의 일치)

*a number of 복수 + 복수동사

*the number of 복수 + 단수동사

*increasing = mounting 증가하는

*dress codes 복장 규정

*, allowing = , and have allowed (분사구문)

*allow A to do = permit A to do 허용하다

*casual clothing 평상복 (clothing: 불가산명사)

*work place 작업장

*work location 근무처


147. When you send a fax from this machine, remember to enter the area code (for number) that you are dialing.


*for number > for the number (관계사절의 수식을 받는 경우: 정관사)

*remember to do: ~할 것을 기억하다

*remember ~ing: ~한 것을 기억하다

*enter 입력하다

*area code 지역 번호

*dial nine 9번을 누르다


148. Before submitting the draft document to the vice president, see that it has been reviewed (thorough).


*thorough > thoroughly (동사 수식 부사)

*before ~ing: ~하기 전에

*submit 제출하다 = hand/turn/send in

*draft document 문서 초안

*draft beer 생맥주

*draft ~의 초안을 작성하다

*vice president 부사장

*see that = see to it that ~: ~하도록 유의하다

*have been pp: 완료수동태

*review 검토하다

*thoroughly 철저하게, 충분히

*thorough 철저한, 충분한


149. (Even) we had been behind schedule at one point, the proposal was submitted on time.


*Even > Even if, Even though, Though, Although

*even 부사: ~조차도

*본문에는 접속사가 필요함

*behind schedule 예정보다 늦은

*ahead of schedule 예정보다 빠른

*on schedule = as scheduled 예정대로

*proposal 제안서

*submit = turn in = hand in = send in 제출하다

*on time 정시에


150. The new lounge furniture has arrived and will be in place by the (end next week).


*end next week > end of next week

*lounge 휴게실

*furniture 가구 (불가산명사)

*in place 제 자리에 놓여진

*다음 주 말까지: by the end of next week

*다음 주 말에: at the end of next week


151. Effective immediately, Craig Wu will be the new branch (management of) the Mottsboro division.


*management of > manager of

*effective 효력을 나타내는

*immediately 즉시

*branch manager 지사장, 지점장

*management 경영진

*division 지사, 지점


152. Monica moved to the city last year because she was tired (for) driving so far to work every morning.


*for > of

*be tired of = be sick of = be fed up with ~에 질리다

*so far 그렇게 멀리

*drive to work 차로 출근하다


153. Perhaps Mr. Rhenquist is not quite as well qualified for the position as Mr. Robbins (does).


*does > is

*does, do, did는 앞에 일반동사가 나올 경우 대동사 기능을 한다.

*as 원급 as

*not as/so 원급 as

*be qualified for ~에 대한 자격이 있다


154. Designing and implementing successful incentive pay plans (are) a complex undertaking for any business.


*are > is

*동명사, to 부정사 주어 > 단수 취급

*implement 시행하다

*incentive pay 상여금

*complex 복잡한

*undertaking 기획

*for any business 어떤 사업이든지


155. Shipment of windows ordered on or near the fifteenth of the month will be (delay) due to staffing shortages.


*delay > delayed

*be + ~ing 진행형

*be + pp. 수동태

*shipment 운송

*(which are) ordered

*delay 지연시키다 = postpone = put off

*due to 명 = because of 명: ~ 때문에

*due to 원형 = scheduled to 원형: ~할 예정인

*staffing shortages 직원 부족

*staff 직원을 두다


156. From next year, the London office will be responsible (of) all the European news coverage.


*of > for

*be responsible for = be in charge of ~를 담당하다, 책임지다

*news coverage 뉴스 보도

*cover 보도하다


157. Revitalization of the transportation system would be a major (victor) for Glenville, which is showing signs of recovering following years of economic decline.


*victor (승자) > victory (승리, 성공)

*revitalization 소생, 부활

*sign 징후, 조짐

*economic decline 경기 침체 = recession, downturn, slowdown, slump

*호경기: boom, upturn

*회복 추세: recovery, rebound


158. Ms. Jacobs in Personnel can be relied upon to provide (an excellent) advice on how to conduct interviews with job applicants.


*an excellent > excellent

*advice, information, hair, equipment, furniture, luggage, resistance, merchandise, machinery, clothing > 불가산명사

*rely upon/on = depend on, count on ~에 의지하다

*advice on ~에 관한 조언

*conduct = lead 이끌다

*job applicant 구직자

*apply for ~에 지원하다

*application form 지원서


159. The provincial government is offering Bristol Corporation a $10-million incentive package to build (a new) office buildings in the center of Selisburg.


*a new > new (복수명사 앞에는 관사 X)

*provicial government 주 정부

*incentive package 장려금 = subsidy


160. Clients using travel agency vouchers should stay in hotels that accept vouchers and should present (it) on arrival.


*it > them (vouchers가 복수이므로)

*client 고객

*using ~ = who use ~

*travel agency 여행사

*travel agent 여행사 직원

*(gift) voucher 상품권

*meal voucher 식권

*accept 받아들이다

*present 제시하다

*on arrival 도착 즉시

*on approval 승인 즉시

*upon receipt of ~: ~를 받는 즉시 = upon/on receiving ~

*upon request 요청 즉시



실제문제 70


Part 5


35. Please note that customs regulations do not permit the shipment of _____ items.

a) perishable b) compatible c) sustainable d) incredible


- a

*note that ~에 주의하다

*customs regulations 세관 규정

*customs declaration 세관 신고

*permit 허용하다, 허가하다 = allow

*shipment 운송, 발송

*perishable 상하기 쉬운

*items 물품


36. Brencorp has demonstrated a strong _____ to employee development through its many incentive programs.

a) committing b) committed c) committee d) commitment


- d

*demonstrate 입증하다, 보여주다

*commitment 약속, 전념

*employee development 사원 개발

*through (수단) ~를 통하여

*incentive 장려금


37. Prolonged _____ to moisture can adversely affect the proper functioning of its audio unit.

a) enclosure b) exposure c) exclusion d) exertion


- b

*prolonged 장기적인 = long-term

*exposure to ~에 대한 노출

*expose 노출시키다

*moisture 습기, 수분

*moist 습기가 있는

*adversely 역으로

*adverse effect 역효과

*affect = influence = impact ~에 영향을 미치다

*proper functioning 올바른 기능

*audio unit 오디오 장치


38. Despite an exceptionally small rice harvest, analysts predict that the Tarvo Republic will not need to rely on _____ staple foods this year.

a) import b) imports c) imported d) importer


- c

*despite = in spite of = with all ~에도 불구하고

*exceptionally 예외적으로, 유별나게

*small harvest 적은 수확량

*analyst 분석가

*analyze 분석하다

*analysis 분석

*predict that ~라고 예상하다

*republic 공화국

*rely on = depend/count on ~에 의존/의지하다

*imported staple foods 수입된 주식(主食)

*~ing 능동, 진행

*~ed 수동, 완료


39. Warning! This strap must be fastened _____ around the crates in order to hold the load in place.

a) minutely b) securely c) portably d) thickly


- b

*strap 끈, 띠

*fasten 매다

*securely 안전하게 = tightly (동사 수식: 부사)

*crate = box

*in order to do = so as to do ~하도록 (목적)

*hold ~ in place: 제 자리에 고정시키다

*load 짐


40. Construction engineers _____ that damage from last week's flood will exceed $50,000.

a) estimates b) is estimating

c) have estimated d) have been estimated


- c

*construction 건축

*estimate 추정하다, 어림잡다

*flood 홍수

*exceed ~를 초과하다


41. When changing jobs, it is important to consider _____ salary and benefits.

a) both b) either c) yet d) or


- a

*change jobs 직업을 바꾸다

*consider 고려하다 = take into account = take into consideration

*both A and B

*either A or B

*neither A nor B

*not only A but also B = B as well as A


42. The train station is _____ located near museums, monuments, and other tourist attractions in the city.

a) conditionally b) conveniently

c) affordably d) belatedly


- b

*be conveniently located 편리한 곳에 위치해 있다

*tourist attractions 관광 명소

*monument 기념관


43. Last year, requisition orders for children's clothes increased more than orders for all other types of _____.

a) apparel b) appearances c) apparatus d) appliance


- a

*requisition order 주문서

*type 종류 = line, kind, sort

*apparel 의복 = clothes


44. Check _____ that information on the bill and the receipt match exactly before submitting your records.

a) care b) careful c) carefully d) carefulness


- c

*동사 + 부사 (4월에는 cautiously, rapidly 등 출제)

*match 일치하다

*submit = turn/hand/send in 제출하다

*bill 청구서 = statement

*receipt 영수증


45. Lifelong learning is the only way to remain _____ in today's job market, according to economist Chun Ho Suk.

a) competitor b) competition

c) competitive d) competed


- c

*lifelong learning 평생 교육

*remain + 형용사 보어

*remain competitive 경쟁력을 유지하다

*competitiveness 경쟁력

*compete for ~를 위해 경쟁하다 (4월 기출)

*competition 경쟁

*compete with ~와 경쟁하다

*competitor 경쟁업체, 경쟁자

*competent 유능한 = efficient

*job market 구직 시장


46. Not only _____ the suppliers send the wrong components, but they also sent them to the wrong department.

a) had b) did c) were d) have


- b

*not only A but (also) B = B as well as A : A뿐만 아니라 B도 역시

*부정어 + 동사 + 주어 (도치 구문)

*supplier 공급업체

*components = parts 부품

*department 부서


47. Even when two parties seem radically opposed to one _____, an effective negotiator can help find common ground.

a) other b) the other c) another d) others


- c

*one another 서로 (셋 이상)

*each other 서로 (둘 사이)

> 문맥상 당사자가 셋 이상임

*party 당사자

*radically 근본적으로

*be opposed to 명: ~에 반대하다

*effective = competent 유능한

*negotiator 협상가, 중재자 = mediator

*negotiate 협상하다

*negotiation 협상

*help + (to) 원형: ~하는 것을 돕다

*common ground 일치점, 공통점


48. The Trade Ministry's report _____ that the growing scarcity of skilled labor is limiting business expansion.

a) asserts b) refers c) recites d) calls


- a

*Trade Ministry 무역부

*assert that 주장하다 = argue/maintain that

*growing = increasing = escalating 증가하는

*scarcity 부족, 결핍 = lack

*skilled 숙련된 = experienced

*labor 노동력

*limit 제한하다

*expansion 확장


Part 6


49. The machinery we sell is (assembling in) this country, but most of the parts come from abroad.


답) assembling in > assembled in (수동태)

*machinery 기계 (불가산명사)

*assemble = put together 조립하다

*most of the parts 부품 대부분 = most parts = almost all (of) the parts

*from abroad 해외로부터


50. The applicants who meet the requirements for the position (they will) be contacted in order to schedule an on-site interview.


답) they will > will (주어의 중복)

*applicant 지원자 cf. application 지원서 (4월 기출)

*meet = satisfy 충족시키다

*requirements for ~에 대한 요구사항

*position 직책

*contact ~에게 연락하다 = call, phone, telephone, check with, get in touch with

*in order to do = so as to do ~하기 위하여

*on-site interview 현장 면접


51. (Because) rising incomes and falling mortgage rates, sales of residences and commercial buildings reached another monthly high last week.


답) Because > Because of (전치사 +명사; 접속사 +주어 + 동사)

*rising 증가하는 = escalating = increasing

*income 소득 = revenue

*falling 감소하는 = dropping

*mortgage rates 저당 이율

*sales 판매량

*residence 주택, 저택

*commercial building 상가 건물

*high 최고치

*low 최저치


52. An important factor (should be) considered is Mr. Lopez' ability to keep the new restaurant going for several months with limited revenue.


답) should be > to be (뒤에 본동사 is가 있으므로)

*factor 요소, 요인

*consider 고려하다

*to be considered (고려되어야 할): 부정사의 수동태 (3월 기출)

*ability to do: ~할 능력 (4월 기출)

*keep 목적어 ~ing (능동)

*keep 목적어 pp. (수동)

*for several months 몇 달 동안 (several + 복수명사)

*for another month 한 달 더 (4월 기출)

*limited 한정된, 제한된

*revenue 수입, 소득 = income


53. This year, the judges had the difficult yet enjoyable task of selecting twelve winning photos from the many (who) were entered.


답) who > which/that (선행사가 사물: many photos)

*yet = but

*task 일

*winning 상을 받는

*enter 출품하다


54. While he worked as a (travel agency), Mr. Nakamura specialized in arranging tours of the Middle East.


답) travel agency (여행사) > travel agent (여행사 직원)

*while 주어 + 동사

*during + 명사

*specialize in ~를 전문으로 하다

*major in ~를 전공하다

*arrange = schedule 준비하다

*make arrangements for ~를 준비하다


55. The accounting supervisor was displeased to learn that the budget report would not be finished (by time).


답) by time > in/on time (제 때에, 정시에)

*accounting supervisor 회계부장

*displeased 불쾌한

*budget report 예산 보고서


56. Electronics Superstore has announced that it will (have closed) early for the upcoming holiday next week.


답) have closed > be closed, close (단순미래)

*next week 다음 주 : 미래 시점

*미래완료 (will have pp): 미래를 기준으로 동작/상태의 완료/경험/결과/계속을 나타낸다.

*upcoming 다가오는, 임박한



실전테스트 1

파트 5


101. Answering telephone calls is the _____ of an operator.

a) responsible b) responsibly c) responsive d) responsibility


답) responsibility (관사 뒤에 명사)

*Answering ~ (동명사 주어) > 단수 취급

*responsibility 의무, 책임 = duty, obligation

*operator 교환

*be responsible for = be in charge of ~를 담당하다


102. A free watch will be provided with every purchase of $20.00 or more for a _____ period of time.

a) limit b) limits c) limited d) limiting


답) limited (명사 앞 형용사: 분사도 형용사)

*free = complimentary 무료의

*for free = for nothing 무료로

*be provided with 사물

*be provided for/to 사람

*$20.00 or more = at least $20.00

*for a limited period of time: 한정된 기간동안


103. The president of the corporation has _____ arrived in Copenhagen and will meet with the Minister of Trade on Monday morning.

a) still b) yet c) already d) soon


답) already (긍정문, 완료)

*yet (부정문, 의문문, 완료)

*still (지속성; 여전히)

*the president of the corporation 기업 회장

*meet with = have a meeting with

*the Minister of Trade 무역부 장관

*on Monday morning

*in the morning

*on Monday


104. Because we value your business, we have _____ for card members like you to receive one thousand dollars of complimentary life insurance.

a) arrange b) arranged c) arranges d) arranging


답) arranged (have + pp.: 완료)

*be + -ing (진행, 능동)

*be + pp. (수동태)

*조동사 + 동사원형

*value 가치를 인정하다, 존중하다

*arrange 준비하다

*like you 당신과 같은

*complimentary = free 무료의

*life insurance 생명보험


105. Employees are _____ that due to the new government regulations, there is to be no smoking in the factory.

a) reminded b) respected c) remembered d) reacted


답) reminded

*Employees are reminded that ~ = We remind employees that ~ 직원들에게 알립니다

*remind A of B/ remind A to do/ remind A that ~: A에게 B를 상기시키다

*due to 명사 = because of 명사: ~ 때문에

*due to do = scheduled to do ~할 예정인

*regulations 규정

*there is to be = there is going to be


106. Ms. Galera gave a long _____ in honor of the retiring vice-president.

a) speak b) speaker c) speaking d) speech


답) speech (형용사 + 명사)

*give/make/deliver a speech 연설하다

*in honor of ~: ~를 위하여

*retiring 은퇴하는

*retired 은퇴한

*vice-president 부사장


107. Any person who is _____ in volunteering his or her time for the campaign should send this office a letter of intent.

a) interest b) interested c) interesting d) interestingly


답) interested

*be interested in ~에 관심이 있다

*Any person 누구든지

*volunteer 자원봉사하다

*a letter of intent 의사서한, 의향서, 신청서


108. Mr. Gonzales was very concerned _____ the upcoming board of directors meeting.

a) to b) about c) at d) upon


답) about

*be concerned about = be worried about ~에 대해 걱정하다

*upcoming 다가오는

*board of directors 이사회


109. The customers were told that no _____ could be made on weekend nights because the restaurant was too busy.

a) delays b) cuisines c) reservations d) violations


답) reservations (문맥)

*customer = client = patron 고객

*were told = heard 들었다

*make a reservation 예약하다

*delay 지연

*cuisine 고급 요리

*violation 위반

*violate 위반하다


110. The sales representative's presentation was difficult to understand _____ he spoke very quickly.

a) because b) although c) so that d) than


답) because (원인)

*sales representative 영업사원; 대리점(dealer)

*presentation 발표

*present A with B; present B to A: A에게 B를 제공하다

*전치사 + 명사/-ing

*접속사 + 주어 + 동사

*speak - spoke - spoken

*although = though = even if = even though 비록 ~일지라도

*so that ~ = in order that ~: ~하기 위하여

*비교급 than


111. It has been predicted that an _____ weak dollar will stimulate tourism in the United States.

a) increased b) increasingly c) increases d) increase


답) increasingly (weak 수식: 형용사 앞에는 부사)

*It has been predicted that ~ = We have predicted that ~

*an increasingly weak dollar 점점 약해지는 달러화

*stimulate = expedite = prompt 촉진시키다

*tourism 관광 산업


112. The firm is not liable for damage resulting from circumstances _____ its control.

a) beyond b) above c) inside d) around


답) beyond

*firm 회사 = company, corporation

*be liable for ~에 대한 배상 책임이 있다

*be liable to do = be likely to do = be apt to do ~하기 쉽다

*damage 피해

*result from 원인

*result in 결과

*circumstances 상황

*beyond control = out of control 통제할 수 없는

*under control 통제 가능한


113. Because of _____ weather conditions, California has an advantage in the production of fruits and vegetables.

a) favorite b) favor c) favorable d) favorably


답) favorable (유리한)

*weather conditions 날씨 상황

*advantage 이점, 장점

*production 생산

*productivity 생산성

*favorite 가장 좋아하는

*favor 호의; ~에 찬성하다

*in favor of: ~에 찬성하는


114. On international shipments, all duties and taxes are paid by the _____.

a) recipient b) receiving c) receipt d) receptive


답) recipient (수령인, 받는 사람)

*international shipments 국제 운송

*duties 관세

*taxes 세금

*pay - paid - paid

*receipt 영수증, 수령

*upon receipt of ~: ~를 받자마자


115. Although the textbook gives a definitive answer, wise managers will look for _____ own creative solutions.

a) them b) their c) theirs d) they


답) their

*they - their - them - theirs - themselves

*소유격 + own + 명사: 자신의 ~

*although = though = even if = even though (양보)

*definitive 결정적인

*definite 명확한

*look for ~를 찾아보다 = search for

*creative 창의적인

*creativity 창의력

*solution 해결책 = answer


116. Initial _____ regarding the merger of the companies took place yesterday at the Plaza Conference Center.

a) negotiations b) dedications c) propositions d) announcements


답) negotiations

*initial 최초의 = first = original

*regarding = concerning = as to = about ~에 관한

*merger 합병

*merge with ~와 합병하다

*take place = be held 개최되다, 열리다

*take - took - taken

*dedication 헌신, 전념

*dedicated 헌신적인 (4월 기출)

*be dedicated to 명사/-ing: ~에 헌신하다

*proposition 제안 = proposal

*make an announcement 발표하다


117. Please _____ photocopies of all relevant documents to this office ten days prior to your performance review date.

a) emerge b) substantiate c) adapt d) submit


답) submit 제출하다 = hand/turn/send in

*Please + 동사원형 (명령문: 4월 기출)

*relevant 관련된

*ten days prior to ~: ~ 10일 전에 (4월 기출) = ten days before ~

*performance review date 업무평가일


118. The auditor's results for the five-year period under study were _____ the accountant's.

a) same b) same as c) the same d) the same as


답) the same as ~와 동일한 = identical to

*be similar to ~와 유사하다

*auditor 회계감사관

*audit 회계감사

*auditing procedures 회계감사 절차

*under study 조사중인

*account 회계사


119. _____ has the marketing environment been more complex and subject to change.

a) Totally b) Negatively c) Decidedly d) Rarely


답) Rarely (좀처럼 ~않다 = seldom)

*부정어 + 동사 + 주어 (도치구문)

*준분정어: (hardly, scarcely, seldom, rarely: 거의 ~않다), (little, few: 거의 없다)

*marketing environment 마케팅 환경

*be subject to change: 변경되기 쉽다


120. All full-time staff are eligible to participate in the revised health plan, which becomes effective the first _____ the month.

a) of b) to c) from d) for


답) of

*the first of the month: 다음 달 1일에

*at the end of the month: 이 달 말에

*full-time staff = regular staff 정규직원들

*part-time staff = temporary staff 임시직원들

*be eligible to 원형: ~할 자격이 있다

*be eligible for 명사: ~에 대한 자격이 있다

*participate in = take part in ~에 참가하다

*revised 변경된

*revision 변경

*revise 변경하다

*become effective = come into effect = take effect 시행되다


121. Contracts must be read _____ before they are signed.

a) thoroughness b) more thorough c) thorough d) thoroughly


- thoroughly (철저하게): 동사 수식 부사

*contract 계약서

*must be read : must read 의 수동태


122. Passengers should allow for _____ travel time to the airport in rush hour traffic.

a) addition b) additive c) additionally d) additional


- additional (추가적인): 명사 수식 형용사 = extra, another

*allow for = consider = take into account/consideration 고려하다

*rush hour 출퇴근시간

*additive 첨가제

*addition 추가

*in addition to = besides = as well as ~뿐만 아니라


123. This fiscal year, the engineering team has worked well together on all phases of project _____.

a) development b) developed c) develops d) developer


- development : 개발 (전치사 뒤 명사)

*fiscal year 회계연도

*work on ~에 종사하다

*project development 프로젝트 개발

*all phases of ~: 모든 단계의 ~


124. Mr. Dupont had no _____ how long it would take to drive downtown.

a) knowledge b) thought c) idea d) willingness


- idea : 숙어 (have no idea = don't know)

*had no idea = didn't know

*take (시간이) 걸리다

*be willing to do: 기꺼이 ~하다

*be unwilling to do = be reluctant to do 마지못해 ~하다


125. Small-company stocks usually benefit _____ the so-called January effect that causes the price of these stocks to rise between November and January.

a) unless b) from c) to d) since


- from

*benefit from ~로부터 이익을 얻다

*stocks = shares 주식

*securities 유가증권 (주식, 채권)

*stockholder = shareholder 주주

*stock/share market 주식시장

*so-called 이른바

*effect 효과

*cause + 목적어 + to do

*rise 오르다 = go up = increase

*between A and B: A와 B 사이에


126. It has been suggested that employees _____ to work in their current positions until the quarterly review is finished.

a) continuity b) continue c) continuing d) continuous


- continue (that 절에 동사가 없다)

*It has been suggested that ~ = They have suggested that ~

*suggest/ask/request/require/recommend that 주어 + 원형

*continue to do = continue ~ing 계속 ~하다

*current 현재의

*currency 통화

*quarterly review 분기별 평가

*until (시간 부사절): 미래 대신 현재 시제


127. It is admirable that Ms. Jin wishes to handle all transactions by _____, but it might be better if several people shared the responsibility.

a) she b) herself c) her d) hers


- herself

*by oneself = alone; without help (홀로, 도움 없이)

*admirable 감탄할만한

*transaction 거래, 업무

*it might be better if several people shared ~: 가정법 과거 (현재사실의 반대)

*several + 복수명사

*share 함께 나누다, 공유하다

*responsibility 책임, 의무 = duty, obligation


128. This new highway construction project will help the company _____.

a) diversify b) clarify c) intensify d) modify


- diversify (사업을 다양화하다)

*construction 공사

*under construction 공사중

*help + 목적어 + (to) 원형

*diversify 다양화하다

*diverse 다양한 (3월 기출)

*clarify 명확하게 하다

*intensify 강화시키다

*modify 수정하다


129. Ms. Patel has handed in an _____ business plan to the director.

a) anxious b) evident c) eager d) outstanding


- outstanding 뛰어난, 훌륭한 (remarkable)

*hand in = send/turn/give in 제출하다 = submit

*director 이사

*be anxious to do = be eager to do ~하기를 갈망하다 = long to do


130. Recent changes in heating oil costs have affected _____ production of furniture.

a) local b) locality c) locally d) location


- local (명사 앞 형용사)

*recent 최근의

*heating oil costs 난방용 기름 값

*affect = influence = impact = have an influence/effect/impact on ~에 영향을 미치다

*production 생산, 생산량

*productivity 생산성

*location 위치

*work location 근무지


131. That is the position for _____ Mr. Kaslov has applied, but a final decision has not yet been made.

a) which b) whom c) that d) what


- which (선행사가 position)

*That is the position. Mr. Kaslov has applied for it.

*apply for ~에 지원하다

*position 직책

*applicant 지원자

*application (form) 지원서, 신청서

*final decision 최종 결정

*make a decision 결정하다


132. Any unsatisfactory item must be returned within 30 days and _____ by the original receipt from this store.

a) altered b) adjusted c) accepted d) accompanied


- accompanied (be accompanied by ~: ~를 첨부하다)

*unsatisfactory 불만족스런

*item 물품, 품목; 항목

*must be returned < must return 의 수동태

*return 반품/반납하다

*within 30 days: 30일 이내에 (4월 기출)

*original receipt 영수증 원본

*alter = change 변경하다 = revise

*adjust 조절하다

*accept 받아들이다


133. A list of telephone _____ that will be out of service while the new communications system is installed is available from the main office.

a) extensions b) extending c) extended d) extends


- extensions (구내전화, 내선)

*A list of ~ is available ~. 주어는 a list, 동사는 is

*out of service 사용하지 못하는

*communications system 통신 시스템

*install 설치하다

*available 이용할 수 있는 = obtainable

*unavailable 이용할 수 없는

*extend 연장하다, 뻗다


134. Please _____ your flight number at least 24 hours in advance.

a) confirm b) concur c) conduct d) concord


- confirm 확인하다

*Please + 동사원형

*in advance 미리, 사전에 = beforehand

*concur with: 의견이 일치하다, 동시에 발생하다

*conduct 지휘하다, 수행하다

*concord 의견의 일치


135. The first year's sales of the new calculator were so _____ that the firm decided to withdraw it from the market.

a) discouragement b) discourage c) discouraging d) discouraged


- discouraging (실망스런)

*사람 + discouraged, surprised, disappointed, interested, excited, impressed, satisfied

*사물 + discouraging, surprising, disappointing, interesting, exciting, impressive, satisfactory

*sales 판매량

*calculator 계산기

*so 형/부 that ~ (결과 구문)

*withdraw 회수하다 = retrieve, retract


136. From an investor's viewpoint, getting _____ advice is the key to making sound investment decisions.

a) unjudged b) unbiased c) inanimated d) impatient


- unbiased (편견 없는)

*investor 투자가

*viewpoint 견해

*the key to ~: ~에 대한 열쇠

*sound investment decisions 확실한/건실한 투자 결정

*make a decision 결정하다

*impatient 참을성 없는

*inanimate 생기가 없는


137. Staff members are reminded that professional _____ is a daily requirement of the company.

a) attire b) ambivalence c) assembly d) approach


- attire 복장

*apparel, attire, clothing > 불가산명사

*staff members 직원들

*A is reminded that ~: A에게 ~를 알리다

*professional attire 전문가다운 복장

*requirement 요구사항


138. Ms. Lee did _____ good work on that project that she was quickly offered a promotion.

a) too b) such c) so d) much


- such

*such (a/an) 형 + 명 that ~

*so 형/부 that ~

*so many/much/little/few 명 that ~

*be offered a promotion 승진 제의를 받다

*be/get promoted = get a promotion 승진하다


139. We have approached the proposal with a good deal of _____ since some of the ideas put forward are very unconventional.

a) cautioned b) caution c) cautious d) cautiously


- caution (전치사 뒤 명사)

*approach ~에 접근하다 (X approach to)

*proposal 제안서

*with (a good deal of) caution = cautiously 주의해서, 신중하게 = with care = carefully

*since ~ = as, because (이유)

*ideas (which were) put forward

*put forward 제시하다, 제안하다

*unconventional = not conventional = liberal 자유로운


140. _____ higher ticket prices this year, attendance at area theaters remains above average.

a) Even though b) Nevertheless c) In spite of d) Consequently


- In spite of (~에도 불구하고: 전치사)

*in spite of, despite (전치사) + 명사/-ing

*though, although, even if, even though (접속사) + 주어 + 동사

*price, cost, salary, wages : high/low로 수식

*attendance 관객수 = occupancy

*area theater = local theater

*above average 평균 이상의 ↔ below average

*on average 평균적으로

*nevertheless 하지만 (부사)

*consequently 따라서 (부사)



실전테스트 1

파트 6


141. The Pinebrook Inn has a courtesy bus which runs every thirty minutes both (to from) the downtown area.


- to from > to and from (and 탈락)

*inn 여관

*courtesy bus 손님용 버스

*courtesy card 우대 카드

*run 운행하다

*every thirty minutes 30분마다

*every hour on the hour 매시간 정각마다

*both A and B = not only A but also B = B as well as A


142. We (appreciate it) your interest in our company and look forward to hearing from you soon.


- appreciate it > appreciate (목적어의 중복)

*appreciate ~에 감사하다

*I'd appreciate it if 주어 + 동사

*interest in ~에 대한 관심

*look forward to 명/-ing: ~를 고대하다

*hear from ~로부터 소식을 받다

*hear of ~에 대한 소문을 듣다


143. In the event (for) any changes need to be made in the document, please call our office immediately.


- for > that

*in the event of 명: ~할 경우에는

*in the event that 주어 + 동사

*make changes 변경하다

*immediately 즉시 = at once


144. Each banking transaction (were handled) quickly and efficiently by well-trained tellers.


- were handled > was handled

*each, every : 단수동사

*banking transaction 은행 업무/거래

*handle 처리하다 = deal with

*efficiently 효율적으로

*well-trained 교육받은

*teller 금전출납원


145. We recommend that you follow the (formatted) shown in this sample when preparing announcements to be displayed on the bulletin board.


○ formatted → format (관사 뒤에는 명사)

*recommend/ask/request/require that 주어 + 원형

*(which is) shown ~

*show - showed - shown/showed

*when (you are) preparing ~

*announcement 안내문

*to be displayed 게시될 (수동태 부정사)

*bulletin board 게시판


146. Bennett International has decided to expand its borrowing to make up (with) a decline in investment returns.


○ with → for

*make up for = compensate for ~를 보충하다

*make up with 사람: ~와 화해하다

*expand 확장하다

*borrowing 대출

*a decline/drop/decrease in ~: ~의 감소

*investment returns 투자 수익


147. Ms. Rivera is going to write (to manager) to complain about the poor service she received during her stay at the hotel.


○ to manager → to the manager (특정인)

*manager 지배인, 관리자

*complain about/of ~: ~에 대해 불평하다

*complain that 주어 + 동사

*stay 머무는 기간


148. One proposal suggests relocating the central offices (at) the suburbs to obtain needed space.


○ at → to (relocate A to B)

*proposal 제안서

*suggest ~ing: 제안하다

*relocate A to B: A를 B로 이전하다 = move A to B

*suburbs 교외

*obtain 얻다

*needed space 필요한 공간


149. Consumers are usually willing to buy more of an item as its price falls (because of) they want to save money.


- because of > because (주어 + 동사 앞에는 접속사)

*consumer 소비자

*be willing to do: 기꺼이 ~하다

*be unwilling/reluctant to do: ~하기를 꺼리다

*item 물품, 항목

*as = when ~할 때 (접속사)

*fall = drop = go down = decrease = decline (가격이) 떨어지다

*전치사 + 명사/-ing: because of/ despite/ in spite of/ during/ without/ prior to

*접속사 + 주어 + 동사: because/ though/ although/ even if/ even though/ while/ before

*전치사/접속사 공통: before/after, until, since (-이래로)

*save money 돈을 절약하다


150. Substantial penalties (will be charging) whenever a customer withdraws funds from this account prior to the maturity date.


- will be charging > will be charged (수동태)

*substantial = significant = considerable 상당한

*penalty 벌금

*will be charged 부과될 것이다 (주어는 charge의 목적어, 고로 수동태)

*whenever = every time ~할 때마다 (접속사)

*customer 고객 = client

*withdraw 인출하다; 취소하다

*fund 기금, 자금

*account 계좌

*prior to ~전에

*maturity date 만기일


151. We have taken special (caring) to see that the merchandise has been packed according to your instructions.


- caring > care (형용사 뒤 명사)

*take care 주의하다

*caring 자상한 (형용사)

*see that = see to it that: ~하도록 유의하다

*merchandise 상품 (불가산명사)

*pack 포장하다

*unpack 포장을 풀다

*according to: ~에 따라

*instruction 지시사항


152. For a list of books available through the library system, (consultation) the computer terminal near the reference desk.


- consultation > consult (명령문; 동사가 있어야 한다)

*available 이용할 수 있는, 구할 수 있는

*consult ~를 참조하다

*terminal 단말기

*reference desk 조회 데스크


153. Mr. Webber (was taken surprise) when he was told the building he was working on had a severe structural flaw.


- was taken surprise > was taken by surprise (숙어)

*be taken by surprise = be surprised 놀라다

*take ~ by surprise: ~를 기습하다, 놀라게 하다

*the building (which) he worked on

*severe = serious 심각한

*structural flaw 구조적인 결함


154. At our company meeting the marketing analyst reported that we have too (much) sales representatives in Europe these days.


- much > many

*數: numerous, a number of, many, several, a few, few

*量: much, a great deal of, a little, little

*數/量공통: all, no, some, any, enough, a lot of, lots of, plenty of

*marketing analyst 마케팅 분석가

*analysis 분석

*analyze 분석하다

*sales representative 판매대리점, 영업사원

*these days 요즈음


155. All passengers must present their boarding passes to the (designate) agent at the airport gate.


- designate > designated (명사 앞 형용사)

*present 제시하다

*boarding pass 탑승권

*designated 지정된

*agent 직원

*at the airport gate 공항 정문에


156. (Without) we receive a definite commitment by the end of the month, we will be forced to reconsider our original proposal.


- Without > Unless (ꡒ주어 + 동사ꡓ 앞에는 접속사)

*unless = if ~ not: ~하지 않는다면

*definite 명확한

*commitment 약속

*by the end of the month 이 달 말까지

*at the end of the month 이 달 말에

(x) on the end of the month

*be forced to do = be compelled/obliged to do = can't help -ing = can't but do ~하지 않을 수 없다

*reconsider 재고하다

*original proposal 제안서 원본


157. The governor's panel of experts reported that supervisors should continue to review (safety standard) on a regular basis.


- safety standard > safety standards (가산명사)

*governor 주지사

*panel of experts 전문가 위원단

*supervisor 감독관, 관리자

*review 검토하다

*safety standards 안전 기준

*on a regular basis 정기적으로 = regularly

*on a daily basis 매일 = daily


158. For each workshop, you must register and pay prior to the date on which the conference (begin).


- begin > begins (수의 일치)

*register 등록하다

*prior to ~전에 = before

*the date on which = the date when

*conference 회의 = meeting, workshop, session, course


159. Francesca Rosati (is perfect) candidate for the position because of her experience in administration.


- is perfect > is a perfect (가산명사)

*a perfect candidate for the position 그 직책에 맞는 후보

*because of + 명사

*because + 주어 + 동사

*experience in administration 관리직 경력


160. Travel club application forms (can find) in front of the main desk in the hotel lobby.


- can find > can be found (수동태)

*application form 신청서, 지원서

*main desk = front desk = reception 접수처



실전테스트 2

파트 5


101. Private financing can _____ a variety of forms.

a) do b) take c) make d) occur


- take

*take forms 형태를 취하다

*private financing 개인 융자

*a variety of = various = diverse 다양한


102. It is one of the most _____ books on the topic.

a) interests b) interested c) interesting d) interest


- interesting

*one of the 최상급 + 복수명사

*He is intersting.

*He is interested in music.

*The movie was interesting.

*The movie was interested. (x)

*on the topic 그 주제에 관한


103. The corporate headquarters are located in the capital _____ the country.

a) in b) to c) for d) of


- of

*the capital of the country 그 나라의 수도 (소속의 of)

*the corporate headquarters 그 회사의 본사

*be located at/in ~에 위치하다


104. The satellite photographed a _____ moon in orbit around Saturn.

a) previous undetecting b) previously undetecting

c) previous undetected d) previously undetected


- previously undetected

*관사 + 부사 + 형용사 + 명사

*satellite 위성

*prevously 전에

*undetected 발견되지 않은

*in orbit 궤도상에 있는

*Saturn 토성

*Mercuty 수성, Venus 금성, Earth 지구, Mars 화성, Jupiter 목성, Saturn 토성, Uranus 천왕성, Neptune 해왕성, Pluto 명왕성


105. The trend toward shorter working hours _____.

a) continuation b) continues c) continually d) continuous


- continues (동사가 필요함)

*trend toward ~로 향하는 경향, 동향

*working hours 근무 시간


106. Inflation is _____ to affect personal spending quite a bit in July.

a) likely b) aptly c) depending d) presuming


- likely

*be likely to do: ~할 것 같다 = be apt/liable to do = have a tendency to do = tend to do

*affect ~에 영향을 미치다 = have an effect on

*personal spending 개인 소비

*quite a bit 상당히


107. Mrs. Kawabata is ready to see you now. Thank you for _____.

a) wait b) waiting c) waited d) to wait


- waiting (전치사 + -ing)

*be ready to do: ~할 준비가 되어 있다


108. Executives of small companies earn _____ salaries on the west coast than on the east coast.

a) more b) taller c) richer d) higher


- higher

*money - much, little

*salary, wages, price - high, low

*executive 중역

*earn a salary

*earn wages

*비교급 + than


109. You need about forty different nutrients to stay _____.

a) health b) healthy c) healthily d) healthiness


- healthy

*remain/stay/seem/appear + 형용사 보어

*nutrient 영양소

*stay healthy = stay in shape = stay fit 건강을 유지하다


110. The ceiling fans were on, but unfortunately they only _____ the hot, humid air.

a) stirred up b) poured through c) turned into d) cut back


- stirred up

*ceiling fan 천장 선풍기

*stir up 일으키다, 휘젓다

*humid 습도가 높은


111. Quarterly earnings are _____ reported to the shareholders.

a) ever b) rare c) seldom d) unusually


- seldom (부사)

*quarterly earnings 분기별 수익

*seldom = rarely 좀처럼 ~ 않다

*shareholder = stockholder 주주


112. Unfortunately, there are _____ will probably not respect the arbiter's decision.

a) of whom b) whoever c) which d) those who


- those who (관계대명사)

*those who ~하는 사람들

*arbiter 중재인


113. Dance is the subject of _____ movies playing over the holiday season.

a) none b) any c) hardly d) several


- several

*數: many, numerous, several, a few, few + 복수

*量: much, a little, little + 단수

*數量 공통: all, no, some/any, enough, plenty of, lots of, a lot of

*subject 주제

*over the holiday season 휴일동안


114. It is worth examining the _____ nations can take to facilitate the removal of trade barriers.

a) stages b) levels c) steps d) grades


- steps

*be worth ~ing: ~할 가치가 있다

*take steps/measures/actions 조치를 취하다

*facilitate 용이하게 하다

*removal 제거

*remove = get rid of = eliminate 제거하다

*trade barriers 무역 장벽


115. I _____ a heavy workload this month.

a) to have b) have c) am having d) having


- have

*a heavy workload 많은 업무량

*지각/인식/계속/상태/소유 동사는 진행형 불가


116. Today many managers reward only good performers and tend to dismiss _____ employees more frequently.

a) incompetent b) inevitable c) incisive d) intact


- incompetent

*reward 보상하다

*good performers 실적이 우수한 자

*tend to do = be likely/apt/liable to do ~하는 경향이 있다

*dismiss = lay off = sack = fire 해고하다

*frequently 빈번하게


117. The work orders have been _____ to the production department.

a) released b) reduced c) remarked d) resisted


- released

*work orders 작업 공정

*release 발표하다

*have been released 현재완료수동태


118. Automobiles are put _____ of gear by moving the gearshidt to neutral.

a) across b) off c) above d) out


- out

*put ~ out of gear 기어를 풀다

*put ~ in gear 기어를 넣다

*gearshift 변속레버

*neutral 중립


119. This identification card is valid as long as your policy remains in _____.

a) check b) effect c) power d) payment


- effect

*valid 유효한 = in effect

*policy 보험증서

*as long as: 1) while 2) if


120. Mr. Kekkonen accused Boris of _____ when he handed in his report a week late.

a) professing b) proliferating c) profiling d) procrastinating


- procrastinating

*accuse A of B = blame A for B = charge A with B: B 때문에 A를 비난하다

*hand in = turn in = send in = submit 제출하다

*procrastinate 지체하다


121. From the turn of the century, concern for wildlife _____ to numerous international conservation program.

a) lead b) leads c) has led d) is leading


- has led

*from the turn od the century 21세기초부터

*concern 관심, 우려

*wildlife 야생생물

*lead to = result in 결과: ~에 이르다

*numerous 수많은

*conservation 보존, 보호


122. When corporations decide to buy life insurance for their executives, the various plans should be _____ like any other financial commitment.

a) evaluated b) estimated c) contributed d) acquainted


- evaluated

*life insurance 생명보험

*executive 중역, 간부

*various = diverse = a variety of 다양한

*evaluate 평가하다

*commitment 의무, 약속


123. To vacation at that mountain resort, you must make reservations two or three months _____.

a) first b) beforehand c) advanced d) forward


- beforehand

*beforehand = in advance 미리, 사전에

*vacation 휴가를 보내다

*make a reservation 예약하다


124. Information listed in this timetable is subject to change without _____.

a) observation b) stress c) presentation d) notice


- notice

*timetable 시간표

*be subject to 명사

*be subject to change 변경되기 쉽다

*without notice 예고 없이


125. Practically _____ in the group passed up the opportunity to attend the computer skills seminar.

a) each one b) anyone c) someone d) no one


- no one

*pass up 놓치다 (miss)

*practically 사실상

*문맥상 no one (사실상 아무도 ~ 하지 않았다)


126. The human heart is wider at the top _____ at the bottom.

a) but b) from c) than d) as


- than

*비교급 ~ than

*as 원급 as ~


127. Mrs. Baker gave a short speech after lunch to express her _____ for the retirement gift.

a) appeasement b) applause c) apportionment d) appreciation


- appreciation 감사

*retirement 은퇴

*give/make/deliver a speech 연설하다

*express 표현하다


128. After four years in domestic sales, Mr. LeConte _____ was able to transfer to the international division.

a) finally b) following c) conclusively d) in ending


- finally

*domestic sales 국내영업부

*finally = at last = in the end = eventually = in the long run 결국

*transfer to ~로 전근가다

*international division 국제부


129. In this company there has been little _____ for the needs of part-time workers.

a) favor b) regard c) reception d) manners


- b

*regard for ~에 대한 관심

*little 거의 없다


130. Economic experts believe there will be a gradual _____ in October.

a) slowdown b) rundown c) closedown d) countdown


- a

*economic expert 경제 전문가

*gradual 점차적인

*경기침체: slowdown, recession, slump, decline, downturn

*closedown 공장 폐쇄


131. Coral, popular for necklaces, _____ made of tiny sea animals.

a) and b) which c) is d) it


- c (본동사 자리)

*coral 산호

*(which is) popular for

*necklace 목걸이

*be made of ~로 만들어진다

*tiny = very small


132. One of the major responsibilities for this position is to approve proposals and to _____ their implementation.

a) override b) oversee c) overbear d) overcome


- b

*responsibility 책임, 의무 = duty, obligation

*approve 승인하다

*proposal 제안서 = suggestion, plan

*oversee 감독하다 = supervise

*implementation 이행, 실행

*implement 실행하다


133. Participation in the saving plan is _____, but often reaches ninety percent.

a) voluntary b) volunteer c) voluntarily d) volunteering


- a

*participation 참가

*saving plan 저축 계획

*be/become/remain/seem/stay + 형용사

*voluntary 자발적인

*volunteer 자원봉사자


134. I am surprised they moved your office next to _____.

a) mine b) my c) I d) myself


- a

*I - my - me - mine - myself

*next to ~옆에

*mine = my office


135. The comptroller has _____ that in ten years the space used by the research department will have to double.

a) premeditated b) prepared c) preceded d) predicted


- d

*comptroller 감사관

*in ten years 10년 후에

*predict that ~: 예상하다

*double 두배가 되다


136. For the new museum visitor _____ for the veteran museum goer, the Museum Highlights Tour offers an excellent opportunity to see the most popular exhibits.

a) too b) in addition to c) as well as d) further


- c

*B as well as A = not only A but also B = both A and B

*veteran 숙련된 = experienced

*opportunity to do: ~할 기회

*exhibit 전시품; 전시하다

*exhibition 전시회


137. _____ in local bus service have brought increased business to the area.

a) Lifts b) Progressions c) Improvements d) Elevations


- c

*improvements 개선, 향상

*local 현지의


138. The recession is not expected to _____ until year's end.

a) abandon b) abduct c) abate d) abdicate


- c

*recession = slump = downturn = decline = slowdown 경기후퇴

*be expected to do ~할 것으로 예상되다

*abate = decrease 감소하다


139. The bank invites you to keep your securities safe in our vault _____ strict audit controls.

a) herein b) inside c) beneath d) under


- d

*invite 목 to do: 권유하다

*securities 유가증권

*vault 금고실

*under strict audit controls 엄격한 감사통제하에 있는


140. Before _____ a particular distribution strategy, a segment of the market should be tested.

a) influencing b) adopting c) engaging d) founding


- b

*adopt 채택하다

*particular 특정한

*distribution strategy 판매/유통 전략

*segment 부분 = part




실전테스트 2

파트 6


141. The corporation adopted (his) present name in 1981.


*his > its (대명사의 일치)

*adopt 채택하다

*adapt 적응하다

*present 현재의 = current


142. That client is used to receiving (promptly) attention.


*promptly > prompt (명사 앞 형용사)

*prompt 신속한

*promptly 즉시

*client 고객

*be used to 명/-ing = be accustomed to 명/-ing: ~에 익숙하다

*used to do: ~하곤 했다

*be used to do: ~하기 위해 사용되다 (수동태)

*attention 주의, 관심


143. Twenty-four banks (they have agreed) on a formula to refinance 1.6 billion of the country's short-term foreign debt.


*they have agreed > have agreed (주어의 중복)

*agree on ~에 대해 합의하다

*formula = solution 해결책

*refinance 상환하다

*foreign debt 외채


144. (Almost) students were able to find good jobs three to six months after graduation.


*Almost > Most

*대부분의 학생들: Almost all the students = Most students = Most of the students

*graduation 졸업


145. We are waiving the entrance fees for the duration of registration, which (run) until the end of August.


*run > runs

(선행사가 duration, 단수)

*waive 보류하다

*entrance fee 입장료

*for the duration of = during

*run 지속되다


146. A flurry of promising economic news (in last) ten days has caused analysts to revise their forecasts for the stock's growth.


*in last > in the last

(지난 ~동안)

cf. 앞으로 10일 동안: over the next ten days

*a flurry of 쇄도하는

*promising news 유망한 소식

*analyst 분석가

*revise 수정하다

*forecast 전망


147. Local government workers in this state generally are underpaid relative to their counterparts in (another) industrialized states.


*another > other

(other + 복수, another + 단수)

*local government worker 지방공무원

*underpaid 박봉의

*relative to ~에 비해서 = compared with = in comparison with

*counterparts = local government workers

*industrialized 산업화된 = advanced


148. Due to the popularity of the stars, theater patrons are advised to contact the box office as soon as (possibly).


*possibly > possible

(as soon as possible 가능한 한 빨리)

*due to 명 = because of 명

*popularity 인기

*patron 후원자, 고객

*box office 매표소


149. The passport is a traveler's primary (meaning) of identification abroad.


*meaning > means

*primary = first

*meaning 의미

*means 수단

*identification 신분증

*abroad = overseas


150. The format in which the data is presented in this research paper shows how efficient Miss Cho (does).


*does > is

(efficient를 보어로 받는 2형식동사 필요)

*format = system

*present 제시하다

*research paper 연구 논문

*efficient = competent 능력 있는; 효율적인


151. The (amount material) published on the general topic has tripled since March.


*amount material > amount of material

(자료의 양)

*material = data

*(which is) published ~

*on ~에 관하여

*general topic 일반적인 주제

*triple 3배가 되다

*double 2배가 되다

*현재완료 + since + 과거


152. A video telephone enabling two people to talk to and (watching) each other has been patented by two inventors.


*watching > to watch

(병렬구문: A and B, A or B)

*enable A to do: 가능하게 하다

*patent 특허를 얻다

*inventor 발명가


153. The strike began unexpectedly, just (slightly only) more than a week after the national elections.


*slightly only > slightly (의미 중복)

*strike 파업

*go on strike 파업을 하다

*unexpectedly = suddenly = all of a sudden


154. (Informations) about the meetings can be obtained by calling the Berlin Chamber of Commerce.


*Informations > Information (불가산명사)

*can be obtained = is obtainable = is available

*by ~ing: ~함으로써

*Chamber of Commerce 상공회의소


155. Export law (it became) a key factor in international trade.


*it became > became (주어의 중복)

*key = important

*factor 요소

*international trade 국제 교역


156. Before playing tennis, Simon had to get his (hairs) cut.


*hairs > hair (불가산명사)

*get one's hair cut: 이발하다


157. The machine's different typing elements have been carefully designed to provide outstanding (durable).


*durable > durability (형용사 + 명사)

*typing element 인쇄활자

*outstanding 뛰어난; 미해결된

*durable 내구성 있는

*durability 내구성


158. There have been (much) disputes over the proper way to train child actors.


*much > many

*수: many, numerous, several, a few, few

*양: much, a little, little

*dispute 논쟁


159. A slow-moving area of low (press) will continue to spread cloudiness and showers across the metropolitan area tonight.


*press > pressure

*low pressure 저기압

*spread - spread - spread 퍼뜨리다

*metropolitan area 수도권 지역


160. The recording industry is in the midst of change, (either) creatively and financially.


*either > both

*상관접속사: both A and B, either A or B, neither A nor B, not only A but also B, B as well as A, whether A or B

*in the midst of = in the middle of

*creatively 창작 면에서

*financially 재정적으로




본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 9. 17. 22:37, study/programming]

/*
#include <Stdio.h>
int main(void)
{
 int invalid_operator = 0;
 char operator;
 float number1,number2,result;

 printf("두 수를 다음과 같은 형태로 입력하세요.\n");
 printf("연산자는 네 가지(+,-,*,/)중의 하나여야 합니다.\n");
 printf("number1 연산자 number2\n");
 scanf("%f %c %f", &number1,&operator, &number2);
 
 switch(operator){
 case '*' :
  result =number1*number2;
  break;
    case '/' :
  result = number1 / number2;
  break;
 case '+' :
  result = number1 + number2;
  break;
 case '-' :
  result = number1 - number2;
  break;
 default :
  invalid_operator = 1;

 }

 switch(invalid_operator){
 case 1: printf("연산자가 잘못 입력되었습니다.\n");
  break;
 default :
  printf("\n>>>>>>>>>>>결과는\n");
  printf("%5.2f %c %5.2f = %5.2f\n", number1, operator,
   number2,result);
  break;
 }
 return 0;
}
*/
/*
#include <stdio.h>
int main(void){
 int d=3;
 switch(d) {
 case 3 :printf("소수입니다.");
 case 4 :printf("zzzz");
 }


 return 0;
}

  */
/*
#include <stdio.h>

int main(void){
 int i;
 for(i=0; i<5; i=i+1){
  printf("*****\n");
 
 }
}
*/
/*
#include <stdio.h>

int main (void)
{
       int i,j,n=11;
       for(i=0;i<n;i++)
       {
            for(j=0;j<i;j++)
           {
               printf("%d",j);
            }
         printf("\n");
       }
 
       return 0;
}
*/
/*
#include <stdio.h>

int main(void)
{
int a,i,b=0;
printf("몇번째 줄까지 *를 출력할까요");
scanf("%d",&a);
for(b; b<a;b++)
{
for(i=0;i<=b;i++)

printf("*");
printf("\n");
}

}
*/
/*
#include < stdio.h >

void main()
{
 int i,j;
 for(i=5; i>0; i--)
 {
  for(j=1; j<=i; j++)
  {
   printf("*");
  }
  printf("\n");
 }
}
*/
/*
#include <stdio.h>

void main()
{
int i, j, a[5][2] = {
{4,3},
{6,4},
{4,5},
{7,8},
{7,5}
};

int b[2][5]; // 행렬 b 새로 지정

for(i=0; i<2 ; i++){ // 행렬b 초기화
for(j=0; j<5; j++){
b[i][j]=0;
}
printf("\n");
}


printf("원래의 행렬\n \n");
for (i=0; i< 5; i++) {
for(j=0; j< 2; j++){
printf(" %d ", a[i][j]);
}
printf(" \n");
}
printf(" \n");


printf("전치 행렬\n");

for (i=0; i< 5; i++){ // a를 b에 행과 열을 바꿔서 넣음
for(j=0; j< 2; j++){
b[j][i]=a[i][j];
}
}

printf("\n");

for(i=0; i<2 ; i++){
for(j=0; j<5; j++){
printf("%d ",b[i][j]);
}
printf("\n");
}

printf("\n");
}
*/

#include <stdio.h>
#define LIMIT 10

int main(void){
 int mult=1,i=0;

 mult=1*2*3*4*5*6*7*8*9*10;
 printf("반복문을 이용하지 않고 :\n");
 printf("1에서 10까지의 곱은 %d입니다.\n",mult);

 mult=1;
 
 for(i=1;i<=LIMIT;i++){
  mult *= i;
 }
 printf("for 반복문을 이용 :\n");
 printf("1에서 10까지의 곱은 %d입니다. \n", mult);

 i=1;
 mult =1;
 while(i<=LIMIT){
  mult *= i;
  i++;
 }
 printf("while 반복문을 이용:\n");
 printf("1에서 %d까지의 곱은 %d 입니다.\n",LIMIT,mult);

 return 0;
}

'study > programming' 카테고리의 다른 글

07.11.04 정보처리산업기사 합격수기  (0) 2007.11.11
c  (0) 2007.11.10
tcp/ip  (0) 2007.09.13
dd  (0) 2007.09.13
조건if  (0) 2007.09.07


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 9. 13. 18:57, study/programming]

다중 접속 서버 구현방법

1. 프로세스 생성을 통한 멀티태스킹서버

2. SELECT함수에 의한 멀티플렉싱 서버

3. 쓰레드를 기반으로 하는 멀티쓰레딩 서버


1번방법은 10장 11장에서 보았다.

1번요약 :
fork() 로 프로세스 생성
sigaction()으로 자식프로세스 종료 확인
pipe()로 프로세스간 통신

12장은 2번방법.


1번과 2번 방법의 차이는 다음과 같다.


 
 
 
서버는 주기적으로 데이터를 전송해오는 클라이언트가 있는지 확인을 하다가, 발견한 경우, 그 클라이언트로부터 데이터를 수신한다
 
이를위해 select함수가 사용된다.
 
int select(검사대상갯수,수신검사소켓,송신검사소켓,예외,타임아웃);
-검사대상갯수는 윈도우에선 의미없음.
-select함수 호출후 변화가 생긴 소켓을 제외하고 모두 0으로 초기화된다.(따라서 0이 아닌소켓이 변화가 생긴 소켓)
-select함수 호출후 시간은 타임아웃은 타임아웃까지 남은시간으로 재설정된다.
-리턴값 : 0 : 타임아웃 , -1 : 오류 , 0보다큰값 : 변화가 있는 소켓수.
 
함께쓰이는 함수
FD_ZERO(fd_set* fdset)
FD_SET(int fd, fd_set* fdset)
FD_ISSET(int fd, fd_set* fdset)
 
 
예:
 
//두개의 소켓이 있다고 가정.
hServerSocket = socket(PF_INET,SOCK_STREAM,0);
 
hClntSocket = accept(hServerSocket,(SOCKADDR*)&clntAddr,&clntLen);
 
//변수선언
fd_set reads,temps;
 
FD_ZERO(&reads);                     //reads변수 초기화
FD_SET(hServerSocket,&reads);  //hServerSock에 변화가 있는지 관찰하겠다.
 
 
while(1)
{
                temps = reads;            //select호출후 0으로 초기화 되므로 이렇게 해주어야 한다.
                timeout.tv_sec = 5;     //select호출후 남은시간으로 변경되므로 이렇게 해주어야 한다.
                timeout.tv_usec = 0;;
 
                select(0,&temps,0,0,&timeout);    //temps에 수신데이타가 있는지 관찰하겠다.
 
                if(FD_ISSET(hServerSock,&temps))
                {
                          //hServerSock에 연결요청이 들어왔다
                }
                else
                {
                        //아닌경우 처리......
                }
}
 
 
 
 
요약 :
FD_SET으로 관찰할 소켓을 지정한 다음
select()로 지정한 소켓들을 관찰하고
FD_ISSET으로 관찰하는 소켓에 변화가 있는지 확인한다.
 
 
활용 :
에코서버를 수정하여 여러개의 클라이언트가 접속할수 있도록 처리할 수 있다.
1. 클라이언트가 접속할때마다  fd_set에 추가
2. 클라이언트가 접속을 끊을때마다 fd_set에서 삭제
2. select로 체크한후
3. 변화가 생긴 소켓에 에코한다.
 
 
hServSock = socket(PF_INET,SOCK_STREAM,0);
 

//fd_set설정

FD_ZERO(&reads);

FD_SET(hServSock,&reads);

 

while(1)

{

             temps = reads;          //select호출후 0으로 초기화 되므로 이렇게 해주어야 한다.

             timeout.tv_sec = 5;   //select호출후 남은시간으로 변경되므로 이렇게 해주어야 한다.

             timeout.tv_usec = 0;

            

             if( select(0,&temps,0,0,&timeout)==SOCKET_ERROR )      //temps에 수신데이타가 있는지 관찰하겠다.

                           ErrorHandling("select() error");

            

             for(arrIndex=0;arrIndex<reads.fd_count;arrIndex++)        //reads.fd_count는 계속 바뀔것이다.

             {                                                                                     

                           if(FD_ISSET(reads.fd_array[arrIndex],&temps))         //변화가 생긴 소켓이 있는가.

                           {

                                        if(reads.fd_array[arrIndex]==hServSock)     //변화가 생긴 소켓이 연결요청인경우

                                        {

                                                     clntLen = sizeof(clntAddr);

                                                     hClntSock = accept(hServSock,(SOCKADDR*)&clntAddr,&clntLen);

 

                                                     FD_SET(hClntSock,&reads);               //연결요청을 받아들이고 fd_set에 추가

                                                     printf("클라이언트 연결 : 소켓핸들 : %d \n",hClntSock);

                                        }

                                        else

                                        {

                                                     strLen = recv(reads.fd_array[arrIndex],message,1024,0);

 

                                                     if(strLen==0)

                                                     {

                                                                  closesocket(temps.fd_array[arrIndex]);

                                                                  printf("클라이언트 종료 : 소켓핸들 : %d\n",reads.fd_array[arrIndex]);

                                                                  FD_CLR(reads.fd_array[arrIndex],&reads);    //연결종료이면 fd_set에서 삭제

                                                     }

                                                     else

                                                     {

                                                                  send(reads.fd_array[arrIndex],message,strLen,0);

                                                     }

                                        }

                           }

             }

 

}

'study > programming' 카테고리의 다른 글

c  (0) 2007.11.10
반복문 9월 17일  (0) 2007.09.17
dd  (0) 2007.09.13
조건if  (0) 2007.09.07
c언어 공부중  (0) 2007.09.07


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 9. 13. 18:55, study/programming]

1. 용어 정의 :


Finder : 검색하고자 하는 파일에 대한 Query를 전송하고, 이 Query에 대한 파일 list를 수신하는 application

           파일 list중 임의의 파일에 대해 파일 내용을 전송받음

           사용자가 필요한 시점에만 실행. GUI 필요


Base : Finder로부터 Query를 전송받아, 이 Query에 해당하는 파일을 특정 폴더에서 찾아 list를 송신하는 application

          파일 list중 전송이 요청된 파일을 송신

          프로세스로서 항시 실행. GUI 불필요



검색 요청 : Finder가 각각의 Base들에게 Query Request ( 멀티캐스트 이용)

검색 응답 : 각각의 Base들이 각자의 특정 폴더에서 검색한 list 내역을 Finder에게 송신(응답)


파일 요청 : Finder가 list의 파일중 하나를 선택함으로써, 특정 Base 그룹에서 파일의 전송을 요청함

파일 전송 : 선택된 파일을 소유하고 있는 Base들이 Finder에게 선택된 파일을 전송




2. 기능 정의  :


Finder :

- 파일 전송시 전송속도, 예상시간, 파일 총 용량, 수신한 용량 표시

- 몇 개의 Base로부터 파일을 수신중인지, 어떤 IP를 가진 Base로부터 수신중인지를 표시

- 리스트 새로 고침

- 이미 같은 이름의 파일이 수신 폴더에 존재할때 '이어받기' or '덮어쓰기' 물어볼 것

- 파일 수신시 수신 받을 폴더를 변경 가능

- '전송 시작' 및 '전송 일시중지', '전송 취소'기능

- '이어받기' 기능 ( '전송 일시중지' 후 '전송 계속'을 선택하면 일시중지 직전의 나눠받기 상황에서 계속 )


Base :

- 지정된 폴더내의 하위 폴더에 존재하는 파일도 전송 가능





3. 제약 사항


- 파일 전송 시작시, 이미 list를 파악 완료한 Base로부터만 수신함

- 파일 전송 시작후에 수신된 list에 대해서는 기존 파일 전송

- 파일 전송중 특정 Base가 어떠한 이유로 '전송 불가' 상태가 되면

  다른 Base로부터 그 공백분을 수신함

- 파일 전송중 특정 Base로부터의 해당부분 전송이 완료되면

  현재 전송중이면서 가장 전송속도가 느린 해당분의 전송속도를 확인하여

  적절한 조건이 만족하면 ( 이 부분 확실히 정의할 것) 그 해당분의 부족분을 대신 전송케 함



--- 아래 사항은 특정 설정 파일을 두어 기록한다.

- 다운로드, 공유 디렉토리

- 업/다운로드 Node수 제한사항




4. 다음 시간까지 숙제

- 책 14-1장 멀티캐스트(Multicast) 공부

- 12장 I/O 멀티플렉싱(Multiplexing) 공부, 정확한 이해

- 우리 p2p 프로젝트에 멀티플렉싱을 적용할 수 있는가..

   그렇다면, 또는 그렇지 않다면 프로세스/쓰레드/소켓을 어떻게 구성해야 하는가..

   그 근거는 무엇인가..


* 12장은 조낸 빡셀 수 있으므로 숙제는 일찍 시작들 하시길....

   화요일 저녁 회의 끝나고 봅시다.

'study > programming' 카테고리의 다른 글

반복문 9월 17일  (0) 2007.09.17
tcp/ip  (0) 2007.09.13
조건if  (0) 2007.09.07
c언어 공부중  (0) 2007.09.07
곱셈 기능을 지니는 함수  (0) 2007.09.07


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 9. 7. 16:19, study/programming]
#include

int main(void)
{
int num1 = 0,num2 = 0;

printf("간단한 정수 두 개를 공백으로 구분하여 입력하세요.\n");
printf("입력>");
scanf("%d %d",&num1,&num2);

if(num1)
if(num2)
printf("16줄:두수 %d과 %d는 모두 0이 아닙니다.\n",num1,num2);
else
printf("18줄: num1 %d는 0이 아니고 ,num2 %d는 0입니다.\n",num1,num2);


if(num1){
if(num2)
printf("28줄 : 두수 %d과 %d는 모두 0이 아닙니다.\n",num1,num2);
} else
printf ("24줄 :num1 %d는 0입니다.\n",num1);


if(num1){
if(num2)
printf("28줄:두수 %d과 %d는 모두 0이 아닙니다.\n",num1,num2);
else
printf("30줄 :num1 %d는 0이 아니고, num2 %d는 0입니다.\n",num1,num2);
}else {
if(num2)
printf("33줄:num1 %d는 0이고 ,num2 %d는 0이 아닙니다.\n",num1,num2);
else
printf("35줄 :두 수 %d과 %d는 모두 0입니다.\n",num1,num2);
}

return 0;
}

if문에후()안에 조건이 오는걸로 아는데
예를들면 (num1>2) 이런식의 조건 말입니다.
그런데 그냥 (num1) 이라는 조건은 어떤수가 입력되던간에 그냥 성립되는 것 압니까? 왜 0과1로 기준이 나누어지는겁니까?
//좋은 질문입니다. 기본적으로 전산 수학이라는 책을 보시면 좀더 이해가 잘 될겁니다. 나중에 전산에 관련된 수학책 보세요.설명 해 드리겠습니다.
if(조건식) 님 말씀대로 if(이안에는 조건식이 들어가게 됩니다)
만약 조건식이 참이 true 이고 거짓이면 false가 됩니다.
그런더 c언어서는 0은 false로 나머지 자연수는 true로 인식 합니다.
if(num1>2) 이식은 num1이 2보다 클 경우에만 참입니다
반면에 if(num1)의 경우 num1이 0이 아닌 다른수가 오면 true로 인식 참이 되게 됩니다. 0이면 false 가 되는거조.

//////////////////////////////////////////////////
#include

int main(void)
{
int num1 = 0,num2 = 0;

printf("간단한 정수 두 개를 공백으로 구분하여 입력하세요.\n");
printf("입력>");
scanf("%d %d",&num1,&num2);
///////////////////////////////////////////////////////////////////
if(num1) 이것은 무슨 뜻이냐면?
만약 if( num1)
num1 = 0 이다면 if문을 실행 하지 않습니다.
num1 !=0 다면 if 문을 실행 합니다.
즉 num1 이 1,2,3 -- 즉 0을 제외한 수가 올경우if 문을 실행 하게 됩니다.
scanf를 통해서 num1 과 num2를 입력 받아서 num1과 num2 가 둘다 0이 아니게 되면 이문장을 수행하고 printf("16줄:두수 %d과 %d는 모두 0이 아닙니다.\n",num1,num2);
하나라도 0이라면 else 문을 수행 하게 되는거조. 대충 아시겠조
////////////////////////////////////////////////////////////////////////

'study > programming' 카테고리의 다른 글

tcp/ip  (0) 2007.09.13
dd  (0) 2007.09.13
c언어 공부중  (0) 2007.09.07
곱셈 기능을 지니는 함수  (0) 2007.09.07
정보처리기사 실기 공부방법  (1) 2007.08.21


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 9. 7. 14:43, study/programming]

/*#include <stdio.h>
#define korea 3.14
int main(void)
{
 typedef int ok;
 ok age;
 printf("나이는?\n");
 scanf("%d",&age);
 printf("--> 입력한 당신의 나이는 %d입니다.\n",age);
 return 0;
}


#include <stdio.h>

int main(void)
{
 printf("\"%s\"\n","대한민국");
 printf("\t\'c' 언어%c \n",'!');
 printf("\a\a\a\a\a \\");

 return 0;
}


#include <stdio.h>
int main(void)
{
int a,b,temp;
scanf("%d %d",&a,&b);
temp=a;
a=b;
b=temp;
printf("a=%d b=%d",a,b);
return 0;
} */
/*
#include <stdio.h>

int main(void){
 int a=30;
 printf("30을 8진수로  %o\n",a);
  return 0;
}
*/
/*
다음의 소스 코드는 에러를 포함하고 있다.
단 "한문자" 만 바꿔서(추가/변경만 가능) 프로그램이 정확히 20개의 '*'기호를 출력하도록 고쳐라  (답은 세가지가 있다)

01 int main()
02 {
03  int i, n=20;
04  for(i=0; i<n; i--)
05   printf("*");
06  return 0;
07 }

04줄에 i--에서 i를 n으로 바꾸는거는 찾앗는데
 

*/
/*
#include <stdio.h>

int main()
 {
 int i, n=20;
 for(i<0; i+n; n--)
 printf("*");
  return 0;
 }
*/
/*
#include <stdio.h>

int main(void)
 {
 int i, n=20;
 for(i=0; -i<n; i--)
 printf("*");
  return 0;
 }
*/
/*
#include <stdio.h>
int main()
 {
  int i, n=20;
  for(i=0; i+n; i--)
  printf("*");
     return 0;
}
*/
#include <stdio.h>

int main(void)
{
 int x=20;
 double y=3.0;
 double a=3.5;
 double b=3.4;

 int ok1=x/(int)y;
 int ok2=x/y;
 double ok3=(int)a+b;

 printf("%d\n",ok1);
 printf("%d\n",ok2);
 printf("%f\n",ok3);

 return 0;

}

9월 7일
/*
문제 1.
  곱셈 기능을 지니는 함수를 하나 구현하고  main함수에서 이를 호출하는 형태로 프로그램을 구성하자.
main함수에서는 사용자로부터 두개의 숫자를 입력받아서 곱셈 결과를 출력에 줘야 한다.
이러한 작업은 사용자가 0 0 을 두개 입력할 때까지 계속되어야한다.
그리고 프로그램이 종료 되면 연산을 몇 번 하였는지도 출력해 줘야한다.
- 실행 예:
두개의 숫자 입력 1 3
연산결과:3
두개의 숫자 입력 3 2
연산결과 6
총 2번 연산하였습니다. */

/*
#include <stdio.h>

int gop(int a,int b);
int main(void)
{
 int x, y;
 printf("두수를입력하시오:");
 scanf("%d %d", &x, &y);
 printf("결과는? %d\n",gop(x, y));
}

int gop(int a,int b)
{
 return a*b;
}


*/

/*
#include <stdio.h>

#define MULT(x,y) ((x)*(y))

int main(void)
{
       int result = 0;        
       result = MULT(10, 20);
       printf("두수의 곱은 %d\n", result);
       return 0;
}
*/
/*
#include <stdio.h>
#define SQ2(x) ((x)*(x))
int main(void){
 int a=3;
 printf("네제곱근은? %d", (SQ2(a))*(SQ2(a)));
 return 0;
}
*/

#include <stdio.h>
#define SQUARE(x) ((x) * (x))  /* 제곱을 하는 매크로함수 정의 */
int main()
{
int result;                    /* 결과값이 들어 갈 변수를 선언한다 */
 result = SQUARE(3);      /* 3의 제곱을 구해서 result에 넣는다 */
   result = SQUARE(result);  /* result의 제곱을 구해서 다시 result에 넣는다 */
 printf("3의 네제곱은 %d입니다\n", result);   /* 결과값 result를 정수 형식으로 화면에 출력한다. */
  return 0;                   /* 프로그램을 끝낸다 */

}



#include <stdio.h>
int main(void)
{
 float grade=0;
 printf("이번학기의 성적은 얼마인가?\n");
 scanf("%f",&grade);
 printf("---> 입력한 당신 성적은 %f 입니다.\n",grade);
 if(grade > 4.3){
  printf(">>>장학금을 받습니다.\n");
  printf(">>>등록금도 면제입니다.\n");
 }
 else if(grade < 2.0)
 {
  printf(">>>퇴학입니다.\n");
 }
 return 0;
}


#include <stdio.h>
int main(void){
 int a,num1,num2;
 printf("두수를입력하세요\n");
 scanf("%d%d",&num1,&num2);
 printf("더하려면 1을 입력하세요");
 scanf("%d",&a);
 if(a == 1){
  printf("1을입력하였습니다");
  printf("두수의 합은 %d입니다",num1+num2);
 }
 else{
  printf("다른 수를 입력하였습니다.");
  printf("두수의 곱은 %d입니다",num1*num2);
 }
 return 0;
}


#include <stdio.h>
int main(void){
 int x=0;
 scanf("%d",&x);
 if(x % 2 == 0){
  printf("짝수입니다");
 }
 else{printf("홀수입니다");
 }
 return 0;
}


#include<stdio.h>

void gu(int a, int b);
int main(void)
{
 int a,b;
 printf("출력할 구구단을 2개입력하시요:");
 scanf("%d %d",&a,&b);
 gu(a,b);
}
void gu(int a, int b)
{
 int i,j,temp=0;
 if(a<b);
  else{
  temp=b;
  b=a;
  a=temp;
 }
 for(i=0;a<=b;a++)
 { 
  i=a;
  for(j=1;j<10;j++)
  {
   printf("%d*%d=%d\n",i,j,i*j);
  }
 }
 
}

'study > programming' 카테고리의 다른 글

tcp/ip  (0) 2007.09.13
dd  (0) 2007.09.13
조건if  (0) 2007.09.07
곱셈 기능을 지니는 함수  (0) 2007.09.07
정보처리기사 실기 공부방법  (1) 2007.08.21


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 9. 7. 12:31, study/programming]

곱셈 기능을 지니는 함수를 하나 구현하고 main 함수에서

이를 호출하는 형태로 프로그램을 구성하자. main 함수에서는

사용자로부터 두 개의 숫자를 입력받아서 곱셈 결과를 출력해 줘야 한다.

이러한 작업은 사용자가 0을 두 개 입력할 때까지 계속되어야 한다.

그리고 프로그램이 종료되면 연산을 몇 번 하였는지도 출력해 줘야 한다.


실행 예:

개의 숫자 입력: 1 3

연산 결과: 3

개의 숫자 입력: 3 2

연산 결과: 6

두 개의 숫자 입력: 12 7

연산 결과: 84

두 개의 숫자 입력: 0 0

총 3번 연산하였습니다.


#include<stdio.h>


int multiplication(int a, int b);


int main(void)
{
      int i=0;
      while(1)
      {
            int val1, val2;
            printf("두 개의 숫자 입력:");
            scanf("%d %d", &val1, &val2);
           

            if(val1==0 && val2==0)
            { 
                 printf("총 %d번 연산하였습니다.\n", i);
                 break;
            }
      

      printf("연산결과 : %d\n", multiplication(val1, val2));
      i++;
      }

     

      return 0;
}
int multiplication(int a, int b)
{
      return a*b;
}

'study > programming' 카테고리의 다른 글

tcp/ip  (0) 2007.09.13
dd  (0) 2007.09.13
조건if  (0) 2007.09.07
c언어 공부중  (0) 2007.09.07
정보처리기사 실기 공부방법  (1) 2007.08.21


본인의 아이피 주소 확인과 위치 추적
[Schizo!, 2007. 8. 21. 17:17, study/programming]

-다음 유수샘 까페에 쓴 글 입니다-


아직 합격자 발표가 난 건 아니지만...

몇번씩 마킹 잘못된 거 없나 확인 했고..점수도 안정권(88점)이고..

미리 감사의 말씀 전합니다...

비전공자이기 때문에.. 필기든 실기든..처음 준비 해보는 것이기에..

불안한 마음에 더 열심히 할 수 있었던 것 같아요.

4월 초부터 필기 준비하며, 또 5월 필기 시험 끝나고 실기 준비하며..

좋은 강의와 말씀 많이 해주셨던 유수샘..

대학 졸업하고 근 6년간 공부란 걸 해보지 않았는데..

오랜만에 하는 공부에서 나름대로 재미를 느끼며 할 수 있었던 건 유수샘 도움이 컸습니다..

이제 공무원 시험을 향해 나아가야 겠지만

공무원 시험은 정보처리기사만큼 재밌게 준비할 순 없을 거 같네요..

까페에 여러 회원분들, 변태오빠님 그리고 유수샘..

그동안 열심히 공부할 수 있게 동기부여 해준 님들이예요..

잊지 않겠습니다..^^



아 공부방법 덧붙입니다..^^

제가 공부한 방법은... 솔직히 좀 무식하게 했습니다..^^;;

벼락치기 노하우는 절대 아니구요..

시나공 책과 유수샘 강의를 병행하며 인터넷에 돌아다니는 구할 수 있는 문제들은 다 구해서
 
풀었습니다. 필기때도 실기때도...

비전공자여서 개념잡기도 힘들고 용어도 어렵고..

그래서 유수샘 강의로 이해를 한 다음 혼자 시나공으로 그날 배운 부분 복습하며 심화학습했습니다.

필기는 최대한 많은 기출문제를 접해보시고..기출이 두번이상 된 내용은 그냥 지나치시면
 
안될 것 같네요..일단 유수샘
1000제강의 들으시면서 기출문제도 접해보시고 개념도

잡으시는 방법 추천합니다..^^



그리그 알고리즘은..

일단 유수샘 강의 들으면서.. 말씀대로 순서도 직접 그려가시면서 해보세요..

순 서도 그리시다가 아, 분기문의 부등호 방향을 바꿔볼까? 부터 수열같은 경우는 초기값을 바꿔본다던지 N과 H의 처리 위치를 바꿔본다든지 아무튼 이런저런 생각 하시면서 생각하신 거 순서도로 직접 그려보세요. 틀린지 맞는지는 디버깅하면서 자기가 깨우쳐가는 거구요..그렇게 하다보면 어느새 알고리즘에 눈이 조금씩 트입니다. 초반엔 그렇게 하는 게 시간이 좀 걸린다 싶겠지만 점점 진도 나갈수록 이해도 빨라지고 가속도가 붙게 되더라구요.

그리고 디버깅은 중요해요. 자신있는 알고리즘이라 해도 막상 시험장 가서 보면 조금은 당황하기 마련입니다. 수열은 수열대로 순위는 순위대로 이차원배열은 이차원 배열대로, 정렬은 정렬대로..5행5열 채우기등은 그 나름대로.. 디버깅은 정해진 규칙이 있는 건 아니기 때문에 변수든 뭐든 자기가 보기 편한대로 다 집어넣고 차근차근 처음부터 값을 따려 맞는지 알아보는 겁니다.

저같은 경우는 정렬되는 배열 자체도 디버깅에 집어넣어 회전시마다 배열이 어떻게 바뀌는지 디버깅 했구요...차근차근 여러번 생각하고 마지막에 디버깅 꼭 한다면 알고리즘은 만점 받을 수 있을거예요^^

또 문제 어렵기로 악명높은 바로가기닷컴문제와 교재로 공부했던게 많이 도움이 됐던 것 같습니다.

왜냐면 여기 문제는 알고리즘 자체에 변수설명이 없습니다..알고리즘을 보며 구조를 파악해 변수의 역할을 추측해내야 하죠.. 제가 기사 실기 공유자료실에 알고리즘 문제들 이란 이름으로 올린 자료가 있는게

그게 거기 알고리즘입니다. 일단 순서도 자체도 난해하고 좀 까다로운 부분이 있으므로

알 고리즘을 어느정도 숙지하신 다음 푸시길 권장하는 바입니다..^^;; 그리고 반정도는 알고리즘 기출관는 거리가 좀 먼 문제들이므로..(스택이라던지..디스크탐색 알고리즘등,,) 그냥 강의에서 다루었던 알고리즘만 푸셔도 충분하실듯 합니다. 그리고 더이상은.. 기출됐던 거라고 해서 지나칠 수 없는 상황이 되어버렸습니다.. 2회 기사 실기에 이미 산업기사에서 기출됐던 삽입정렬 알고리즘이 나왔으므로

이는 충분히 기출됐던 알고리즘도 어떤식으로든 응용이 되서 나올 수 있다는 얘기가 되는 거 같네요..

각 알고리즘 별로 기억 해 두셔야 할 내용 (예를 들면 삽입정렬은 2번째 데이터를 앞의 데이터들과 비교해 나간다던지 순위는 처음에 모든 순위를 1로 한다던지 등등..)들을 잘 기억해 두셔야 할 것 같습니다.

결과 값은 같아도 공단쪽이 요구하는 알고리즘 해법은 기본 개념에 충실한 알고리즘 같습니다..



그리고 데이터베이스 실무는..점차 기존 교재들에서 벗어나 좀더 실무적이거나 세부적인 내용들을 다루는 방식으로 출제 되는 것 같습니다..

2회실기의 경우..사실 DB를 알고 풀었다기보단 기본 개념에 의지했습니다..

정확히 알고 푼 문제는 2번 로킹 뿐이었구요.. 이건 필기때 공부했던 내용으로.. 시험전날 전산영어 대비용으로 필기책 훑어보던 중에 다시 기억하게 된 용어였습니다..

클러스티드 넌클러스티드 인덱스같은 경우는

클러스터링 이란 용어를 신기술동향 용어중 공부했는데

자주 사용되는 데이터들을 인접한 위치에 배열해 검색속도를 높인다는.. 뭐 그런 의미로 알고 있어서..

일점 범위를 주어 찾는 다는 지문에 힌트를 얻어 클러스티드를 고르고 또 반대 개념으로 넌클러스티드를 골랐습니다.. 정말 DB를 알고 푼 문제가 아니었죠?-_-;


신기술동향 같은 경우는 약어들이 많습니다..

WCDMA와 IMT-2000,등 무선인터넷 관련 용어들..

또 프로토콜에 관련된 용어와 소프트웨어 용어들..이런 용어들은 대강의 뜻과함께 이게 규약인지 아니면 소프트웨어인지 컴퓨터 언어인지 아니면 기술인지 이걸 잘 구별해두셔야 할 것 같습니다..2회같은 경우는 다행히 2006 하반기 추가된 용어들을 집중적으로 구성해 출제했기 때문에 어렵지 않았지만

만약 기존 용어들과 같이 영어 약어로 된 용어들이 섞여서 출제되면 난감하거든요..;


전산영어 같은 경우는..

어느정도 영어지문 해석에 큰 무리가 없으시다면 그냥 필기책 한번 훑어보시는게 낫다고 추천해드립니다.

전산영어 출제범위가 필기때 배운 내용들이 영어지문으로 나오는 것이므로.. 필기때 배웠던 중요한 내용들을 다시 한번 점검하시는 게 나을듯 해요..


업무프로세스는 아직까지는..

공부할 필요가 없는 과목이라 생각이 듭니다..지문 잘 읽으면 답이 언젠가는 눈에 보이기 마련이므로

그냥 기출문제 조금 풀어보시고 아 이런식으로 답을 찾는구나..정도만 파악해두시면 될 것 같습니다..



제가 설명드린 방법은..적어도 시험일 한달전에는 시작 하셔야 할 거예요..

제가 믿고 있는 것이 제 머리속엔 자동완성 기능이 있다고 믿습니다. 한번보고 이해가 안가면

두 번보고 세번보고 하다가 도저히 이해가 안가면 잠시 덮어 두세요. 하루정도 지나고 다시 보면 이해가 갈 때도 있습니다. 뇌는 1+1=3의 기능을 하는 거 같아요. 하나를 알고 하나를 알면 그 두개를 조합해서 세개를 만들어낸다는.. 저만의 논리입니다..^^;;




에궁..100점 맞은 것도 아니고.. 몇달 정보처리 공부했다고 이런 글 쓰는 게..참 멋적지만..

그래도 도움이 되셨으면 해서 적습니다.. 비전공자라고.. 용어가 어렵다고..

포기하시진 않으셨으면 해요.. 일단 유수샘같이 알기 쉽게 개념 잡아 주시는 좋은 선생님이 계시고..

또 세상이 많이 좋아져서.. 이제 인터넷으로도 노력만 한다면 많은 정보를 얻을 수 있으니까요..




전 기사패쓰 알바는 아니지만.. 비전공자에게 유수샘 강의만큼 좋은 강의는 없는 것 같습니다.

강의시간은 좀 긴편이지만 그만큼 쉽게 이해시켜주고 두번 재번 다시 짚어주고..

질문에도 열심히 답변 해 주시고 열린 가슴으로 강의 하시는 멋진 분이라는 생각이 듭니다..^^

비록 적중은 못했지만 기사패쓰 교재에 삽입정렬 부분 알고리즘이 진짜 똑같이! 출제됐더군요..변수 이름만 틀리고 진짜 똑같은 거 보고 놀랬습니다..허걱..

분명 영향력있는 정보처리 강사님이시고 수강생들의 비위를 맞추느라 이리저리 눈치보시는 강사분이 아니시라 뭇매를 맞더라도 해야 할 말은 하시는 분입니다..

'study > programming' 카테고리의 다른 글

tcp/ip  (0) 2007.09.13
dd  (0) 2007.09.13
조건if  (0) 2007.09.07
c언어 공부중  (0) 2007.09.07
곱셈 기능을 지니는 함수  (0) 2007.09.07


본인의 아이피 주소 확인과 위치 추적
*1 *2