Answer to Question #28954 in C++ for edward

Question #28954
Write a C++ program the includes the declaration statements int num, count;
long date;
float yield;
double price;
Have the program use the address operator and the cout object to display the addresses that correspond to each variable.
1
Expert's answer
2013-04-22T11:41:46-0400
#include<iostream>
using namespace std;

int main()
{
int num, count;
long date;
float yield;
double price;

cout<<"num adress = "<<&num<<endl;
cout<<"count adress = "<<&count<<endl;
cout<<"date adress = "<<&date<<endl;
cout<<"yield adress = "<<&yield<<endl;
cout<<"price adress = "<<&price<<endl;

return 0;
}

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
APPROVED BY CLIENTS