Questions tagged [itoa]

Questions about itoa function may have this tag. Despite being supported by some compilers, this function is not defined in ANSI-C and it is not part of C++.

94 questions
-3
votes
4 answers

Need to convert int to string using C

Hi I am pretty new to coding and I really need help. Basically I have a decimal value and I converted it to a binary value. Using this method long decimalToBinary(long n) { int remainder; long binary = 0, i = 1; while(n != 0) …
AverageEh
  • 11
  • 2
-4
votes
1 answer

Integer to char - cast and print:

I want to know the logic behind this programm and (char) cast. How does it work and how it is printing all the letters, symbols and numbers package ascii1 public class Ascii1 { public static void main(String[] args) { int i=1; …
sainadh
  • 11
  • 8
-5
votes
4 answers

Converting a [char] variable to [int] then back to [char]

I am using Visual C 6 I am trying to convert a character array (single-quotation) into an integer, then incrementing the value by 1, then storing the result back into a different character array.. But I keep getting an unexpected value when…
Ahmad
  • 12,336
  • 6
  • 48
  • 88
-6
votes
2 answers

C : how do I printf "the square root of 1764 is 42 and * in ascii"?

ok so I am learning C and I try to use simple functions to understand basics and here I am stuck whith a segmentation fault I can't manage to make this code working h3lp please thanks you all !!! #include #include int …
CnewB
  • 1
  • 3
1 2 3 4 5 6
7