Search
 
SCRIPT & CODE EXAMPLE
 

C

casting an int to a char in c

Use ASCII chart.
int i=65;
char ch;
ch= (char)i;
printf("Expected value of ch: A. This value is found by using a ASCII chart");
Comment

c int to char

int i = 7;
char str[256];

itoa(i,str,10); //Base 10

char c = str[0]; // c="7"
Comment

int to char in c

c = i +'0';
Comment

PREVIOUS NEXT
Code Example
C :: C scanf() to read a string 
C :: c programming how to force stop the programme 
C :: c fopen 
C :: prime number c program 
C :: try and catch in rust 
C :: hello word in c 
C :: c read file content 
C :: print variable adress c 
C :: identifier bool is undefined in c 
C :: mount cifs 
C :: c strstr 
C :: int to double c 
C :: bubble sort in c 
C :: how compress string in c 
C :: mongo connect db 
C :: transfer function exponent matlab 
C :: best approach c menu terminal 
C :: lxc Failed to load config for 
C :: c structure with pointer 
C :: command args c 
C :: c comment 
C :: windows make clean 
C :: getchar declaration in c 
C :: c sjf 
C :: solutionadda 
C :: run steam as root 
C :: how to pprint otu a double in in c 
C :: libreoffice reference cell in different sheet with sheet name with space 
C :: ESP32 timerBegin(0, cpuClock, true); 
C :: Categorize students according to their marks 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =