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

A palindrome is a string that reads the same from both the e, submitting so...

submitting solutions in C language should not use functions from / as these files do not exist in gcc

#title., A student apears in exam of math, physics, and chemistry. Write a...

A student apears in exam of math, physics, and chemistry. Write a program to find the total marks aa student has aqueired find the average.

C program to define power of a function, C program to define power of a fun...

C program to define power of a function: Write a program to use power of a function. void main() { int x,y,po=1,i,j; clrscr();   printf("Give x,y\n"); sca

How to use http headers inside php, How to use HTTP Headers inside PHP? Wri...

How to use HTTP Headers inside PHP? Write the statement through which it can be added? HTTP headers can be used in PHP by redirection that is written as: Headers can be

Where are longjmp and setjmp used in c++, Where are longjmp and setjmp used...

Where are longjmp and setjmp used in C++? -Setjmp and longjmp must not be used in C++. - Longjmp jumps out of the function without unwinding stack. This means that local obj

Briefly describe how a linear search algorithm works, Question 1: (a) D...

Question 1: (a) Describe the following objects and condition states: (i) ifstream and ofstream objects (ii) eof(), fail(), bad() and good() functions. (b) Write a C++ pr

What is an iterator class?, A: A class which is used to traverse through th...

A: A class which is used to traverse through the objects maintained through a container class. There are _ve categories of iterators: output iterators, input iterators, forward ite

Insertion sort - c program, Insertion sort - C program: Write a progra...

Insertion sort - C program: Write a program in c to define a insertion sort. void main()  {   clrscr();   int a[100],ch,n;   cout   cin>>n;   for (int i=0

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