I am doing something wrong here. I get a message saying
Use of \@array doesn't match its definition. `\@ifnextchar ... \reserved@d =#1\def
\reserved@a { #2}\def \reserved@b {#3}\f... l.108 ...tabular}{|c|>{\centering}p{3cm}
|c|c|l|c|}.
Here is a complete code
\documentclass{exam}
\usepackage{textcomp, booktabs}
\begin{document}
\section*{\large \textrecipe}
\begin{tabular}{|c|>{\centering}p{3cm}|c|c|l|c|}
\toprule
Sr No & Drug & Dose & frequency & Duration & Remark \midrule
1 & & & -~~ -~~ - & x & before/with/after meals, at night \midrule
\hline
2 & & & -~~ -~~ - & x & before/with/after meals, at night \\
\hline
3 & & & -~~ -~~ - & x & before/with/after meals, at night \\
\hline
4 & & & -~~ -~~ - & x & before/with/after meals, at night \\
\hline
5 & & & -~~ -~~ - & x & before/with/after meals, at night \\
\hline
6 & & & -~~ -~~ - & x & before/with/after meals, at night \\
\hline
7 & & & -~~ -~~ - & x & before/with/after meals, at night \bottomrule
\end{tabular}
\end{document}
array
package for the extended.>{...}
syntax