title: How to input a string value of unknown length from console in Fortran?
body: <p>I want to take a string input and display it in Fortran.
  I tried doing this</p>
  <pre><code>program name
      implicit none
      
      character(:), allocatable :: a
      print *, &quot;Enter a name: &quot;
      read(*,*) a
      print *, &quot;Hello, &quot;, a, &quot;!&quot;
  
  end program name
  </code></pre>
  <p>But I get an error</p>
  <pre><code>Enter a name: 
  Coder
  
  Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
  
  Backtrace for this error:
  #0  0x657724a3
  #1  0x656ff44d
  #2  0x4010d0
  </code></pre>
  <p>How do i solve it?
  I just want to take someone's name and display it</p>