Is atoi safe?



Is atoi safe?..

Answer / Shailendra Kumar Verma

atoi() (or atoll()) is a library function in C and C++ for converting strings to integers. It's not considered safe because it doesn't perform range checks or handle leading whitespace, sign inconsistencies, invalid characters, or overflow situations.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What are the five types of inheritance in C++?

1 Answers  


What is the difference between method and message?

5 Answers   HP,


what is importance of data sturture in a programming language?

22 Answers   L&T, TCS, Wipro,


what you know about c++?

1 Answers   IBS,


What is a block in c++?

1 Answers  


How is data hiding achieved in c++?

1 Answers  


Is java easier than c++?

1 Answers  


Give example of a pure virtual function in c++?

1 Answers  


What are the classes in c++?

1 Answers  


a class that maintains a pointer to an object that is programatically accessible through the public interface is known as?

2 Answers   CTS,


What is the use of this pointer in c++?

1 Answers  


Explain what are mutator methods in c++?

1 Answers  


Categories