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

1 answer 212 views
212 views asked Aug 10, 2019 by avibootz
1 answer 224 views
1 answer 73 views
1 answer 112 views
112 views asked Jul 12, 2023 by avibootz
...