Forms of Input and Output

Here is one way to enter a particular expression.
In[1]:=
Click for copyable input
Out[1]=
Here is another way to enter the same expression.
In[2]:=
Click for copyable input
Out[2]=
With a notebook front end, you can also enter the expression directly in this way.
In[3]:=
Click for copyable input
Out[3]=

The Wolfram Language allows you to output expressions in many different ways.

In Wolfram System notebooks, expressions are by default output in StandardForm.
In[4]:=
Click for copyable input
Out[4]=
OutputForm uses only ordinary keyboard characters and is the default for textbased interfaces to the Wolfram Language.
In[5]:=
Click for copyable input
Out[5]//OutputForm=
InputForm yields a form that can be typed directly on a keyboard.
In[6]:=
Click for copyable input
Out[6]//InputForm=
FullForm shows the internal form of an expression in explicit functional notation.
In[7]:=
Click for copyable input
Out[7]//FullForm=
FullForm[expr]the internal form of an expression
InputForm[expr]a form suitable for direct keyboard input
OutputForm[expr]a twodimensional form using only keyboard characters
StandardForm[expr]the default form used in Wolfram System notebooks

Some output forms for expressions.

Output forms provide textual representations of Wolfram Language expressions. In some cases these textual representations are also suitable for input to the Wolfram Language. But in other cases they are intended just to be looked at, or to be exported to other programs, rather than to be used as input to the Wolfram Language.

TraditionalForm uses a large collection of ad hoc rules to produce an approximation to traditional mathematical notation.
In[8]:=
Click for copyable input
Out[8]//TraditionalForm=
TeXForm yields output suitable for export to TeX.
In[9]:=
Click for copyable input
Out[9]//TeXForm=
MathMLForm yields output in MathML.
In[10]:=
Click for copyable input
Out[10]//MathMLForm=
CForm yields output that can be included in a C program. Macros for objects like Power are included in the header file .
In[11]:=
Click for copyable input
Out[11]//CForm=
FortranForm yields output suitable for export to Fortran.
In[12]:=
Click for copyable input
Out[12]//FortranForm=
TraditionalForm[expr]traditional mathematical notation
TeXForm[expr]output suitable for export to
MathMLForm[expr]output suitable for use with MathML on the web
CForm[expr]output suitable for export to C
FortranForm[expr]output suitable for export to Fortran

Output forms not normally used for Wolfram Language input.

"Low-Level Input and Output Rules" discusses how you can create your own output forms. You should realize however that in communicating with external programs it is often better to use the Wolfram Symbolic Transfer Protocol (WSTP) to send expressions directly than to generate a textual representation for these expressions.

Exchange textual representations of expressions.
Exchange expressions directly via WSTP.

Two ways to communicate between the Wolfram System and other programs.