How to write C programs

Question description

Write C programs for the following:
1. When a heat source is placed at x=0 at t=0 in an infinitely extended bar, the temperature distribution at (x, t) is expressed as
T(x,t)= (exp⁡(〖-x〗^2⁄4t))/(2√(2&πt))
Using GnuPlot,
Plot the temperature profile at t=0.1, 0.5, 1.0, 10.0 in one graph.
Describe procedure step by step how to export the data generated by C program to GnuPlot
2. Plot the result in both 2-D and 3-D graphics using GnuPlot (use the plot and splot commands).
Step by step, how to plot the result