Toggle navigation
Courses
Questions
Tags
Users
AD 20161110 exercise 1
0
like
0
dislike
2.6k
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
|
2.6k
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++)
* * * * * ** *** ** ** * **** , array[i]);
** * * , size);
* * *** * * * *
return 0;
}
answered
Jan 7, 2017
by
410223045
(
-194
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content! * * **** * *** * *
* ** * * * * * ****
int reverse(int *array,int size);
{