Q:

C Segmentation fault after adding a printf function. Works fine after commenting out

I get segmentation fault after executing this part of code.If i comment the first printf out,it works fine.Why does this happen?    
#include <stdio.h>

int Func (int *a){
    printf("%d\n",56 );
  printf("a is %d\n",*a );
  return 3;
}

int main(){
  int N, i, Planet, *a,junk;

    junk=scanf("%d", &N );
    *a = N;
    Planet = Func(a);
    printf("%d\n", Planet);
    return 0 ;
}

A:

Inside your main function, you defined the int *a pointer variable:

int main(){
  int N, i, Planet, *a,junk;

But then you dereferenced the pointer without having previously allocated any memory for it, nor setting it to point to something meaningful:

 *a = N;

This results in undefined behavior.
What you probably wanted is to make a point to N?
If so, this is the correct syntax:
a = &N;

Now you can use *a to write some content into N.

P.S.
As a general rule, I'd suggest you to declare one variable per line, and initialize pointers to NULL, e.g.:
int man() {
  int *a = NULL;
  ...

