Question: What is the output of this code???? #include #include int uig; int ig = 5; int func() { return 0; } int main() { int

What is the output of this code????

#include #include int uig; int ig = 5; int func() { return 0; } int main() { int local; int *ptr; ptr = (int *) malloc(sizeof(int)); printf("An address from BSS: %p ", &uig); printf("An address from Data segment: %p ", &ig); printf("An address from Code segment: %p ", &func); printf("An address from Stack segment: %p ", &local); printf("An address from Heap: %p ", ptr); printf("Another address from Stack: %p ", &ptr); free(ptr); return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!