-
Notifications
You must be signed in to change notification settings - Fork 6
/
lab14-01.c
executable file
·39 lines (31 loc) · 1.16 KB
/
lab14-01.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
29
30
31
32
33
34
35
36
37
38
39
/** lab14-01.c
* ===========================================================
* Name:
* Section:
* Project: Lab 14
* Purpose: Introduction to Pointers
* ===========================================================
*/
#include <stdio.h>
#include <math.h>
#include "lab14functs.h"
int main() {
// These are the two integers we will be swapping
int aNum;
int bNum;
// This is where we get the integer values from the user
printf("Please enter your class year: ");
scanf("%d", &aNum);
printf("Please enter your favorite integer: ");
scanf("%d", &bNum);
// Print out the original contents of aNum and bNum (before swapping)
printf("\nOriginal Numbers:\n");
printf("aNum = %d, bNum = %d\n\n", aNum, bNum);
// TODO: Part 1 - Uncomment this code when you have implemented swapPassByValue
//swapPassByValue(aNum, bNum);
//printf("from main: aNum = %d, bNum = %d\n\n", aNum, bNum);
// TODO: Part 2 - Uncomment this code when you have implemented swapPassByReference
//swapPassByReference(&aNum, &bNum);
//printf("from main: aNum = %d, bNum = %d\n\n", aNum, bNum);
return 0;
}