122k views
0 votes
Write a statement that defines a double variable named result, initialized with the value 6.759.

1 Answer

2 votes

Answer:

"double result=6.759;" is the correct answer for the above question.

Step-by-step explanation:

  • In c-programming language, the double is a data type which stores the decimal value up to 6 decimal point.
  • This data type takes 8 bytes space in memory when it is used in the c-programming language.
  • When the user wants to declare the double data type, then he should need to declare by the help of the following syntax-- double variable_name_or _identifier_name;
  • When the user wants to declare the double data type and initialize the value on its then he can do this with the help of the following syntax--double variable_name_or _identifier_name= value_which_needs_to_store;
  • The above question asked the one-line statement which declares the result variable of double data type and initializes the "6.759" value on its then he can do this by the help of "double result=6.759;" statement which is described above. Hence the answer is "double result=6.759;".

User Jose Rui Santos
by
5.0k points