100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CIS*2750: Midterm Questions and Correct Answers/ Latest Update / Already Graded

Rating
-
Sold
-
Pages
16
Grade
A+
Uploaded on
05-12-2025
Written in
2025/2026

Parameters of qsort Ans: Void * base, size_t nel, size_t width, int (*compar) (const void*, const void*)) (Pointer to array, element in array, size of elements, comparator function) How does the comparator function work? Ans: Cast the void pointer to the type of pointer in the given array Assign the values of the given parameters to the pointers Subtract a from b If a < b, return -1 If b < a, return 1 If a == b, return 0 -o flag Ans: Produces an output file Page | 2 All rights reserved © 2025/ 2026 | -Wall flag Ans: Activates all warnings -pedantic flag Ans: Produces more specific warning -std=c99 flag Ans: Uses the c99 standard to compile gcc Ans: Preprocessor - translate directives "#" into more C code - Use -E Linker - connects you object code to standard (or non standard) libraries default Compiler - converts C code into object code - Use -c Linking Libraries Page | 3 All rights reserved © 2025/ 2026 | Ans: Use -l(name of library) *no space Use -L to provide a path to a library isn't in the defaults -fPIC flag Ans: Creates a position independent code; use it when creating .o file -shared flag

Show more Read less
Institution
CIS2750
Course
CIS2750










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CIS2750
Course
CIS2750

Document information

Uploaded on
December 5, 2025
Number of pages
16
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Page |1


CIS*2750: Midterm Questions and Correct
Answers/ Latest Update / Already Graded
Parameters of qsort

Ans: Void * base, size_t nel, size_t width, int (*compar) (const
void*, const void*)) (Pointer to array, element in array, size of
elements, comparator function)


How does the comparator function work?

Ans: Cast the void pointer to the type of pointer in the given
array


Assign the values of the given parameters to the pointers


Subtract a from b


If a < b, return -1
If b < a, return 1
If a == b, return 0


-o flag

Ans: Produces an output file


All rights reserved © 2025/ 2026 |

, Page |2



-Wall flag

Ans: Activates all warnings


-pedantic flag

Ans: Produces more specific warning


-std=c99 flag

Ans: Uses the c99 standard to compile


gcc

Ans: Preprocessor - translate directives "#" into more C code -
Use -E


Linker - connects you object code to standard (or non standard)
libraries default


Compiler - converts C code into object code - Use -c


Linking Libraries



All rights reserved © 2025/ 2026 |

, Page |3


Ans: Use -l(name of library) *no space


Use -L to provide a path to a library isn't in the d efaults


-fPIC flag

Ans: Creates a position independent code; use it when creating
.o file


-shared flag

Ans: Created a shared library


Name your file .so


Allows for one library to be used between multiple applications


export LD_LIBRARY_PATH=.

Ans: Tells the OS the pwd of the shared library at runtime


Make

Ans: Program to make repeated tasks easier



All rights reserved © 2025/ 2026 |

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Expert1 Chamberlian School of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
38
Member since
9 months
Number of followers
1
Documents
6707
Last sold
1 day ago
Expert1

Welcome to Expert1 – Your Trusted Study Partner! Struggling to prepare for exams or ace your coursework? At Expert1, I provide top-tier, exam-ready study materials designed to help you succeed with confidence. All notes are created with clarity, precision, and a deep understanding of the curriculum to ensure you save time and score high. What You’ll Find Here: High-quality summaries and exam packs Past paper solutions with detailed explanations Notes aligned with your syllabus (A-levels, university, etc.) Resources from top-performing students Trusted by hundreds of students to boost their grades!

Read more Read less
4.3

6 reviews

5
5
4
0
3
0
2
0
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions