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 425 views
425 views asked Aug 3, 2020 by avibootz
1 answer 313 views
313 views asked Aug 10, 2019 by avibootz
1 answer 273 views
273 views asked Aug 9, 2019 by avibootz
1 answer 260 views
2 answers 703 views
703 views asked Aug 8, 2019 by avibootz
2 answers 325 views
...