garbage
WHY THIS CODE PRINTS GARBAGE ? ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
void mymarks(double* arr,double* brr,int length1)
{
int a;
for(a=0;a<length1;a++)
{
printf("\nEnter total marks in quiz %d =",(a+1));
scanf("%f",&arr[a]);
printf ("\n Enter marks obtained in quiz %d=",(a+1));
scanf ("%f",&brr[a]);
}
//test*****************************
for(a=0;a<length1;a++)
{
printf("%f %f",brr[a] , arr[a]);
}
}
|
Show where and how were arr and brr defined and how was the function called?
i got it ,, garbage is because of not using
at scanf
thank u
Topic archived. No new replies allowed.