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

Assignmentwrite a program to converts temperatures between

Assignment Write a program to converts temperatures between Fahrenheit and Celsius. Your program should print a brief message describing what it does, and then prompt the user to enter "1" if they would like to convert a ...

Create a program that allows the user to enter sets of

Create a program that allows the user to enter sets of integer values, in any order.Per set of data,the program is to output the largest number. EXAMPLE 1 Given the set of supplied values:(1,-3,22,-30),the program should ...

Along with your name include your student id and discussion

? Along with your name, include your student ID# and discussion section at the top of your Assignment. ? There are eight problems; we will go over them in dicussion section after the due date. ? The textbook in this cont ...

Evaluate a formula for data in a filewe consider the

Evaluate a formula for data in a file We consider the formula y(t) = v0t - 0.5gt2 and want to evaluate y for a range of t values found in a file with format v0: 3.00 t: 0.15592 0.28075 0.36807889 0.35 0.57681501876 0.213 ...

Write a program that will predict the size of a population

Write a program that will predict the size of a population of organisms. The program should ask for the starting number of organisms, their average daily population increase ( as a percentage), and the number of days the ...

Assignment testing and quality assurancenote this is part

Assignment: Testing and Quality Assurance Note: This is part three of a four-part implementation plan that will be combined to form the finalized plan in Week Four. It is expected that adjustments will be made in the fin ...

A certain loop requires 5 loads 7 stores and 8 arithmetic

A certain loop requires 5 loads, 7 stores, and 8 arithmetic operations. What is the minimum initiation interval for a software pipelining of this loop on a machine that executes each operation in one clock tick, and has ...

Assignmentgoalsto learn about separate compilation classes

Assignment Goals To learn about separate compilation, classes, and vector manipulation. Your Assignment In this assignment the main has been written for you in the file phone_book_main.cpp. You will also notice that a cl ...

Assignmenta catering company provides prepared meals for

Assignment A catering company provides prepared meals for events such as business meetings. The company has a number of standard meals, which it identifies with a unique integer ID number. At this stage each meal also ha ...

Assignment introduction to computer sciencepart a this

Assignment: Introduction to Computer Science Part A: This question is to be submitted to the instructor in the form of a Word (or OpenOffice) document containing the Java code and appropriate screen capture(s) of the out ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

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