Ask Question
28 October, 04:37

This allows you to access structure members.

A.

structure access operator

B.

dot operator

C.

#include directive

D.

getmember function

+3
Answers (1)
  1. 28 October, 08:26
    0
    The correct option for the given question is option (B) i. e dot operator

    Explanation:

    Structure are collection of different datatypes member element.

    Let us consider the example of structure

    Struct test

    {

    int age;

    char name[45];

    };

    Here test is an "structure" which member is age of "integer" type and name of "String" type. if we have to access the member of structure, firstly we create structure variable name then after that we use dot operator which is also known as member access operator that access the members of structure.

    struct test op; / / structure variable name

    op. age=12; / / access the member age

    For example

    Following is the code in c language:

    #include / / header file

    struct test / / structure declaration

    {

    int age;

    char name[45];

    };

    int main () / / main function

    {

    struct test op; / / structure variable name

    op. age=12; / / access the member age

    printf ("%d", op. age);

    return 0;

    }

    Output:12

    so correct answer is "dot operator"
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “This allows you to access structure members. A. structure access operator B. dot operator C. #include directive D. getmember function ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers