| 1 | #include <stdio.h> |
| 2 | |
| 3 | int main(){ |
| 4 | |
| 5 | // POINTER ARITHMETIC USING INTEGER POINTER |
| 6 | // int a = 5; |
| 7 | // int *ptr = &a; |
| 8 | // printf("The address of a is %u\n", &a); |
| 9 | // printf("The address of a is %u\n", ptr); |
| 10 | // ptr++; |
| 11 | // printf("The value of ptr is %u\n", ptr); |
| 12 | |
| 13 | // POINTER ARITHMETIC USING CHARACTER POINTER |
| 14 | char a = 'A'; |
| 15 | char *ptr = &a; |
| 16 | printf("The address of a is %u\n", &a); |
| 17 | printf("The address of a is %u\n", ptr); |
| 18 | ptr++; |
| 19 | printf("The value of ptr is %u\n", ptr); |
| 20 | return 0; |
| 21 | } |
nothing calls this directly
no outgoing calls
no test coverage detected