Answer to Question #8238 in C++ for GORDON

Question #8238
write a c plus plus program to input the set of array elements and print it in reverse order.
1
Expert's answer
2012-04-12T09:57:18-0400
#define N 5

class note {
public:
char element[99];
};

note notes[N];
int i;

void main(){

for (i=1;i<=N;i++){
printf("Enter an element: ");
scanf("%s",notes[i].element);
}

for (i=N;i>=1;i--){
printf("%s\n", notes[i].element);
}

}

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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS