How to print character from ASCII value in C++

1 Answer

0 votes
#include <iostream>

int main() {
    std::cout << (char)97 << "\n";
    
    int n = 68;
    std::cout << (char)n;
}
 
 
 
 
 
/*
run:
 
a
D
 
*/

 



answered Sep 20, 2023 by avibootz

Related questions

1 answer 104 views
1 answer 151 views
1 answer 196 views
1 answer 212 views
1 answer 171 views
1 answer 176 views
...