I have a little problem getting my code to work because when I run the program it allows me to enter in the numbers, but after doing so it immediately quits.

Here's the problem: Write two functions:
A function named sum which takes two integer values as arguments, and returns their sum.
A main function which asks the user for two integer values, passes the two values to the sum function, then prints the two values and their sum.
The main function then again asks the user for two integer values, passes the two values to the sum function, then prints the two values and their sum.

Code:
#include <stdio.h>

void getData (int* a, int* b);
int add (int a, int b);
void printRes (int a, int b, int sum);

int main (void)
{
   int a;
   int b;
   int sum = 0;
   
   getData (&a, &b);
   sum = add (a, b);
   printRes(a, b, sum);
   return 0;
}

void getData (int* a, int* b)
{
     printf("\nPlease enter the first integer number: ");
     scanf("%d", a);
     printf("\nPlease enter the second integer number: ");
     scanf("%d", b);
     return;
     }
     
     int add (int a, int b)

{
     int sum;
     
     sum = a + b;    
     return sum;
}
void printRes (int a, int b, int sum)
{
   printf("%d + %d = %d\n", a, b, sum);
   return;
}
If anyone could help me dissect the problem that would be greatly appreciated since the assignment is due today...