Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(1) Observe the address of variable num1 and num2 (2) Observe the value of variable pointer1 and pointer2 right after variable declaration but before assignment

image text in transcribedimage text in transcribed

(1) Observe the address of variable num1 and num2 (2) Observe the value of variable pointer1 and pointer2 right after variable declaration but before assignment after assignment O (3) Output num1's and num2's values using two pointers (Can't use num1 and num2) after the assignment (4) What happen if we use dereference operator with the pointer variables after declaring pointer1 and pointer2, before assignment? #include int main(int argc, char * argv[]) { int *pointer_1, *pointer_2; int num1 = 100, num2 10; //printf("(1) Address of num1 num2: % %p ",&numi, &num2); //printf("(2) Values of pointer_1 & pointer_2 BEFORE assignement: %p%p ", pointer_1, pointer_2); pointer_1 &num1; pointer_2 = &num2; //printf("(2) Values of pointer_1 & pointer_2 AFTER assignement: %p %p ", pointer_1, pointer_2); //printf("(3) Values of *pointer_1, *pointer_2: %d %d ", *pointer_1, *pointer_2); return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

What is the environment we are trying to create?

Answered: 1 week ago

Question

How would we like to see ourselves?

Answered: 1 week ago