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

PADOVAN STRING, # c pragram TO count the number of occurances of the string...

# c pragram TO count the number of occurances of the string in nth padovan''s string program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : pa

Accounts, Write a program to process bank accounts. Create a base class na...

Write a program to process bank accounts. Create a base class named Account and two derived classes named Savings and Checking. In the base class, use an int AccountNum and a dou

Programing, Define a structure to store roll no, name and marks of a studen...

Define a structure to store roll no, name and marks of a student. b) Using the structure of Q2. a), above write a ''C'' program to create a file "student.dat". There must be one r

Explain register variable, Explain Register Variable Computers have int...

Explain Register Variable Computers have internal registers, which are used to keep data temporarily, before any operation can be performed. Intermediate results of the calcula

C++ programming, give a program to accept and print 2_D Array

give a program to accept and print 2_D Array

Theory, recursive sub programs

recursive sub programs

Explain protected and public in c++, Explain protected, public, private in ...

Explain protected, public, private in C++? These are three access spaecifiers in C++. - Public - Here data members and functions are accessible outside the class. - Pr

Programs that perform the identical recursive algorithm, Goals For this ass...

Goals For this assignment you will write programs in C and LC-3 assembly code. Both programs will perform the identical recursive algorithm. The goals of this programming assignmen

Notion of encapsulation, The purpose of this assignment is to familiarize y...

The purpose of this assignment is to familiarize you with the notion of encapsulation as well as some aspects of IP and ICMP. Write your programs in C or C++. They will be grade

Command line program to find name matches, What's a six-letter word that ha...

What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than a

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