Explain the relationship between an array and pointers, C/C++ Programming

Assignment Help:

Relationship between an Array and Pointers.

Consider the following.

int arr[] = {0,1,2,3,4,5,6,7,8,9};

If we write arr , it is considered as the address of the first element of an array. As,

 arr is equivalent to &arr[0];

 arr[1] <==>arr+1;

Similarly to access the value we can write ,

  arr[0] or *arr;

  arr[1] or *(arr+1);

 


Related Discussions:- Explain the relationship between an array and pointers

C program to display a rectangle, Aim: To implement a program to display a...

Aim: To implement a program to display a rectangle, circle and triangle. Code:                       class shape {             public:                         vir

Writing a c++ program, how can I write a c++ program that generate all evn ...

how can I write a c++ program that generate all evn numbers less than 1000?

Padovan string, write a C program for padovan string for a natural number

write a C program for padovan string for a natural number

Random card generator, i need a program that generates this output: The hig...

i need a program that generates this output: The highest card wins! Suit Order is: clubs, diamonds, hearts and spades The computers card is the 5 of Spades. The player’s card is t

Euclidean Algorithm , how can I find the GCD of 2 given numbers using Eucli...

how can I find the GCD of 2 given numbers using Euclidean Algorithm ?

Code, how to write c++ for function f(x)= 2x^3 -x^2 +10

how to write c++ for function f(x)= 2x^3 -x^2 +10

Explain multiple inheritance with a common base, Multiple inheritance with ...

Multiple inheritance with a common base (Hybrid Inheritance) Inheritance is an important and powerful feature of OOP. Only the imagination of the person concerned is the limit.

Write a program to find the area under the curve y =, Write a program to fi...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.   #include float start_poin

Write a c program to input a floating point number, Step 1 Define the start...

Step 1 Define the start of the program    It should be noted that within C all commands should end in a semi-colon. For most of your programs the definition of a program header as

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd