Advantages of using pointers over arrays, C/C++ Programming

Assignment Help:

Question :

(a) Define a Pointer. Provide an example of an integer pointer variable.

(b) Give advantages of using pointers over arrays.

(c) Declare an integer pointer variable called ‘array_ptr'. Now prepare the code fragment to read in ten integer values from a user. Here the value entered by the user must be stored in an array of pointers.

(d) Declare an integer array called ‘arrayInt'. Now prepare the code fragment to read in ten integer values from a user. Here all the values are stored in the integer array.

(e) (i) What is the purpose of the buffer area when working with a stream oriented data file?

(ii) How is a buffer area defined?

(f) Prepare a code fragment to open a data file called "inputfile.txt" in read only mode and that also checks whether the file is correctly opened or not.


Related Discussions:- Advantages of using pointers over arrays

#title. RETIRED ON SOCIAL SECURITY., IS IT POSSIBLE FOR YOU TO WRITE A PR...

IS IT POSSIBLE FOR YOU TO WRITE A PROGRAM FOR ME TO MEASURE EXISTING ANGLES AND DO IF AND THEN FROM THIS , AND TO PLACE FIXED ANGLES AT CERTAIN POSITION AS A ADD WITH DLL FOR CERTA

#AREA UNDER CURVE, #question.Write a program to find the area under the cur...

#question.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. The area under a curve between two po

C programming, Write a program that keeps record of football results. Progr...

Write a program that keeps record of football results. Program stores following information about each match: Description Type and/or size name of home team max. 25 characters name

Decode the code, Smugglers are becoming very smart day by day. Now they hav...

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

C++ programming, I need help programing this... In this exercise, you will ...

I need help programing this... In this exercise, you will create a program for the sales manager at Computer Haven, a small business that offers motivational seminars to local comp

Bitwise operations, Bitwise Operations 1. Write a function that has an ...

Bitwise Operations 1. Write a function that has an int parameter n, makes an integer mask having the bit 1 at the nth place from the rightmost bit, and returns the mask. For ex

Logic behind object oriented programming, In this we will take a closer loo...

In this we will take a closer look at the logic behind Object Oriented Programming.  Read through the pseudocode listed below and answer the following questions. Class Square

Explain in brief about the one-definition rule, Explain one-definition rule...

Explain one-definition rule (ODR). According to one-definition rule, C++ constructs should be identically defined in each compilation unit they are used in. As per ODR, two

C program coding, write a c program to compute a padovan string

write a c program to compute a padovan string

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