You are on page 1of 1

a.

Write a program that will Traverse the elements & show the output of the following

elements in a given array:

Given:

Arr1[8] = {Dasher, Dancer, Prancer, Comet, Cupid, Donner, Blitzen, Vixen}

Default index = 0;

#include <iostream>

using namespace std;

int main() {

string Arr1[8] = {"Dasher", "Dancer", "Prancer", "Comet", "Cupid", "Donner", "Blitzen", "Vixen"};

int index = 0;

for (int i = 0; i < 8; i++) {

cout << Arr1[i] << endl;

return 0;

You might also like