Search
 
SCRIPT & CODE EXAMPLE
 

C

c programming itoa() example

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
int main()
{
    int a=54325;
    char buffer[20];
    itoa(a,buffer,2);   // here 2 means binary
    printf("Binary value = %s
", buffer);
 
    itoa(a,buffer,10);   // here 10 means decimal
    printf("Decimal value = %s
", buffer);
 
    itoa(a,buffer,16);   // here 16 means Hexadecimal
    printf("Hexadecimal value = %s
", buffer);
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: string compare c 
C :: c float remove trailing 0 
C :: va_list in c 
C :: format bool c 
C :: c output 
C :: svg not loading in chrome 
C :: how to combine strings in c 
C :: c execute shell command 
C :: write array of char to file in c 
C :: insertion sort c 
C :: c print sizeof char 
C :: Hello world in C programming language 
C :: c char to lower case 
C :: c float 
C :: memcpy c 
C :: C Arithmetic Operators 
C :: C program to check whether character is lowercase or not using ASCII values 
C :: 2 dimensional array in c 
C :: Program to input and print array elements in c 
C :: c convert string to size_t 
C :: how to change background color in c programming 
C :: rfid rc522 code 
C :: ecrire programme en C une fonction remplir tableau et un fonction inverser 
C :: pointer arithmetic on Arrray in c 
C :: esp32 dhcp server 
C :: fwrite c 
C :: c defined value sum 
C :: *= in c 
C :: swap using third variable 
C :: como somar em C 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =