Print the elements of the array on the screen

Assignment Help Basic Computer Science
Reference no: EM13870223

1. Consider the following syntax of a program.

int i, j = 26;

int *pi, *pj = &j;

*pj = j + 5;

i = *pj + 5;

pi = pj;

*pi = i + j;

Solve the problem by finding and explaining the following:

(1) &i

(2) &j

(3) pi

(4) pj

(5) *pi

(6) *pj

(7) i

(8) pi

(9) *(pi-1)

(10) (*pi+2)

(11) (pi+2)

 

2. Write a C program using a pointer for keying six integers by the user. The six values are stored in an array using a pointer. Then print the elements of the array on the screen.

3. Modify the solution of exercise 2 using a pointer to make the C program to print the elements of the array in reverse order.

4. Write a C program to sort an array of 12 integers in descending order.

5. Write a C program to sort an array of 15 integers in an ascending order.

Reference no: EM13870223

Questions Cloud

Estimate the final water temperature : Liquid water at 30.0°C and liquid water at 90.0°C are combined in a ratio (1 kg cold water/2 kg hot water). (a) Use a simple calculation to estimate the final water temperature. For this part, pretend you never heard of energy balances.
Personnel comprise the remainder of the organization : Suppose you are the Information Security Director at a small software company. The organization currently utilizes a Microsoft Server 2012 Active Directory domain administered by your information security team. Mostly software developers and a relati..
Write a program that checks whether user entered full : Write a program that checks whether user entered full_name1 and full_name2 match. For example if user entersJake Kirkland and Jake Kirkova
What will be the results in terms of the insurance policy : Suppose that insurance companies are compelled to offer complete coverage: a(L) = L. What will be the results in terms of the insurance policy that is offered and the level of care the warehouse owner will take?
Print the elements of the array on the screen : 2. Write a C program using a pointer for keying six integers by the user. The six values are stored in an array using a pointer. Then print the elements of the array on the screen.
Prepare the journal entries that csm will make to accrue : Prepare the journal entry that CSM will make when the note is established. Prepare the journal entries that CSM will make to accrue interest on June 30 and December 31. Prepare the journal entry that CSM will make to record the interest and principal..
Question regarding the cross-sectional area : A coil with 380 windings is wound around a cast iron ring. the cast iron ring has a mean diameter of 125mm and a cross-sectional area of 600mm squared. The magnetic field strength is 3000Am while the relative permeability of the core is 780. deter..
A device that converts mechanical into electrical energy is : A device that converts mechanical into electrical energy is?
Two packets over a medium at the same time : Which of the following condition is used to transmit two packets over a medium at the same time?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What is the relationship between transistor densities

In two paragraphs explain what is the relationship between transistor densities and the improvement in computer speed and miniaturization?

  Describes the difference between an intranet and internet

Which of the following BEST describes the difference between an intranet and internet? Beginning in the upper left corner of a spread sheet, where would you look to find cell C6

  Innovation in info technology

innovation in info technology

  Program to clear register a

Write a program to clear Register A, add five to Register A 10 times, and place the result in RAM Location $2000. Use a RAM location for holding the counter.

  Uml class notations

Compare and contrast the UML class diagram relationships that can exist between classes and explain when you would use each type of relationship to model a software project.

  Formulate the lp model to minimize weekly shipping cost

Formulate the LP model to minimize weekly shipping cost and formulate the LP model to minimize production and inventory costs and meet the demand for the next four months.

  How many times each integer was generated

Initialize each item in the second array to 0. For each item in the first array, use it as the index into the second array and increment the contents found in the second array at the corresponding index.

  Determine if that polygon is a square

Given the length of four sides determine whether they can be used to create a polygon and determine if that polygon is a square. A polygon can be created if no single side is greater than the sum of the other three sides.

  Give a cfg for the set of all well formed strings

Give a CFG for the set of all well formed strings over {a,b,+,.,*, ?,?,(,) } that are well formed regular expressions over {a,b}

  Generate the intermediate code

Generate the intermediate code for the following expression assuming the usual rules concerning parentheses, precedence and associativity. Be sure to reuse temporaries as soon as possible: x + (5 - y) * z - 1

  What is big-o complexity of method

Write a method maxVal that accepts as parameter the reference to the head node of a linked list of integers. The method should return the largest value in the list. What is the Big-O complexity of the method maxVal?

  File format would you choose

What file format would you choose for the following tasks: 1. A cartoon strip 2. A 3D model for use on a multimedia presentation on the web

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