Make a C++ program that will print the values of array named areas with values {84,76,48} using while loop.
//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 !!
Comments
Leave a comment