#include <stdio.h>
#define NAME_LEN 64
struct student{
char name[NAME_LEN];
int height;
float weight;
long schols;
};
int main(){
struct student takao = {"Takao", 173, 86.2};
printf("氏名 = %s, adress = %p\n", takao.name, &takao.name);
printf("身長 = %d, adress = %p\n", takao.height, &takao.height);
printf("体重 = %.1f, adress = %p\n", takao.weight, &takao.weight);
printf("奨学金 = %ld, adress = %p\n", takao.schols, &takao.schols);
return 0;
}
0 件のコメント:
コメントを投稿