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 420 views
420 views asked Aug 3, 2020 by avibootz
1 answer 308 views
308 views asked Aug 10, 2019 by avibootz
1 answer 267 views
267 views asked Aug 9, 2019 by avibootz
1 answer 255 views
2 answers 697 views
697 views asked Aug 8, 2019 by avibootz
2 answers 321 views
...