Finding the shortest path (between source and destination) with the least number of edges I wrote a program which finds the shortest path between a source and a destination in a graph, so that the path will be to one with th least number of edges. In order to write it, I used Dijkstra's algorithm with several modifications. 

Is there any way to improve or modify my code?

#include&lt;stdio.h&gt;
#include&lt;string.h&gt;
#define INFINITY 9999
#define n 5
#define s 0
#define d 4

void Dijkstra(int Graph[n][n], int _n,int _s, int _d);

int main()
{
    int Graph[n][n]={{0,6,5,1,INFINITY},{6,0,3,INFINITY,INFINITY},{5,3,0,2,5},{1,INFINITY,2,0,6},{INFINITY,INFINITY,5,6,0}};

    Dijkstra(Graph,n,s,d);
    getchar();
    return 0;

}

void Dijkstra(int Graph[n][n], int _n,int _s, int _d)
{

    int distance[n],pred[n] ,visited[n],edge[n]={0},count,mindistance,nextnode=_s,i,j;

    //pred[] stores the predecessor of each node
    //count gives the number of nodes seen so far
    //edge[] stores the number of edged of every vertex's shortest path
      from the source

    //initialize pred[],distance[] and visited[]
    for(i=0;i&lt;n;i++)
    {
        distance[i]=Graph[_s][i];
        pred[i]=_s;
        visited[i]=0;
        if(distance[i]&gt;0 &amp;&amp; distance[i]&lt;INFINITY)
            edge[i]++;        //the neighbours of the source 
    }

    distance[_s]=0;
    visited[_s]=1;
    count=1;

    while(count&lt;n-1 &amp;&amp; nextnode!=_d )
    {
        mindistance=INFINITY;

        //nextnode gives the node at minimum distance
        for(i=0;i&lt;n;i++)
            if(distance[i]&lt;mindistance &amp;&amp; !visited[i])
            {
                mindistance=distance[i];
                nextnode=i;

            }

            //check if a better path exists through nextnode            
            visited[nextnode]=1;

            if (nextnode!=_d)
            for(i=0;i&lt;n;i++)
                if(!visited[i])
                {
                    if(mindistance+Graph[nextnode][i]&lt;distance[i] )
                    {
                        distance[i]=mindistance+Graph[nextnode][i];

                        pred[i]=nextnode;
                        edge[i]=edge[nextnode]+1;

                    }

                    if(mindistance+Graph[nextnode][i]==distance[i] )
                    {
                        if(edge[i] &gt;= edge[nextnode]+1)

                        {pred[i]=nextnode;

                        edge[i]=edge[nextnode]+1;
                        }
                    }
                }

                count++;
    }

    //print the path 

    i=nextnode;

printf("\n%d",_d);

j=_d;
do
{
  j=pred[j];
  printf("&lt;-%d",j);
} while(j!=_s);

}
Naming
#define n 5
#define s 0
#define d 4

We normally use ALL_CAPS for preprocessor macros, to warn readers.
void Dijkstra(int Graph[n][n], int _n,int _s, int _d);

I'd prefer lower case for the function name and arguments (PascalCase is conventionally used for typedefs).  The identifiers beginning with underscore are risky, because they are reserved for use by your compiler and standard library; also they don't tell us anything about their meaning.  n seems to be the number of nodes; are s and d the start and target?
Separate the work from the I/O
At the moment, the Dijkstra() function both finds a route and prints it.  Well-structured code separates these two activities, so you can do other things with the route.  You'll need to define a suitable data structure to return for the route - you can start by filling in an array (remember to check bounds); perhaps move to a linked list or an allocated array.
Flexibility
At some stage, you'll want to move to supporting graphs of arbitrary size.  For that, you're going to need to change n from constant to variable, and allocate and free storage for the distances.  That will be worthy of its own review when you reach that stage.