-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathq013.cpp
More file actions
26 lines (19 loc) · 681 Bytes
/
q013.cpp
File metadata and controls
26 lines (19 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
int main(){
char character1 {'a'};
char character2 {'r'};
char character3 {'r'};
char character4 {'o'};
char character5 {'w'};
std::cout << character1 << std::endl;
std::cout << character2 << std::endl;
std::cout << character3 << std::endl;
std::cout << character4 << std::endl;
std::cout << character5 << std::endl;
//One byte in memory : 2^8 = 256 different values (0 ~ 255)
std::cout << std::endl;
char value = 65 ; // ASCII character code for 'A'
std::cout << "value : " << value << std::endl; // A
std::cout << "value(int) : " << static_cast<int>(value) << std::endl;
return 0;
}