64 642
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #17817 in C++ for dhruvee

Question #17817
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.
Expert's answer

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]);
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions