How to convert unsigned int to char in C

1 Answer

0 votes
#include <stdio.h> 

int main(void) 
{ 
	unsigned int ui= 119;
	char ch = (char)ui;
	
	printf("%c\n", ch);
	
    return 0; 
} 
  
  
  
/*
run:
  
w

*/

 



answered Aug 9, 2019 by avibootz

Related questions

2 answers 311 views
311 views asked Aug 3, 2020 by avibootz
1 answer 218 views
218 views asked Aug 10, 2019 by avibootz
1 answer 180 views
180 views asked Aug 9, 2019 by avibootz
1 answer 171 views
2 answers 570 views
570 views asked Aug 8, 2019 by avibootz
2 answers 183 views
...