Skip to content
Snippets Groups Projects
Select Git revision
  • 24ed0420909e5fef6ed4b8ace47d795253ade681
  • main default protected
2 results

task1_pointer.c

Blame
  • task1_pointer.c 211 B
    #include <stdio.h>
    
    int main() {
        int n = 10;
        int *ptr_to_n = &n;
    
        // Increment the value of n using the pointer
        (*ptr_to_n)++;
        printf("Value of n after increment: %d\n", n);
    
        return 0;
    }