Simple program to insert values in a linked list
I want to know if this part where I insert the values stored in each node can be done in an shorter way


Definitely it can be done in a shorter way!


the problem is that in your code you are taking the pain to do the same thing twice while inserting. in the for loop :

for (i=0;i&lt;N;i++) 
{
    if (i&lt;N-1)
    {

        //here
        int temp;
        printf("Insert value stored into the node %d:\n",i+1);
        scanf("%d",&amp;temp);
        Node_c-&gt;value=temp;
        // to here

        Node_c-&gt;link=malloc(sizeof(Node));
        Node_c=Node_c-&gt;link;

    } 
    else if (i==N-1) //Note: it must be == operator not =
    { 

        //the same thing again from here 
        int temp;
        printf("Insert value stored into the node %d:\n",i+1);
        scanf("%d",&amp;temp);
        Node_c-&gt;value=temp;
        //to here

        Node_c-&gt;link=NULL;

} 

The below part appears twice in your insertion logic :

    int temp;
    printf("Insert value stored into the node %d:\n",i+1);
    scanf("%d",&amp;temp);
    Node_c-&gt;value=temp;

Now can we avoid writing twice the same thing? 


... Definetely you can write that logic only once and change your insertion logic to :

int i;
Node * Node_c=head;
for(i=0;i&lt;N;i++)
{
    if(i!=0) //not required once again for head
    {
        Node_c-&gt;link=malloc(sizeof(Node));
        Node_c=Node_c-&gt;link;
    }

    //you don't require temp as you can directly access Node_c-&gt;value
    printf("Insert value stored into the node %d:\n",i+1);
    scanf("%d",&amp;Node_c-&gt;value);

    Node_c-&gt;link=NULL;

}


the logic is quite simple to understand :


first we create a memory for a node and save it's  address to the link of previous node(we don't if its a head node as it's already allocated with memory in the before part of the code and it has no previous nodes to be linked with)
then we take in the value and store in the value member of structure Node_c
then we point the link member of the structure Node_c to NULL... this goes on for N number of times