1 Pointers Declare Int Variable N Value 5 Main B Declare Pointer Nptr Variable N C Print V Q37166703

1. Pointers a) Declare an int variable “n” with a value of 5 inthe main. b) Declare an pointer “nPtr” to the variable n c) Printthe value of n using both the variable “n” and the variable “nPtr”.d) Print the address of n using both the variables “n” and “nPtr”e) Create a function “changeVariable” that increments the variablen with one. (You have to figure out if the function should take anint or an int* as the input.) f) Declare a variable m equal to 10.Create a function “changePointerVariable” that sets nPtr to theaddress of m. You will pass “&nPtr” and

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.