Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

1.

Write a program to perform arithmetic operations using pointers and print the results along with
their values and adresses.
Sample output:
Enter two values: 3 2
Sum:
5 stored at 65578945
Difference: 1 stored at 75589675
Product:
6 stored at 1256789
Division:
1 stored at 4553398
2. Write a Program that reads positive-whole number and store it in variable number. Pass the
address of the variable to the function calculate() and calculates range of following numbers in
this way:
a) if the given number is even, then divides it with 2
b) if the given number is odd, then multiplies it with 3 and adds 1
After the process return back the result to main(). (use call by reference concept)
3. Write a C program using functions and pointers to display a customers account details after
using his debit card for a single purchase. The details will include the name, account number, the
amount before purchase and the balance amount after purchase. The maximum purchase limit is
15000Rs and the minimum balance in
the account is 500Rs.
Pointers and arrays
1. Write a program using pointers to read in an array of integers and print its elements in reverse
order. (Flowchart)

2. Write a program to read an array of integers from keyboard and print them multiplied by 2
using pointers.
3. Write a function to find all the values divisible by 9 between two given limits.
4. Write a C program to display a n customers account details after using his debit card for a
single purchase. The details will include the name, account number, the amount before
purchase and the balance amount after purchase. The maximum purchase limit is 15000Rs
and the minimum balance in the account is 500Rs.(Use pointers.)

You might also like