can you help me out in writing a program that reads an integer array having 5 elements .The program uses a function reverse() to reverse this array.Make suitable assumptions wherever required.
1
Expert's answer
2012-11-02T13:03:27-0400
int arrayofnumbers[5]; void reverse(); int main() { for(int i=0;i<5;i++){ printf("Enter number %d: ",(i+1)); scanf("%d",&arrayofnumbers[i]); } reverse(); int k=0; scanf("%d",&k); return 0; } void reverse(){ printf("Reverse numbers: "); for(int i=4;i>=0;i--){ printf("%d ",arrayofnumbers[i]); } }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment