The following code displays a linking error when compiled using Turbo C IDE
I have used the swap function in this block of code to learn from a C tutorial.
It displays a single error saying undefined symbol '_swap' in module PROG1.C ( filename in my computer )
#include <stdio.h>
/* function declaration */
void swap(int x, int y);
int main () {
/* local variable definition */
int a = 100;
int b = 200;
printf("Before swap, value of a : %d\n", a );
printf("Before swap, value of b : %d\n", b );
/* calling a function to swap the values */
swap(a, b);
printf("After swap, value of a : %d\n", a );
printf("After swap, value of b : %d\n", b );
return 0;
}