forked from MarkAYoder/gitLearnFork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helloWorld.c
executable file
·29 lines (20 loc) · 879 Bytes
/
helloWorld.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
int bss_var; /* Uninitialized global variable */
int data_var = 1; /* Initialized global variable */
int main(int argc, char **argv)
{
void *stack_var; /* Local variable on the stack */
stack_var = (void *)main; /* Don't let the compiler */
/* optimize it out */
printf("Hello, World! Main is executing at %p\n", stack_var);
printf("This address (%p) is in our stack frame\n", &stack_var);
/* bss section contains uninitialized data */
printf("This address (%p) is in our bss section\n", &bss_var);
/* data section contains initializated data */
printf("This address (%p) is in our data section\n", &data_var);
printf("\n");
printf("Hi this is Mark A. Yoder\n");
// Add your name below here. Be sure it stills compiles
printf("Hi this is George F. Rung\n");
return 0;
}