For the following C code (for swapping two numbers) I am getting the \"conflicting types\" error for swap function:
swap
#include #includ
You need to declare swap before using it. For example, put swap above main, or add a prototype for swap like this:
void swap(void *,void *,int); int main ()
Incidentally main should be int not void and usually it returns the value zero, unless there is an error.
main
int
void