1. /* Bubble Sort */

2. #include

3. #include

4.

5. #define MAX 10

6.

7. int a[MAX];

8. int rand_seed=10;

9. void bubble_sort(int m);

10.

11. int main(void)

12. {

13. int i;

14. /* fill array */

15. for (i=0; i

16. {

17. a[i]=rand();

18. printf(“%dn”,a[i]);

19. }

20. bubble_sort(MAX);

21. /* print sorted array */

22. printf(“——————–n”);

23. for (i=0; i

24. printf(“%dn”,a[i]);

25.

26. return 0;

27. }

28.

29.

30. void bubble_sort(int m)

31. {

32. int x,y,t;

33. for (x=0; x

34. for (y=0; y

35. if (a[y] > a[y+1])

36. {

37. t=a[y];

38. a[y]=a[y+1];

39. a[y+1]=t;

40. }

41. }

which line is the entry point for the

program?

A. 1

B. 5

C. 11

D. 13



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *