Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Programming Language Expert

problem 1: Describe the meaning of each of the given pointer declarations:

i) float a = -0.137;
   float *pa = &a;

ii) double *fa(double *a, double *b, double *c);

iii) char *d[4] = {“north”, “south”, “east”, “west”};

iv) int (*pf)(char *a, char *b);

problem 2: Read the structured program shown below and answer the problems:

int i, j = 25;
int *pi, *pj = &j;
*pj = j + 5;
i = *pj + 5;
pi = pj;
*pi = i + j;

Suppose each integer quantity occupies 2 bytes of memory, the hexadecimal address of i begins at F9E and that of j at FA0.

i) What value is symbolized by &i?
ii) What value is symbolized by &j?
iii) What value is assigned to pj?
iv) What value is assigned to *pj?
v) What value is assigned to i?
vi) What value is symbolized by pi?
vii) What final value is assigned to *pi?
viii) What value is symbolized by (pi + 2)?
ix) What value is symbolized by the expression (*pi + 2)?
x) What value is symbolized by the expression *(pi + 2)?

problem 3: prepare a suitable declaration for each of the given situations comprising the pointers.

a) Declare a function which accepts an argument which is a pointer to an integer quantity and returns a pointer to a six-element character array.

b) Declare a function which accepts an argument which is a pointer to an integer array and returns a character.

c) Declare a function which accepts an argument which is an array of pointers to integer quantities and returns a character.

d) Declare a function which accepts an argument which is an integer array and returns a pointer to the character.

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

f) How is the buffer area defined? Describe your answer with suitable sample code.

g) What is the main purpose of the fclose function? Is it essential within a program by using a data file?

h) prepare the sample code to open a data file called 'inputfile.txt' in read only mode and to check whether the file is properly opened. 

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M96280

Have any Question? 


Related Questions in Programming Language

Now consider the outer loop of given figure consisting of

Now consider the outer loop of given figure, consisting of blocks B2, B3, B4, and B5. Let g be the transfer function for the loop body, from the entry of the loop at B2 to its exit at B5. Let i measure the number of iter ...

Sum of digits in a string design a program that asks the

Sum of Digits in a String Design a program that asks the user to enter a string containing a series of single digit numbers with nothing seperating them. The program should display the sum of all the single digit numbers ...

Wite a method to computer the following series mi 12 23

Write a method to computer the following series: m(i) = 1/2 + 2/3 + . . . + i/i + 1 Write a test program that displays the following table: I m(i) 1 0.5000 2 1.1667 . . . 19 16.4023 20 17.3546 Formulas to achieve the abo ...

Business app programmingwrite the following programwrite a

Business App Programming Write the following Program: Write a Java program to the form below. The program must work with decimal numbers and each button must work correctly. The result must be done in a popup window. The ...

First write a program that reads students names followed by

First... Write a program that reads students' names followed by their test scores. The program should output each student's name followed by the test scores and the relevant grade. It should also find and print the highe ...

Programming assignmentthis question has two parts a and

Programming Assignment This question has two parts (a) and (b): Develop a program to read in five exam-scores (in the range of 0-100) of a student in HIST220 class. (a) You program should compute and store in memory the ...

1 write a program that reads input as a stream of

1. Write a program that reads input as a stream of characters until encountering EOF. Have the program report the number of uppercase characters, the number of lowercase characters, and the number of other characters rea ...

A local zoo wants to keep track of how many pounds of food

A local zoo wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. Write a program that stores this information in a two dimensional 3 × 7 array, where each row repr ...

Enable geometricobject comparable modify the

(Enable GeometricObject comparable) Modify the GeometricObject class to implement the Comparable interface, and define a static max method in the GeometricObject class for finding the larger of two GeometricObject object ...

Asignmentbe sure to follow the coding standard guidelines

Assignment Be sure to follow the Coding Standard Guidelines. You must properly indent and comment your code. Indent code and insert comments to document your program. Program must be implemented and run as instructed. So ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen