These are my tables:
\section{The status of respondents}
\begin{center}
\begin{table}
\begin{tabular}{|l|l|l|l|}
\hline
\textbf{Sl.No.} & \textbf{Grouping of Respondents} & \textbf{Respondents} & \textbf{Percentage} \\
\hline
1 & Students & 38 & 76\% \\
\hline
2 & Employees & 12 & 24\% \\
\hline
& \textbf{Total} & 50 & 100\% \\
\hline
\end{tabular}
\caption{The status of respondents}
\end{table}
\end{center}
Among the 50 respondents 38 were students and 12 were employees.
\section{Some section}
\begin{center}
\begin{table}
\begin{tabular}{|l|l|l|l|}
\hline
\textbf{Sl.No.} & \textbf{Options} & \textbf{Respondents} & \textbf{Percentage} \\
\hline
1 & Getting it without making payment & 29 & 58\% \\
\hline
2 & Free to use it for any purpose & 10 & 20\% \\
\hline
3 & Free to distribute copies & 11 & 22\% \\
\hline
& \textbf{Total} & 50 & 100\% \\
\hline
\end{tabular}
\caption{Opinion about something}
\end{table}
\end{center}
When I compile into a pdf the tables appear together, and section names and other writing in the middle will appear separately after the tables.