Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main() {
- const char* napis = "Hope"; // const char* napis = {'H', 'o', 'p', 'e'};
- const char* n = napis + 1; // od tego momentu wskaźnik typu char n wskazuje na pierwszy element tablicy napis (znak 'o'), przesunięcie napisu o 1 w prawo
- std::cout << *napis << std::endl; // zerowy element tablicy napis ('H')
- std::cout << n << std::endl; // ope
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement