answersLogoWhite

0


Best Answer

The 'atoi' command is actually a function. It is not peculiar to Linux; it can be found in many high-level programming languages, most notably C, where it has the following signature:

int atoi (const char* str);

The 'atoi' name is simply a contraction of 'ASCII to integer'. That is; you use the function to convert a null-terminated ASCII string to an integer. The string argument (str) must represent some base 10 numeric symbol. That is, "42", "-1" and "3.14" are all numeric strings but the word "ten" is not. Leading whitespace is ignored by the function.

There are also two other versions of the function which convert to long and float:

long atol (const char* str);

float atof (const char* str);

To use these functions you need to include the <stdlib.h> header in C (or <cstdlib> in C++).

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you use atoi command in Linux?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Where can one gain more information about how to use the Linux terminal?

At the command prompt, type 'man [command]' (removing the brackets and substituting the command for which you need information).


What command in Linux do you use to copy files?

cp.


To move to the root directory use the command?

For Unix/Linux, use the command 'cd /' For Windows, you can also use the same command or 'cd \'


What does the k command do in Linux?

k is not a standard command in Linux.


What command do you use to rename the old system file instead of copying it?

For Linux, use the 'mv' command, which is a rename


What command prompt would you use in Linux to see filesystems in use?

mount


How do you use less command in Linux?

Viewing a file:"less [filename]"viewing the standard output of a command:"[command] | less"


What does the c99 command do in Linux?

The c99 command is a wrapper program that actually calls 'cc'. This is the standard c compiler for Linux. Since other Unix based systems use a c99 command to call the compiler with the 1999 standards there is a similar command to do the same thing under Linux.


What command in Linux do you use to shut the system down?

shutdown-hnow


What is the command to turn on Linux?

There is no such command. Obviously, in order to enter a command into the prompt, Linux must already be on.


How do you change the executable bit in Linux for a .exe file?

chmod +x is the command to set the executable flag in Linux but, Linux does not use exe files.


Which Linux command is equivalent to Windows' MD command?

In a Linux terminal, the command to create a new directory is: mkdir .