1 bubble sort 2 include 3 include 4 5 define max 10 6 7 int a max 8 int rand seed 5346402

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. }

I

which line is a compiler directive?

A. 2,3

B. 7,8

C. 9,30

D. 20,30

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now