Question:

Can cstrings be interchanged with integers?

by  |  earlier

0 LIKES UnLike

What is the best way to switch from chars to integers?

 Tags:

   Report

2 ANSWERS


  1. There is a native function to do this.

    #include <stdlib.h>

    int atoi(char *string) Convert string to an integer value.


  2. If you display a char as an integer it gives the ASCII code of the char and vice versa.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.