Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

QUESTION

(a) Write a program to swap two names between two variables for examples:

N1 = "Mary Anne"

N2 = "Queen Mary".

The program should make use of an appropriate Function (for e.g. SwapFunc() ) and pointers to do this.

Your program should have three blocks namely the function declaration , the main and finally the function definition.

The Function SwapFunc() should be called from main.

The program should display the names in each variable before and after calling the function SwapFunc() in main.

(b) Write a piece of code (C or C++) to declare a pointer that is pointing to an array of characters named mychar for e.g.

                                mychar may contain the following five characters z, y, x, w, v

Your program should include codes to declare the array and the pointer to the array. It should also include codes to display the address of the first element in the array using pointers.

Using a loop for the pointers the subsequent codes should display the addresses of the four remaining characters.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9586157

Have any Question?


Related Questions in Computer Engineering

Research the differences in file formats between ms office

Research the differences in file formats between MS Office 2003 and MS Office 2007. Explain how file signatures and metadata can be used to determine which versions of MS Office applications (e.g. Word, Excel, Power Poin ...

Question introduction to management information systemsread

Question: Introduction to Management Information Systems Read at least three (3) academically reviewed articles on Management Information Systems and complete the following activities: 1. Summarize all three (3) articles ...

A set of coins makes change fornbspnnbspif the sum of the

A set of coins makes change for n if the sum of the values of the coins is n. For example, if you have 1-cent, 2-cent and 4-cent coins, the following sets make change for 7: 7 1-cent coins 5 1-cent, 1 2-cent coins 3 1-ce ...

Question suppose that we run a greedy search algorithm with

Question : Suppose that we run a greedy search algorithm with h(n) = -g(n). What sort of search will the greedy search emulate? What if h(n) = g(n)? What sort of search does greedy search emulate in this case? Explain yo ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

This is a scilab question only and must be answered in

This is a SCILAB QUESTION ONLY AND MUST BE ANSWERED IN SCILAB LANGUAGE PLEASE or else I will not be able to understand, Please show every step, many thanks in advance!!! Consider the polynomial: Find the value q(x = 6), ...

Suppose the following matrix represents the number of saws

Suppose the following matrix represents the number of saws ordered from your company each month over the last year. saws = [1,4,5,3,7,5,3,10,12,8, 7, 4] All the numbers should be zero or positive. (a) Use an if statement ...

Taskwrite an essay according to the following

Task Write an essay according to the following instructions. Your lecturer will provide few links for relevant articles and/or case studies. These will be available to you just after your second assignment submission dat ...

Symbolic mathematicsa thick-walled cylindrical tubing of

(symbolic Mathematics): A thick-walled cylindrical tubing of hard rubber having an inside radius of 5mm and an outside radius of 20 mm is being used as a temporary cooling coil in a bath. Ice water is flowing rapidly ins ...

The richter scale is often used to measure the strength and

The Richter scale is often used to measure the strength and potential damage caused by an earthquake. Design and write an algorithm which accepts as input a Richter scale reading and then prints a message indicating the ...

  • 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

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As