Reference no: EM132640631
IST 543 Foundations of Software Security, Penn State University
Compile exercise.c with the following command
gcc -ggdb -m32 -fno-stack-protector -fcf-protection=none exercise.c
If you are using some latest gcc versions, you can take out the option -fcf-protection=none
if it is not available.
Answer the following questions:
(1) How many bytes does the string "john" occupy in memory? Explain.
(2) Where is "john" stored (memory address)?
(3) Where is the variable "name" stored (memory address)?
(4) What are the memory addresses of "main" (code), foo, and bar?
(5) Draw the stack layout when bar() is called first time.
Include everything in memory. See the recording and transcript of this week's class
(6) What will happen if the loop termination condition is changed to "i<1024"?*/
#include <stdio.h>
void foo();
void bar();
void main()
{
char *name = "john";
printf("hello %s!", name);
foo();
}
void foo()
{
int a=1000000;
while (a>0)
bar();
}
void bar()
{
char buf[16];
int i;
/* Question (4) */
for (i=0; i<16; i++) {
buf[i] = 'a';
}
}
How do explain accounting requirement for propose investment
: How do explain the accounting requirements for the proposed investment. In particular you should explain how the profit of Queen Ltd would be recognised
|
Find how would define fixed and variable product costs
: Find How would define fixed and variable product costs? How are costs used in determining the contribution margin of different products manufactured and sold?
|
Develop understanding of cultural role of the dramatic arts
: Plays are meant to be performed, rather than read. The purpose of dramatic arts often extends far beyond the words written on a page; staging, lighting.
|
How do compute the first production department cost
: How do Compute the first production department's cost of ending work in process inventory for materials, conversion, and in total for May.
|
IST 543 Foundations of Software Security Assignment
: IST 543 Foundations of Software Security Assignment Help and Solution, Penn State University - Assessment Writing Service - How many bytes does the string
|
Despite integration of athletes of all genders
: Despite the integration of athletes of all genders and races into sport, there are still challenges. With this in mind, and based on your sports interests
|
Summarize the key points of strategic family therapy
: Although structural therapy and strategic therapy are both used in family therapy, these therapeutic approaches have many differences in theory and application.
|
Find overall research experience from individual assignment
: Reflections on your overall research experience from the individual assignment (activity based costing system) What was enjoyable, what was difficult.
|
Find what insights did gain and what had learnt
: Reflections on what you learned from the individual assignment, including the relevance of Active based costing system to businesses.
|