Segmentatin fault

#include<stdio.h>
//call by reference
void increment(int a)
{
//++(*a)
printf("%d",a);
int *p;
 p = a;

 printf("%d",*p);
}
int main()
{
int a=10;
increment(&a);
printf("%d",a);
 return 0;
}

when i am trying some code in c i got this output segmentation fault can anyone help me why i got this error

இந்த வரி

void increment(int *a)

என்று இருக்க வேண்டும்

இந்த வரியில் தாங்கள் எதிர்பார்க்கும் விடை வராமல் போக வாய்ப்பு உள்ளது.

இந்த வரி கமண்ட் செய்யப்பட்டுள்ளதால் increment() பங்ஷன் அர்தமற்று போயிற்று.

Why not I do that copy the memory address in a variable and declare a pointer and assign a memory address value into pointer

#include <stdio.h>

int main(int argc, char *argv[]) {
	int a;
	int *b;
	printf("sizeof(a)=%d\n", sizeof(a));
	printf("sizeof(b)=%d\n", sizeof(b));
	return 0;
}

தங்கள் கேள்விக்கு விடை இங்கே உள்ளது.