- Write a program to print the address of a variable. Use this address to get the value of this variable.
- Write a program having a variable i. Print the address of i. Pass this variable to a function and print its address. Are these addresses same? Why?
- Write a program to change the value of a variable to ten times its current value. Write a function and pass the value by reference.
- Write a program using a function that calculates the sum and average of two numbers. Use pointers and print the values of sum and average in main().
- Write a program to print the value of a variable i by using the "pointer to pointer" type of variable.
- Try problem 3 using call by value and verify that it doesn’t change the value of the said variable.
Chapter 06 — Pointers
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||