Answered step by step
Verified Expert Solution
Question
1 Approved Answer
*****USING C++ LANGUAGE***********USING C++ LANGUAGE***********USING C++ LANGUAGE***********USING C++ LANGUAGE****** rogram 9-1 demonstrates the use of the address operator to display the address, size, and contents
*****USING C++ LANGUAGE***********USING C++ LANGUAGE***********USING C++ LANGUAGE***********USING C++ LANGUAGE******\
rogram 9-1 demonstrates the use of the address operator to display the address, size, and contents of a variable. Program 9-1 Program Output The address of x is 08 f0 5 The size of x is 4 bytes The value in x is 25 Program 9-2 ! demonstrates a very simple usage of a pointer: storing and printing the address of another variable. Program 9-2 Program 9-4 demonstrates that pointers can point to different variables. Program 9-4 Program Output Here are the values of x,y, and z : 255075 Once again, here are the values of x,y, and z : 125150175 1// This program shows an array name being dereferenced with the * 2// operator. 3 \#include 4 using namespace std; 5 6 int main() 71 8 short numbers []={10,20,30,40,50}; 9 10 cout "The first element of the array is "; 11 cout + numberg endl; 12 return 0 ; 133 Program Output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started