1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Black_prince [1.1K]
4 years ago
15

Which C99 function can be used to convert a string to a double?

Computers and Technology
1 answer:
nordsb [41]4 years ago
5 0

Answer:

atof

Explanation:

atof function is used to convert a string to a double.

It takes a single parameter of type const char * and returns a double value.

The function signature is: double atof (const char* str);

In order to use this function in the code, you need to include the header file <stdlib.h>

For example:

#include <stdio.h>

#include <stdlib.h>  

int main()

{

   char str[5] = "0.01";

   double d = atof(str);

   printf("Value = %f\n", d);

   return 0;

}

You might be interested in
Write a method named numUnique that accepts a sorted array of integers as a parameter and that returns the number of unique valu
SVEN [57.7K]

Answer:

The method in Java is as follows:

public static int numUnique(int list[]) {  

int unique = 1;  

for (int i = 1; i < list.length; i++) {  

 int j = 0;  

 for (j = 0; j < i; j++) {

  if (list[i] == list[j])  

   break;  

 }

 if (i == j)  

  unique++;  

}  

return unique;  

}  

Explanation:

This line defines the numUnique method

public static int numUnique(int list[]) {

This initializes the number of unique elements to 1

int unique = 1;  

This iterates through the list

for (int i = 1; i < list.length; i++) {

The following iteration checks for unique items

 int j = 0;  

<em>  for (j = 0; j < i; j++) { </em>

<em>   if (list[i] == list[j]) </em><em>If current element is unique, break the iteration</em><em> </em>

<em>    break;  </em>

<em>  } </em>

 if (i == j)  

  unique++;  

}

This returns the number of unique items in the list

return unique;  

}  

3 0
3 years ago
Which word goes with "meals
valentina_108 [34]

Answer:

Food

Explanation:

7 0
3 years ago
Read 2 more answers
The keyboard and the mouse are types of BLANK devices
Stolb23 [73]
Input is the right answer.hope it helps.
3 0
3 years ago
Read 2 more answers
Fill in the blank: In a Word chart, text that describes the data represented in a chart and that is typically displayed on the r
Triss [41]

Answer:

Data bar

Explanation:

8 0
3 years ago
Which of the following is NOT one of the MOST common uses of Twitter?
I am Lyosha [343]
Which of the following is NOT one of the MOST common uses of Twitter? b . Making a business contact.
5 0
3 years ago
Other questions:
  • When does the VB.NET programming environment start to operate?
    10·1 answer
  • Rite a c++ function, smallestindex, that takes as parameters an int array and its size and returns the index of the first occurr
    15·1 answer
  • What symbol do you use to choose a feature for your notes on Notion?
    8·1 answer
  • To make an exact copy of an existing slide, from the new slide gallery
    5·1 answer
  • Write the definition of a function named timeOnHighway that receives three parameters, all of type double: mileEndingPoint , mil
    14·1 answer
  • PLEASE HELPP!!!!!
    14·1 answer
  • Interface elements include but are not limited to:
    8·1 answer
  • . Is it conceivable to design a secure operating system for these computer systems? Give arguments for and against.
    6·1 answer
  • Choose the item which best describes the free frame list. 1. a per process data structure of available physical memory 2. a glob
    7·1 answer
  • 5. What are some situations where you might find it useful to use the “!” symbol in a program?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!