




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Notes; Class: Introduction to C Programming for Engineers; Subject: Computer Systems Engineering ; University: University of Alaska - Anchorage; Term: Fall 2008;
Typology: Study notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!
int *count_ptr; int count = 10; count_ptr = &count; printf (“%d”, count); printf (“%d”, *count_ptr); printf (“%d”, count_ptr); printf (“%d”, &count); printf (“%d”, &count_ptr);
void func1(float, int (*)(int, float)); int func2 (int, float); int func3 (int, float);
float num = 3.0f; func1(num, func2); func1(num, func3);
Write a program that uses bubble sort to sort an array ofvalues. The array to sort can be hard-coded, but whetherto sort the list in ascending or descending order will bedecided by prompting the user. Instead of having twodifferent bubble sort functions, have one bubble sortfunction that takes another function as a parameter. Thatfunction will be used to compare for sorting in ascendingor descending order. Output the sorted array. Here is thebubble_sort function prototype (array, size, comparefunction): void bubble_sort(int , int, int ()(int, int));