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

Purdue CS 252 Midterm Questions with Verified Solutions

Rating
-
Sold
1
Pages
19
Grade
A
Uploaded on
29-01-2024
Written in
2023/2024

Purdue CS 252 Midterm Questions with Verified Solutions What are the different types of memory sections? Text Data BSS Heap Stack What is stored in text? Instructions that run the program. What is stored in Data? Initialized global variables What is stored in BSS? Uninitialized global variables (initialized to 0 by default) What is stored in the heap? Memory that was returned by malloc/new. It grows as you request more. [grows upwards] What is stored in the stack? Local variables and return addresses. [grows downward] What are dynamic libraries? They are libraries shared with other processes. Each have their own text, data, bss. What is a program? File in a special format that contains all necessary information to load and application and make it run. What are some examples of executable file formats? ELF - Executable Link File (Linux) COFF - Common Object File Format (Windows) What are the different steps to build a program? Editor, C preprocessor, Compiler, Optimizer, Assembler, Linker, Loader What does the preprocessor do? Expands macros like #define and #include to generate a .i file. What does the compiler do? Compiles the .i file, which generates assembly code into a .s file What does the assembler do? Assembles the .s file into an object file .o What does the linker do? Connect known libraries to the object file. Sets most of the addresses for objects and files. Won't know about shared objects, so will be UNDEF. What does the loader (runtime linker) do? It takes the executable file, and allocated memory for the sections. Also fills in UNDEF sections. WIll finally jump into entry point. What is the entry point of a program? _start which will initialize values then jump into main. When main is done, it will call _exit. How do you request more memory from the OS? Program calls malloc/new, then the malloc library will call sbrk(s) to get the memory from the heap [expands it]. What kind of free list did we use in the malloc lab? Segregated free list, which was a collection of free lists for various sizes. What

Show more Read less
Institution
Purdue CS 252
Course
Purdue CS 252










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

Written for

Institution
Purdue CS 252
Course
Purdue CS 252

Document information

Uploaded on
January 29, 2024
Number of pages
19
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

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.
StellarScores Western Governers University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1900
Member since
2 year
Number of followers
864
Documents
21000
Last sold
5 hours ago
Your Academic Hub: Documents, Study Guides, Summaries, Essays, and Exclusive Package Deals.

Welcome to my comprehensive academic resource store! At my online hub, I offer a vast array of meticulously crafted documents, study guides, summaries, and essays to support your educational journey. I understand the value of accuracy and completeness, which is why all my materials are verified and kept up-to-date with the latest versions. But that's not all! I also offer exclusive package deals and bundles to provide you with cost-effective solutions for your academic needs. Whether you're a student looking for study aids or seeking in-depth knowledge, my store is your one-stop destination for reliable, top-quality materials that can propel your learning experience to new heights. Explore my offerings and unlock the keys to academic success today!

Read more Read less
4.0

438 reviews

5
237
4
78
3
61
2
24
1
38

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 tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card 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