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 assignment 1 grocery storethis assignment

Programming Assignment #1: Grocery Store This assignment attempts to serve as a refresher for concepts that I hope you learned in CS 122. In this assignment, you will be building a simple storefront for a small grocery s ...

Csis program homeworkwrite a program where the user will

CSIS program homework Write a program where the user will enter a number between 1 and 50 representing a state. The program should display the full name of that state. Assume the states are in alphabetical order, that is ...

Assignmentthis assignment will be marked out of 100 and

Assignment This assignment will be marked out of 100 and carries 30% of the overall module weighting. Your .java files and report for this part must be uploaded to WebLearn and submitted by 3pm on Wednesday 27th April 20 ...

Write a program that calculates several possible tips to

Write a program that calculates several possible tips to give to a waiter at a restaurant. Ask the user to enter the total cost of the meal and then calculate a tip at 10%, 12.5%, 15%, 17.5%, and 20%. Write the original ...

The briefyour small development team of ideally three

The Brief Your small development team of (ideally) three people has been asked to implement and test the Human Resource Information System desktop application. Your software product will be a database- backed desktop app ...

Cp1404cp5632 2016 sp22252 assignment 1 - shopping list

CP1404/CP5632 2016 SP2/22/52 Assignment 1 - Shopping List 1.0 Task: You are to plan and then code a console-based program in Python 3, as described in the following information and sample output. This assignment will hel ...

1 loops the greatest and the least- write a program with a

1. Loops: The greatest and the least- Write a program with a loop that lets the user to enter a series of integers. The use should enter -99 to signal the end of the series. After all the numbers have been entered, the p ...

Purposethe purpose of this assignment is to practice using

Purpose: The purpose of this assignment is to practice using loops, selections, and other basic features of Java in order to solve a real-world problem. Program Description: The Jeddah Broker Company is one of the compan ...

Engineering programmingi need this now please accurate

Engineering programming I need this now please accurate answers and must be high rated Problem #1 Write a program that asks the user to input the number of miles and convert the miles to kilometers, and then print the ou ...

Shell programmingyou have created the directory structure

Shell Programming You have created the directory structure and some base files to be used by the Web server and Web site. For the Web site to be created in a production environment, you need to package your commands in a ...

  • 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

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate