title: I am facing segmentation fault(code dumped)
body: <p>I wrote this simple code as a beginner while practicing 'C' Language. The aim here is to measure the perimeter and area of the inputted values. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main()
  {
      double width;
      double height;
      double perimeter;
      double area;
  
      printf("Enter the Width of Rectangle:");
      scanf("%f", width);
  
      printf("Enter the height of the Rectangle:");
      scanf("%f", height);
  
      perimeter = 2*(width+height);
  
      area = width*height;
  
      printf("Perimeter of the Rectangle=%f\n", perimeter);
      printf("Area of the Rectangle=%f\n", area);
      printf("Hence the problem is solved");
  
      return 0;
  }
  </code></pre>
  
  <p>When I compile code. It gives me this specific error every time.</p>
  
  <pre><code>D:\Mandeep\prog pro\Learning C\Learning_1.c||In function 'main':|
  
  D:\Mandeep\prog pro\Learning C\Learning_1.c|12|warning: format '%f' expects argument of type 'float *', but argument 2 has type 'double *' [-Wformat=]|
  
  D:\Mandeep\prog pro\Learning C\Learning_1.c|15|warning: format '%f' expects argument of type 'float *', but argument 2 has type 'double' [-Wformat=]|
  
  D:\Mandeep\prog pro\Learning C\Learning_1.c|15|warning: 'height' is used uninitialized in this function [-Wuninitialized]|
  </code></pre>
  
  <p>Later, when I run the program it shows me <strong>segmentation error</strong> after inputting the "width of the rectangle".</p>