test.asm
0.00MB
asm_jh.c
0.01MB
run.sh
0.00MB

ASM 실습용.

 

 

에트리에서 2년간 쓴 C 레벨 테스트용

 

1. 다음은 실행 가능한 코드 입니까?

 

#include <stdio.h>

 

int main()

{

             printf("Hello World\n");

             extern int s;

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

             return 0;

}

 

int s = 88;

 

 

2. 다음은 포인터 입니까? 배열 입니까?

 

int (*s)[8];

 

3. 다음 코드의 차이점은 무엇 입니까?

 

int *s();

void (*s)();

 

4. 결과값은 무엇 입니까?

 

#include <stdio.h>

 

int main()

{

             float s = 3.141592;

             float *o;

             o = &s;

             printf("%f\n", *o);

             printf("%f", o[0]);

             return 0;

}

 

 

5. 결과값은 무엇 입니까?

 

#include<stdio.h>

 

int main()

{

             int s = 8;

             const int *o;

             o = &s;

             *o = 88;

             printf("%d", s);

             return 0;

}

 

 

6. 결과값은 무엇 입니까?

 

#include <stdio.h>

 

int main() {

 

             int s = 3;

             int o = 4;

 

             printf("%d", s^o);

 

             return 0;

}

 

7. 결과값은 무엇 입니까?

 

#include <stdio.h>

#include <stdlib.h>

 

int main()

{

             int *p = (int*)malloc(88 * sizeof(int));

             printf("%d ", sizeof(p));                          

 

             return 0;

}

 

8. 다음에서 typedef 제외, 코드를 작성 하십시요.

 

typedef struct _Customer {

             char name[8];

             int id;

} Customer;

 

#include <stdio.h>

#include <string.h>

 

int main() {

 

             Customer s, o;

 

             strcpy_s(s.name, "Soul");

             s.id = 8888;

                          

             strcpy_s(o.name, "Sora");

             o.id = 3333;

                          

             printf("name : %s %s\n", s.name, o.name);    

             printf("id : %d %d", s.id, o.id);

 

             return 0;

}

 

 

9. 결과값은 무엇 입니까?

 

#include<stdio.h>

 

void main()

{           

             int i = 0;

             printf("%d ", i++);

             main();

}

 

 

10. 결과값은 무엇 입니까?

 

#include<stdio.h>

 

union {

             char s[3];

             int o;    

} _union;

 

struct {

             char r[3];

             int a;

} _struct;

 

int main() {       

             printf("%d %d\n", sizeof _union.s, sizeof _struct.r);

             printf("%d %d\n", sizeof _union.o, sizeof _struct.a);

             printf("%d %d", sizeof _union, sizeof _struct);

}

 

 

'Blog History' 카테고리의 다른 글

273  (0) 2020.05.18
272  (0) 2020.05.17
270  (0) 2020.05.17
268  (0) 2020.05.17
267  (0) 2020.05.17

+ Recent posts