Write a user defined function named display() that receives an integer array and then add 10 with all the elements.
Sol:
#include
using namespace std;
func(int arr[], int n)
{
for (int i = 0; i < n; i++)
arr[i]=arr[i]+10;
}
int main()
{
int arr[] = {10, 10, 10};
int n = sizeof(arr) / sizeof(arr[0]);
func(arr, n);
for(int i=0;i
{
cout<
}
return 0;
}
thistimebd Bangladesh Live online newsportal, education, Lifestyle, Health, Photography, gif image etc.
Make your own name or company name website | contact: thistimebd24@gmail.com
Copyright © 2020-2024 News Portal in Bangladesh - THISTIMEBD.COM. ALL Rights Reserved.