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

Pebble merchant, There is a pebble merchant. He sells the pebbles, that are...

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing tha

Super ASCII String Cost, A string S is said to be "Super ASCII", if it cont...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Calculate the area and circumference of a circle , Write a program which in...

Write a program which incorporates a function named compute and which is used to calculate the area and circumference of a circle. Use the main function for inputs and outputs.

C pgms, find area under the curve y=f(x) between x=a &y=b integrate y=f(x)

find area under the curve y=f(x) between x=a &y=b integrate y=f(x)

Palindrome, A palindrome is a string that reads the same from both the ends...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Quick sort , Hi, I need quick sort program without using recursion

Hi, I need quick sort program without using recursion

Car rental system, Car Rental System This system tracks cars in a rental co...

Car Rental System This system tracks cars in a rental company. Each car has a number (assume its plate number), type (small car, four wheel car), and status (rented, available). T

C language, WHAT IS A C LANGUAGE? C IS A PROGRAMMING?

WHAT IS A C LANGUAGE? C IS A PROGRAMMING?

Roman code python help , In general, Roman numerals can be converted mathem...

In general, Roman numerals can be converted mathematically by simply assigning a numerical value to each letter, according to the chart below, and calculating a total: M=1000 | D=5

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