2023 정보처리기사 실기 예상 문제 모음

 

C언어 기출문제 모음

JAVA 기출문제 모음

Python 기출문제 모음

정보처리기사 실기 SQL 기출문제 모음

 

정보처리산업기사(정처산기) 실기 C언어 기출문제 모음

정보처리산업기사(정처산기) 실기 Java 기출문제 모음

정보처리산업기사(정처산기) 실기 Python 기출문제 모음

정보처리산업기사(정처산기) 실기 SQL 기출문제 모음


22년 1회

19. 다음 Java로 구현된 프로그램을 분석하여 그 실행결과를 쓰시오.

public class Test {
	public static void main(String args[]) {
    	int a=0, ss=0;
        while(true) {
        if(ss>100) break;
        ++a;
        ss+=a;
        }
        System.out.print(a+ss);
     }
 }

22년 1회

20. 다음 Java로 구현된 프로그램을 분석하여 그 실행결과를 쓰시오. 

public class Test {
	public static void main(String args[]) {
    	int x=1, T_x=0, t_x=0;
        T_x= (x>=0) ? x:-x;
        if(x>=0)
        	t_x=x;
        else
        	t_x=-x;
        System.out.println(T_x + " " + t_x);
        }
 }

22년 2회

10. 다음 Java로 구현된 프로그램을 분석하여 그 실행 결과를 쓰시오.

class Test {  
  public static void main(String args[]) { 
    int i=17;
    i+=1;
    i-=2;
    i*=3;
    i/=4;
    i%=5;
    System.out.print(i); 
  } 
}

22년 2회

16. 다음 Java로 구현된 프로그램을 분석하여 그 실행 결과를 쓰시오.

class Test {  
  public static void main(String args[]) { 
    int a=26;
    int b=91;
    int g=0;
    int c=a<b?a:b;
    for(int i=1; i<c;i++){
      if(a%i==0 && b%i==0)
        g=i;
    }
    System.out.print(g);
  } 

}

22년 3회

3. 다음 Java로 구현된 프로그램을 분석하여 그 실행 결과를 쓰시오.

class Main {  
  public static void main(String args[]) { 
    int[] a=new int[8];
    int i=0;
    int n=11;
    while(n>0){
      a[i++]=n%2;
      n/=2;
    }
    for(i=7;i>=0;i--)
      System.out.print("%d",a[i]);
  } 
}
더보기

00001011


22년 3회

15. 다음 JAVA로 구현된 프로그램을 분석하여 그 실행결과를 쓰시오.

class Main {  
  public static void main(String args[]) { 
    int a[][]=new int [3][3];
    init(a);
    data(a);
    prnt(a);
  } 

  static void init(int a[][]){
    for(int i=0; i<3;i++)
      for(int j=0; j<3;j++)
        a[i][j]=0;
  }

    static void data(int a[][]){
      int v=1;
    for(int i=0; i<3;i++)
      for(int j=i; j<3;j++)
        a[i][j]=v++;
  }

    static void prnt (int a[][]){
    for(int i=0; i<3;i++){
      for(int j=0; j<3;j++){
        if(a[i][j]==0)
          System.out.printf(" ");
      else
          System.out.printf("%d", a[i][j]);
     }
      System.out.println();
    } 
  }
}
더보기

123

  45

    6


23년 1회

12. 다음 코드의 출력결과를 쓰시오

public class Main {
	public static void main(String[] args) {   // true, false
		int x = 1;
		System.out.println(!(x>0));
		System.out.println((x!=0) || (x>0));
		System.out.println(x << 2);
		System.out.println(x & 2);
		System.out.println(x %= 3);
	}
}
더보기

false
true
4
0
1


23년 2회

15. 출력결과

class Main {
    public static void main(String[] args) {
    	int[] a = {4, 7, 1, 2};
    	for(int i=0; i<3; i++) {
    		for(int j=i+1; j<4; j++) {
    			if(a[i] > a[j]) {
    				int temp = a[j];
    				a[j] = a[i];
    				a[i] = temp;
    			}
    		}
    	}
    	for(int i=0; i<4; i++) {
    		System.out.print(a[i] + "a");
    	}
    }
}
더보기

1a2a4a7a


23년 3회

10. 출력결과

class Berry {
	String Str;
	void meth() {
		func();
	}
	void func() {
		System.out.println(Str);
	}
}
class Apple extends Berry {
	String Str;
	void func() {
		Str = "Apple";
		super.Str = "Berry";
		super.func();
		System.out.println(Str);
	}
}
public class Main {
	public static void main(String[] args) {
		Berry A = new Apple();
		A.meth();
	}
}
더보기

Berry
Apple


23년 3회

15. 출력결과

public class Main {
	static int  a = 0;
	static int func(int t) {
		a = a+t;
		return a;
	}
	public static void main(String[] args) {
		for(int i=0; i<5; i++) {
			func(i);
		}
		System.out.print(a);
	}
}

23년 3회

17. 출력결과

class A {
	int f(int a, int b) {
		return a+b;
	}
}
public class Main {
	public static void main(String[] args) {
		A a = new A();
		System.out.print(a.f(25, 25));
	}
}

2023 정보처리기사 실기 예상 문제 모음

 

C언어 기출문제 모음

JAVA 기출문제 모음

Python 기출문제 모음

정보처리기사 실기 SQL 기출문제 모음

 

정보처리산업기사(정처산기) 실기 C언어 기출문제 모음

정보처리산업기사(정처산기) 실기 Java 기출문제 모음

정보처리산업기사(정처산기) 실기 Python 기출문제 모음

정보처리산업기사(정처산기) 실기 SQL 기출문제 모음

+ Recent posts