I have this void function that modifies an array count[]. When I call this function inside printf, and print the resulting count[0] in the same printf, why isn't the array modified?
The output is 8 0 instead of 8 1.Code:#include<stdio.h> int test(int n, int count[]) { count[0]++; return 8; } int main() { int count[5] = {0}; printf("%d %d", test(5,count), count[0]); return 0; }