teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

コード

2020/08/10 01:51

投稿

asdfrgthyj
asdfrgthyj

スコア90

title CHANGED
File without changes
body CHANGED
@@ -1,4 +1,4 @@
1
- 以下のソースコードは、あるサイトのサンプルプログラムです。
1
+ 以下のソースコードは、http://c-lang.sevendays-study.com/ex-day5.htmlのサンプルコードです。
2
2
  // 構造体のデータを表示する関数の下の行に記載されている
3
3
  void setData(student_data*,int,char*,int);に関して、なぜstudent_dataとcharはポインタ変数が定義されていて、それ以外はされていないのでしょうか。この差ってなんですか?
4
4
 
@@ -7,6 +7,7 @@
7
7
 
8
8
  以上、ご教示のほど、よろしくお願い致します。
9
9
 
10
+ ``````
10
11
  include <stdio.h>
11
12
  include <string.h>
12
13
 
@@ -46,4 +47,6 @@
46
47
  // データの表示
47
48
  void showData(student_data* data){
48
49
  printf("学生番号:%d 名前:%s 年齢:%d¥n",data->id,data->name,data->age);
49
- }
50
+ }
51
+ コード
52
+ ```