Please fill in the blanks for C   /* This program will ask the user to input the values. All code will be in main(). */   /*Task 3: Pointer-to-double*/ #include int main() {             //Declare 2 double variables             double d1, d2;                           __1__ __2__; //Declare 1 pointer-to-double pd             __3__ = __4__;  //point to first double d1               //Ask user for value of d1             printf("Enter value for d1 double variable :");             scanf("%lf", &(__5__)); //save to d1 using pointer pd               //Printing d1 in 2 ways, round to 2 decimal places             printf("Printing d1 using d1: __6__\n", __7__);             printf("Printing d1 using pd: __8__\n", __9__);               //Point pd to d2             __10__ = __11__;               //Ask user for value of d2             printf("Enter value for d2 double variable :");             scanf("__12__", __13__(__14__)); //save to d2 using pointer pd               //Printing d2 in 2 ways, round to 2 decimal places             printf("Printing d2 using d2: __15__\n", __16__);             printf("Printing d2 using pd: __17__\n", __18__);             return 0; }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please fill in the blanks for C

 

/* This program will ask the user to input the values. All code will be in main(). */

 

/*Task 3: Pointer-to-double*/

#include<stdio.h>

int main()

{

            //Declare 2 double variables

            double d1, d2;

 

           

            __1__ __2__; //Declare 1 pointer-to-double pd

            __3__ = __4__;  //point to first double d1

 

            //Ask user for value of d1

            printf("Enter value for d1 double variable :");

            scanf("%lf", &(__5__)); //save to d1 using pointer pd

 

            //Printing d1 in 2 ways, round to 2 decimal places

            printf("Printing d1 using d1: __6__\n", __7__);

            printf("Printing d1 using pd: __8__\n", __9__);

 

            //Point pd to d2

            __10__ = __11__;

 

            //Ask user for value of d2

            printf("Enter value for d2 double variable :");

            scanf("__12__", __13__(__14__)); //save to d2 using pointer pd

 

            //Printing d2 in 2 ways, round to 2 decimal places

            printf("Printing d2 using d2: __15__\n", __16__);

            printf("Printing d2 using pd: __17__\n", __18__);

            return 0;

}

 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Concept of pointer parameter
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education