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

Programming computer science assignmmentprogramming1

Programming Computer Science Assignmment Programming 1) Explain the difference between an event and an event handler. Provide at least two examples of an event. 2) Explain how an animation uses still images and loops to ...

Assignmentthe assignment is as follows use the program

Assignment The assignment is as follows: Use the program, Arrays of Pointers, on p. 188 of the text "Ch. 4, of Ivor Horton's Beginning Visual C++ 2010" as a starting point for this assignment. Refer to Appendix C for ful ...

Assignmentinstructions the following programming problem

Assignment Instructions: The following programming problem can be solved by a program that uses three basic tasks-Input Data, Process Data, and Output Results. To process the data, it uses loops, arrays, decisions, accum ...

Programming languages assignment write the following as

Programming Languages Assignment Write the following as Prolog rules:  1. Implement a rule "dogEnthusiast". Someone is a "dogEnthusiast" if they own AT LEAST TWO dogs. Assume that the only types of facts available are: " ...

Suppose the heap consists of exactly the nine cars on three

Suppose the heap consists of exactly the nine cars on three trains shown in given figure (i.e., ignore the ellipses). Object o in car 11 has references from cars 12, 23, and 32. When we garbage collect car 11, where migh ...

Assignmentscenariosummaryin this lab you will create one

Assignment Scenario/Summary In this lab, you will create one project that reads from a file, one project that writes to a file, and one project drawing a snowman. Program files for each of the following programs. Write o ...

Assignment- object oriented programmingthis program will

Assignment- Object Oriented Programming This program will use 2 different data structures to perform the same tasks; a vector and a dynamically sized array Write a complete C++ program that will: Declare a vector of inte ...

Generate code for the given three-address statements

Generate code for the given three-address statements assuming all variables are stored in memory locations. a) x = 1 b) x = a c) x = a + 1 d) x = a + b e) The two statements x = b * c y = a + x

Construct a loop which will allow for the daily fan count

Construct a loop which will allow for the daily fan count to be entered for each game. The games number (1-4) should be part of the prompt displayed to the user. Within this loop, you will need other loop(s) to validate ...

Assignmenta near expert at introductory problem solving and

Assignment A near expert at introductory problem solving and programming, you've decided to put your skills to good use by volunteering at SecurityCon, a security conference for IT professionals. The conference has space ...

  • 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