What is the output of the following program?
#include <stdio.h>
int main()
{
  double a, b, c;
 
  printf("Enter two numbers\n");
  scanf("%lf%lf", &a, &b);

  c = a + b;
 
  printf("%.1lf\n", c);
  printf("%.2lf\n", c);
  printf("%.3lf\n", c);
  printf("%.4lf\n", c);
  printf("%.5lf\n", c);
  printf("%.6lf\n", c);
  printf("%.7lf\n", c);
  printf("%.8lf\n", c);

  return 0;
}

Posted on by