How to convert long to char in C

1 Answer

0 votes
#include <stdio.h> 

int main(void) 
{ 
	long l = 97;
	char ch = (char)l;
	
	printf("%c\n", ch);
	
    return 0; 
} 
  
  
  
/*
run:
  
a
 
*/

 



answered Aug 8, 2019 by avibootz

Related questions

...