Toggle navigation
Courses
Questions
Tags
Users
AD 20161110 exercise 1
0
like
0
dislike
583
views
請完成下列函式
void reverse(int *array,int size);
該函式會將array陣列中所有元素的位置顛倒。
並寫一個主程式測試你寫的函式。
[Exercise]
Essay (Open question)
-
asked
Nov 10, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 17220 -
Available when:
Unlimited
-
Due to:
Unlimited
|
583
views
comment
Please
log in
or
register
to add a comment.
20
Answers
0
like
0
dislike
Hidden content!* * * ** ** ** * * *
* * * * * * *
int *** * * *array,int size);
{
* ** * * ** * * * **** * i , tmp;
* * * * *** * ** ******* *** ; ***** ; i++)
* * * * * * * ** ** ***** **
** * ** * * * * ***** * * ** ** * * *** ** ** ** * * * * * ** * * ** *** * *** * ** * = *array[i];
* * * *** * * ** * * * * * ** ** ** * * ** * * * ** *** ** **** ** * ** ** * * * ** = * * * *
* ** * * * *** * ** * *** *** ** * * * * * ** * * *** * * * * * ** **** * * ** * * *** * * = tmp;
*** ** * * * ** ** * * ** * * * * ** * ***** * ** * * ** * * * * * * tmp;
* * * * * * * * *
* ** * * **** ** * * * **
}
int main(void)
{
int * * = {0};
int size , i ;
* * * * * * * * , ** * *** *
for(i=0 ; ** **** * ;i++)
{
** ** * * * * * ** * ** * * , *** * ** ***
}
for(i=0 ; * * ** ; i++)