\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[francais,french]{babel}
%\usepackage[babel=true,kerning=true]{microtype}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{lmodern}
\usepackage[french]{cleveref}
%\usepackage{showkeys}

\usepackage[bloc,francais]{automultiplechoice}
\makeatletter
\def\Nsujet{\the\AMCid@etud}
\makeatother

\begin{document}
\input{groupe.tex}
\onecopy{3}{
\champnom{NOM :}\vspace*{1ex}

\AMCcodeH{code}{4}\vspace*{1ex}

\melangegroupe{cours}\restituegroupe{cours}

%%%%%%%%%%%%%%%
Liste des numéros de questions :

\begin{tabular}{|c|c|c|c|c|}
\hline 
Numéro de sujet & Référence & Numéro de question & page & AMC\{q:référence\}\\ 
\hline 
\Nsujet & dipole & \AMCref{dipole} & \AMCpageref{dipole}&\AMCstudentlabel{q:dipole} \\ 
\hline 
\Nsujet & exercice & \AMCref{exercice} & \AMCpageref{exercice} & \AMCstudentlabel{q:exercice}\\ 
\hline 
\Nsujet & reflexion & \AMCref{reflexion} & \AMCpageref{reflexion}&\AMCstudentlabel{q:reflexion}\\ 
\hline 
\Nsujet & cours & \AMCref{cours} & \AMCpageref{cours}&\AMCstudentlabel{q:cours}  \\ 
\hline 
\Nsujet & raisonnement & \AMCref{raisonnement} & \AMCpageref{raisonnement}&\AMCstudentlabel{q:raisonnement} \\ 
\hline 
\Nsujet & f & \AMCref{f} & \AMCpageref{f} &\AMCstudentlabel{q:f} \\ 
\hline 
\Nsujet & g & \AMCref{g} & \AMCpageref{g}&\AMCstudentlabel{q:g} \\ 
\hline 
\end{tabular}\medskip

Classement avec cleveref : 

dipole - exercice - reflexion - cours - raisonnement - f - g : 
\cref{\AMCstudentlabel{dipole},\AMCstudentlabel{exercice},\AMCstudentlabel{reflexion},\AMCstudentlabel{cours},\AMCstudentlabel{raisonnement},\AMCstudentlabel{f},\AMCstudentlabel{g}}

dipole : \cref{\AMCstudentlabel{dipole}}

dipole - exercice : \cref{\AMCstudentlabel{dipole},\AMCstudentlabel{exercice}}

dipole - exercice - reflexion :\cref{\AMCstudentlabel{dipole},\AMCstudentlabel{exercice},\AMCstudentlabel{reflexion}}

\bigskip
Test avec les pages :

\cpageref{\AMCstudentlabel{dipole},\AMCstudentlabel{exercice},\AMCstudentlabel{reflexion},\AMCstudentlabel{cours},\AMCstudentlabel{raisonnement},\AMCstudentlabel{f},\AMCstudentlabel{g}}

\cpageref{\AMCstudentlabel{dipole},\AMCstudentlabel{exercice},\AMCstudentlabel{reflexion},,\AMCstudentlabel{cours},\AMCstudentlabel{raisonnement},\AMCstudentlabel{f},\AMCstudentlabel{g}}

\cpageref{\AMCstudentlabel{dipole},\AMCstudentlabel{exercice},\AMCstudentlabel{reflexion},,\AMCstudentlabel{cours},\AMCstudentlabel{raisonnement},,\AMCstudentlabel{f},\AMCstudentlabel{g}}

\cpageref{\AMCstudentlabel{dipole},\AMCstudentlabel{exercice},\AMCstudentlabel{reflexion},\AMCstudentlabel{cours},\AMCstudentlabel{raisonnement},,\AMCstudentlabel{f},\AMCstudentlabel{g}}




}
\end{document}