// 구조체 함수의 반환값

#include<stdio.h>
#include<string.h>
#define _CRT_SECURE_NO_WARNINGS;
struct student {
	int sno, age;
	char name[10];
};

struct student becoming();  // 사용자 정의 함수

int main(void) {
	struct student a;

	a = becoming();  // 구조체 함수 호출

	printf("학번 : %d\n성명 : %s\n나이 : %d\n", a.sno, a.name, a.age);

	return 0;
}

struct student becoming() {
	struct student s;
	s.sno = 20235678;
	strcpy(s.name, "이겨레");
	s.age = 25;
	return s;
}