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

#accept 3 digit number, Write a ''C'' program to accept any 3 digit integer...

Write a ''C'' program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number

Programming, write a program that can accept numbers and perform all the fo...

write a program that can accept numbers and perform all the four arithmetic operation

Area under curve, progarm in c for area under curve   #include ...

progarm in c for area under curve   #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area; int numtraps;

Arrays within a class, A r r a y s w i t h i n a c l a s s:...

A r r a y s w i t h i n a c l a s s: I t i s j u s t d ecl a r i n g o r c on s t ru c ti n g a d e r i v e d t

Flow chart, how made a flow chart of prime number by using for loop

how made a flow chart of prime number by using for loop

C CODING, HOW THE C PROGRAM CODING IMPLEMENTED DY ITSELF UNDERSTANDING . AL...

HOW THE C PROGRAM CODING IMPLEMENTED DY ITSELF UNDERSTANDING . ALSO HOW I CAN A BECOME A GOOD PROGRAMMER IN C WHAT I DO FOR GOOD PROGRAMMING ,TELL ME HOW C CODING DEVELOP DY ITSELF

Program to find a greatest string: c - program , Program to find a Greatest...

Program to find a Greatest String: C - Program: Write a program find largest string by c program. int main( int argc, char *argv[] ) {     if( argc         {

Area, write a program to find the area under the curve y=f(x) between x=a &...

write a program to find the area under the curve y=f(x) between x=a & x=b

Why do c++ compilers require name mangling?, A: Name mangling is the rule a...

A: Name mangling is the rule according to which C++ modify function's name into function signature before passing that function to a linker. It is how the linker differentiates amo

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