Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F62246717
reverse_vector.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, May 11, 22:13
Size
283 B
Mime Type
text/x-c
Expires
Mon, May 13, 22:13 (2 d)
Engine
blob
Format
Raw Data
Handle
17571105
Attached To
R10025 iCAPs public version 2
reverse_vector.c
View Options
/*
Purpose: Reverse order of a vector of type double
*/
#include <stdlib.h>
double* reverse_vector(double *data, int size) {
size_t i, j;
double tmp;
for(i=0; i<(size/2); i++) {
j = size - i - 1;
tmp = data[j];
data[j] = data[i];
data[i] = tmp;
}
}
Event Timeline
Log In to Comment