Week # 4 (Pointers) : Task1
Week # 4 (Pointers) : Task1
Task1:
Write a program in C++ that can calculate the factorial of a number by passing the address of that
number to a function, using pointers.
Input:
Output:
Task2:
Write down a C++ program that will declare and initialize two arrays and would generate the sum of
these two arrays by using pointers.
Input:
Output:
Task3:
Write down a C++ program, that will Calculate the area of a Circle by using Constant Data member
PI=3.14, and by using Constant Pointer.
Input:
Output:
Task4:
Write down a C++ program that would generate some table 2*1=2,2*10=20by using pointers .
Input:
Output:
Task5:
Write down a C++ program that would design a simple Calculator, by using Pointers.
Input:
Output: