Arrow operator (->) usage in C

后端 未结 12 2240
醉梦人生
醉梦人生 2020-11-22 04:41

I am reading a book called \"Teach Yourself C in 21 Days\" (I have already learned Java and C# so I am moving at a much faster pace). I was reading the chapter on pointers a

12条回答
  •  迷失自我
    2020-11-22 05:29

    Dot is a dereference operator and used to connect the structure variable for a particular record of structure. Eg :

    struct student
        {
          int s.no;
          Char name [];
          int age;
        } s1,s2;
    
    main()
        {
          s1.name;
          s2.name;
        }
    

    In such way we can use a dot operator to access the structure variable

提交回复
热议问题