//https://[Log in to view URL]

#if 0   
    #include <stdio.h>
    void main()
    {
        int a[3] = {1, 2, 3};
        int *p = a; //address of p=a then 
        printf("%p\t%p", p, a); //0x7ffeffb2f64c	0x7ffeffb2f64c
        //printf("%d\t%d", *p, *a+1); // 1 2
    } 
    
    #include <stdio.h>
    void main()
    {
        char *s = "hello";
        printf("%s",s); // hello
        char *p = s;// hello is taken by its address address of s -> *s goes to *p
        printf("%p\t%p", p, s);//hello0x5593c87ea004	0x5593c87ea004hello
        printf("%s",p);
    }
    
    #include <stdio.h>
    void main()
    {
        char *s= "hello";
        char *p = s;
        printf("%c\t%c", p[0], s[1]);//h e //0[p] = 0[p]
    }
    
    #include <stdio.h>
    void foo( int[] );
    int main()
    {
        int ary[4] = {1, 2, 3, 4};
        foo(ary);
        printf("%d ", ary[0]);//10
    }
    void foo(int p[4])
    {
        int i = 10;
        p = &i;
        printf("%d ", p[0]); //1
    }
#endif  



    
    
    

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: