k = scanf("%d ",& ampI); Scanf returns 0 to k. printf("%d\n ",k); Type 0.
If the input is executed correctly, k gets 1.
printf("%d\n ",I); The printed value is not necessarily what it is, which is determined by the way the compiler handles it. Maybe it's 4223 160, maybe it's another meaningless value.