H

@havecozy

3016 : 1등한 학생의 성적

C
1 day ago
#include <stdio.h> struct grade { char name[20]; int s1, s2, s3; }; int main(void){ int n, i;

23-2

C
1 week ago
#include <stdio.h> typedef struct point{ int xpos; int ypos; }Point; typedef struct Rectangle{ Point upleft; Point lowright;

구조체 스왑

C
2 weeks ago
#include <stdio.h> typedef struct point{ int xpos; int ypos; }Point; void ShowPoint(Point p1, Point p2) { printf("pos1: [%d, %d] \n", p1.xpos, p1.ypos);

3017 정렬기준

C
2 weeks ago
#include <stdio.h> #include <stdlib.h> typedef struct{ int n; int m; int d; }Data; int compare(const void * a, const void * b){

퀵정렬 오름차순

C
2 weeks ago
#include <stdio.h> #include <stdlib.h> int compare(const void *a, const void *b) { return (*(int *)a - *(int *)b); } int main() { int n; scanf("%d", &n);

내림차순 퀵정렬

C
3 weeks ago
#include <stdio.h> #include <stdlib.h> int compare(const void *a, const void *b) { return (*(int *)b - *(int *)a); } int main(void) { int n; scanf("%d", &n);

3170 : 기억력 테스트 9

C
1 month ago
#include <stdio.h> #include <string.h> struct word { char name[101]; int n; }; struct word a[100000];

3004 데이터 재정렬

C
1 month ago
#include <stdio.h> #include <stdlib.h> typedef struct{ int n; int idx; }Data; int compare(const void *a, const void *b) { Data *A = (Data *)a;

투표

C
2 months ago
#include <stdio.h> Struct person{ int total_score; int 3_score; int 2_score; }; int main() { struct person candidate[3];

21-2 [문자열 처리]

C
3 months ago
// #include <stdio.h> // #include <string.h> // int main() { // char str1[20]; // char str2[20]; // char str3[40]; // fgets(str1, sizeof(str1), stdin); // fgets(str2, sizeof(str2), stdin);

이중포인터 최대 최소

C
5 months ago
#include <stdio.h> void MaxAndMin(int **maxPtr, int **minPtr, int *arr){ int * max; int * min; int i; max=&arr[0]; min=&arr[0]; for(i=0; i<5; i++){ if(*max<arr[i]){

25-2 메모리의 동적 할당 문제

C
8 months ago
// #include <stdio.h> // #include <stdlib.h> // int main(void) // { // int * ptr1 = (int *)malloc(sizeof(int)); // int * ptr2 = (int *)malloc(sizeof(int)*7); // int i; // *ptr1 = 20;

25-2 메모리의 동적 할당

C
8 months ago
#include <stdio.h> #include <stdlib.h> char *ReadUserName(){ char * name = (char *)malloc(sizeof(char)*30); //ehdwjr gkfekd printf("What's your name?"); gets(name); return name; //name 포인터 변수값 (동적할당으로 생성한 메모리 주소값) }