Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
야
야오지앙_ITE1015_2019021503
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
야오지앙
야오지앙_ITE1015_2019021503
Commits
da02d6e8
Commit
da02d6e8
authored
Sep 20, 2022
by
야오지앙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
b5e2cdb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
2-1-2.c
2-1-2.c
+38
-0
No files found.
2-1-2.c
0 → 100644
View file @
da02d6e8
#pragma warning(disable:4996)
#include<stdio.h>
#include<windows.h>
#include<string.h>
struct
point
{
int
xpos
;
int
ypos
;
}
Point
;
struct
point
*
getStruct
(
struct
point
*
);
void
output
(
struct
point
);
void
print
(
const
struct
point
*
p
);
int
main
()
{
struct
point
y
=
{
2
,
4
};
getStruct
(
&
y
);
output
(
y
);
output
(
*
getStruct
(
&
y
));
*
getStruct
(
&
y
)
=
(
struct
point
){
1
,
2
};
}
struct
point
*
getStruct
(
struct
point
*
p
)
{
scanf
(
"%d"
,
&
p
->
xpos
);
scanf
(
"%d"
,
&
p
->
ypos
);
printf
(
"%d,%d
\n
"
,
p
->
xpos
,
p
->
ypos
);
return
p
;
}
void
output
(
struct
point
p
)
{
printf
(
"%d,%d
\n
"
,
p
.
xpos
,
p
.
ypos
);
}
void
print
(
const
struct
point
*
p
)
{
print
(
"%d,%d"
,
p
->
xpos
,
p
->
ypos
);
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment