0

i am getting bunch (null) printed

here is my source code #include <stdio.h> int a[175]; int b[174]; int step[174]; int i ; int c ; int j ; int k ; int z ; int max ; int main() { for (i = 0; i < 5 ; i++) { printf("%s%d%s", "\n enter the number #",i," :"); scanf("%d",&a[i]); } for ( j = 0; j <5 ; j++) { if (j==0) { printf("\n\n\n\n\n..."); // //b[0] = 0 ; } if (j>0) { b[j] = a[j+1] - a[j]; } } for ( k = 0; k < 5 ; k++) { b[k] = step[k]; } max = step[0]; /* for (c = 1; c< 5 ; c++) { if (step[c] > max) max = step[c]; } */ // printf("%s,%d"," \n \n the highest diffenece in number is : ",max); //printf("%s","\n\n\n the highest diffenece is : "); //printf("%d",max); for (z = 0; z < 5; z++) { printf("%s",step[z]); } system("pause"); return 0; }

29th Sep 2017, 6:47 PM
Hridyansh Thakur
Hridyansh Thakur - avatar
1 Réponse