What is the output of the program given below? You may assume that all the necessary...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What is the output of the program given below? You may assume that all the necessary header files are included and declarations are already made. int main (void) { } int num=10; int* ptr-# for(;num>0;num--) } { } int num=2; func(num,ptr); printf("%d",num); return 0; func(int num1, int* ptr1) { *ptr1=num1-(*ptr1); What is the output of the program given below? You may assume that all the necessary header files are included and declarations are already made. int main (void) { } int num=10; int* ptr-# for(;num>0;num--) } { } int num=2; func(num,ptr); printf("%d",num); return 0; func(int num1, int* ptr1) { *ptr1=num1-(*ptr1);
Expert Answer:
Answer rating: 100% (QA)
Output of the program will be 9 as here in the program there is one num integer whos val... View the full answer
Related Book For
Principles of Auditing and Other Assurance Services
ISBN: 978-0078025617
19th edition
Authors: Ray Whittington, Kurt Pany
Posted Date:
Students also viewed these programming questions
-
What is the output of this program if K = 3? Main Declare K As Integer Input K Set Result = F(K) Write Result End Program Function F(N) As Integer If N == 1 Then Set F = 1 Else Set F = N * F(N-1) Set...
-
What is the output of this program if K = 1? Main Declare K As Integer Input K Set Result = F(K) Write Result End Program Function F(N) As Integer If N == 1 Then Set F = 1 Else Set F = N * F(N-1) Set...
-
What is the output of this program if code corresponding to this pseudocode is run? Main Declare X As Integer, Y As Integer Set X = 1 Set Y = 2 Call Sub(X, Y) Write X Write Y End Program Subprogram...
-
Prove this statement: Let f be extended real-valued measurable function on a measurable set D. If f is integrable on D, then the set {D: f 0} is a o-finite set.
-
A portion of the work sheet of Habib Company for the year ended December 31 follows. Required 1. Determine the entries that appeared in the Adjustments columns and present them in general journal...
-
Bill Blass Company has credit sales of $500,000 in January. Past experience suggests that 45% is collected in the month of sale, 50% in the month following the sale, and 5% in the second month...
-
Is there a single standard command-line processor to parse and process argv?
-
Recording Bad Debts Sandel Company reports the following financial information before adjustments. Prepare the journal entry to record bad debt expense assuming Sandel Company estimates bad debts at...
-
What is JDBC ? Explain the role of Driver in JDBC. What is the purpose Class.forName method ? What is the advantage of PreparedStatement over Statement ? What is the use of CallableStatement ? Name...
-
The Fashion Rack has a monthly accounting period. The firms chart of accounts is shown below and on the next page. The journals used to record transactions are the sales journal, purchases journal,...
-
Which one of the following changes will increase the NPV of a project? A decrease in the number of cash inflows An increase in the initial cost of the project A decrease in the size of the cash...
-
Select the cookery method that you will use. Explain your decision Select the marinades and accompaniments which you will add to your dish. Explain your decision - how do the accompaniments...
-
QUESTION 7 Rory (aged 52) is a member of a provident fund. The rules of the provident fund makes provision for early retirement from the fund from age 50. Rory elects for early retirement in the...
-
A plane is flying with a velocity of 58 km/h [E] and wants to fly at 95 km/h [S47 o E] relative to the ground to arrive at the destination on time. What is the velocity needed relative to the air?
-
How are length and time used to describe motion? A jogger jogs around a circular track with a diameter of 300 m in 10 min. What was the jogger's average speed in m/s? What is the magnitude of the...
-
Can an object be at rest if forces are being applied to it? Explain. A horizontal force of 250 N is applied to a stationary wooden box in one direction, and a 600-N horizontal force is applied in the...
-
Molly goes to the store to buy supplies for her lemonade stand with $20 to spend Cups cost her $2 per package and lemonade mix costs her $1 per package. Letting x represent the number of cups and y...
-
You deposit $10,000 in a savings account that earns 7.5% simple interest per year. What is the minimum number of years you must wait to double your balance? Suppose instead that you deposit the...
-
The auditor of Cubs obtained the following client-prepared bank reconciliation: The auditor for Cubs Co. has obtained the client-prepared bank reconciliation. The following information is available: ...
-
The following are typical questions that might appear on an internal control questionnaire for accounts payable. 1. Are monthly statements from vendors reconciled with the accounts payable listing?...
-
What are the advantages of organizing a public accounting firm as a partnership rather than a sole proprietorship?
-
Consider the following cash flow profile, and assume MARR is 10 percent/year and the finance rate is 4 percent/year. a. Determine the MIRR for this project. b. Is this project economically...
-
Consider the following cash flow profile and assume MARR is 10 percent/year and the finance rate is 4 percent/year. a. Determine the MIRR for this project. b. Is this project economically attractive?...
-
A university pumps its water from wells located on campus. The falling water table has caused pumping costs to increase, the quantity of water available to decrease, and the quality of water to...
Study smarter with the SolutionInn App