/* * Author : Amit Dutta * Date : 08 Feb 2026 * Repo : https://github.com/notamitgamer/bsc * License : MIT License (See the LICENSE file for details) */ /* Write a program which initializes an integer array of 10 elements in main(), passes it to modify(), multiplies each element by 3, and prints the new array in main(). */ /* Let Us C, Chap- 13 (Arrays), Qn No.: B(e) */ /* This file is auto-generated by a bot. */ /* This code is not compiled; it is for reference only. */ #include #include #include void modify(int *, int); int main() { int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int i; printf("Original Array:\n"); for (i = 0; i < 10; i++) printf("%d ", arr[i]); modify(arr, 10); printf("\n\nModified Array (x3):\n"); for (i = 0; i < 10; i++) printf("%d ", arr[i]); printf("\n"); return 0; } void modify(int *a, int n) { int i; for (i = 0; i < n; i++) { a[i] = a[i] * 3; } }