Answer to Question #332290 in C++ for Chubby

Question #332290

Make a C++ program that will print the values of array named areas with values {84,76,48} using while loop.

1
Expert's answer
2022-04-22T14:25:32-0400


//Out array address (hex number) if we rerunning program adress must changed
#include  <iostream>
#include <iomanip>
int main() {
  int array[]={84,76,48};
  int *ptr=array;
  std::cout<<"************** Out addres *************"<<std::endl;
  while(*ptr!=0)
    {
      std::cout<<ptr<<std::endl;
      ptr++;
    }
  return 0;
}
//This code was tested on Lunix online compiler !!

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