Initial commit
This commit is contained in:
BIN
Labs/Lab2/Lab2.pdf
Normal file
BIN
Labs/Lab2/Lab2.pdf
Normal file
Binary file not shown.
BIN
Labs/Lab2/Screenshot 2021-09-22 104403.png
Normal file
BIN
Labs/Lab2/Screenshot 2021-09-22 104403.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
BIN
Labs/Lab2/Screenshot 2021-09-22 112551.png
Normal file
BIN
Labs/Lab2/Screenshot 2021-09-22 112551.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
Labs/Lab2/Screenshot 2021-09-22 112627.png
Normal file
BIN
Labs/Lab2/Screenshot 2021-09-22 112627.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
Labs/Lab2/Screenshot 2021-09-22 114744.png
Normal file
BIN
Labs/Lab2/Screenshot 2021-09-22 114744.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
Labs/Lab2/Screenshot 2021-09-22 114909.png
Normal file
BIN
Labs/Lab2/Screenshot 2021-09-22 114909.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
Labs/Lab2/Shoebottom_Isaac_Lab2.zip
Normal file
BIN
Labs/Lab2/Shoebottom_Isaac_Lab2.zip
Normal file
Binary file not shown.
BIN
Labs/Lab2/Shoebottom_Isaac_Lab_2.docx
Normal file
BIN
Labs/Lab2/Shoebottom_Isaac_Lab_2.docx
Normal file
Binary file not shown.
BIN
Labs/Lab2/Shoebottom_Isaac_Lab_2.pdf
Normal file
BIN
Labs/Lab2/Shoebottom_Isaac_Lab_2.pdf
Normal file
Binary file not shown.
26
Labs/Lab2/lab2.c
Normal file
26
Labs/Lab2/lab2.c
Normal file
@ -0,0 +1,26 @@
|
||||
/* p1.c */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int g1(int a, int b){
|
||||
int c = (a + b) * b;
|
||||
printf("g1: %d %d %d \n", a, b, c);
|
||||
printf("a's address is %p, b's address is %p, c's address is %p\n", &a, &b, &c);
|
||||
return c;
|
||||
}
|
||||
|
||||
int g2(int a, int b){
|
||||
int c = g1(a + 3, b - 11);
|
||||
printf("g2: %d %d %d \n", a, b, c);
|
||||
printf("a's address is %p, b's address is %p, c's address is %p\n", &a, &b, &c);
|
||||
return c - b;
|
||||
}
|
||||
|
||||
int main (int argc, char** argv){
|
||||
int a = 5;
|
||||
int b = 17;
|
||||
int c = g2(a - 1, b * 2);
|
||||
printf("main: %d %d %d \n", a, b, c);
|
||||
printf("a's address is %p, b's address is %p, c's address is %p\n", &a, &b, &c);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Reference in New Issue
Block a user