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 308 views
308 views asked Aug 3, 2020 by avibootz
1 answer 212 views
212 views asked Aug 10, 2019 by avibootz
1 answer 175 views
175 views asked Aug 9, 2019 by avibootz
1 answer 166 views
2 answers 565 views
565 views asked Aug 8, 2019 by avibootz
2 answers 177 views
...