Computer Science, asked by akanshacom79, 10 months ago

dot operator is used to access the element of an array true or false​

Answers

Answered by frozenPearl93
1

:dot operator is not used to acess the element of an array . so it is true

Answered by BrainlyYoda
1

Dot operator is used to access the element of an array is false.

Extra Information:

Dot operator is used to access an element in struct.

Dot operator is mainly in C and C++ language.

But, if there is an array of structs then also we can use dot operator to access elements from each struct present in array.

To access an element in a struct =>

struct.element

To access an element in an array of structs =>

array_of_structs.element

To access elements of simple array we use integer index. Generally, array index starts with 0 which goes till the size of array minus 1.

Suppose you made a array of size 5 => int array[5];

And then you assign values to each index number like,

arr[0] = 5;

arr[1] = 2;

Now, to access them you can simply type,

printf("%d", arr[1]);  [in C language]

By, this you will be able to access elements in simple array.

Similar questions