Question 1 (Mandatory) (1 point) Give the correct preprocecessor directive for the function pow(). #include O...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Question 1 (Mandatory) (1 point) Give the correct preprocecessor directive for the function pow(). #include <stdio.h> O #Jmclude <stdlib.h> #include <stdmath.h> #include <math.h> #include <stdio> Question 2 (Mandatory) (1 point) The following statement, int random = rand(time(NULL)) %10; ,will give a random value between: 1 and 10 time and (time + 10) 0 and 10 0 and 9 O to infinnity Question 3 (Mandatory) (1 point) The following statement, int random = rand ( ) %4 + 1; will give a random value between: 0 and 2 2 and 5 1 and 4 0 and 3 1 and 5 Question 4 (Mandatory) (1 point) Choose the correct function call for the given function prototype. int calculate (int A, float B, char C); int ans = calculate(); char ans = calculate(A,B,C); int ans = calculat(A,B,C'); int ans = calculate(1,2.0,A); int ans = calculate(1,2.0,'A'); choose the correct function prototype for the given function call. float A = Hello(‘A’,2,Z'); float Hello (char A, Char B, int C); float hello (char A, int B, char C); void Hello (char A, int C, char B); int Hello (char A, char B, char C); none of the above Question 6 (Mandatory) (1 point) What is the return type of the following function: void calculate (int A, char B, float C); int float void char none of the above Question 7 (Mandatory) (1 point) What is the output of the given function if A = 1. void print(int A) { return; 12 123 13 } nothing printf("1"); if (A >= 1) { printf("2"); if (A == 1) } else if (A == -2) return; printf("3"); return; Question What is the value of ans. Function call: 12 7 8 (Mandatory) (1 point) int ans = calculate (3,4); Function: int calculate(int A, int B){ if (A == 3) } else else return A*B; if (B == 4) O 12 and 7 and 1 and 0 return A + B; return B - A; return A / B; me Left:1:41:58 What wil printed on the screen? #include <stdio.h> int Rnd(float Val){ int Temp; Temp Val+ 0.5; return Temp; } int main(){ MB MASEMOLA: Attempt 1 } printf("%d", Rnd(49.769); return 0; Question 10 (Mandatory) (1 point) Which library contains the function to generate random numbers? <stdio.h> <stdlib.h> <time.h> <math.h> <bool.h> <conio.h> 4 Question 1 (Mandatory) (1 point) Give the correct preprocecessor directive for the function pow(). #include <stdio.h> O #Jmclude <stdlib.h> #include <stdmath.h> #include <math.h> #include <stdio> Question 2 (Mandatory) (1 point) The following statement, int random = rand(time(NULL)) %10; ,will give a random value between: 1 and 10 time and (time + 10) 0 and 10 0 and 9 O to infinnity Question 3 (Mandatory) (1 point) The following statement, int random = rand ( ) %4 + 1; will give a random value between: 0 and 2 2 and 5 1 and 4 0 and 3 1 and 5 Question 4 (Mandatory) (1 point) Choose the correct function call for the given function prototype. int calculate (int A, float B, char C); int ans = calculate(); char ans = calculate(A,B,C); int ans = calculat(A,B,C'); int ans = calculate(1,2.0,A); int ans = calculate(1,2.0,'A'); choose the correct function prototype for the given function call. float A = Hello(‘A’,2,Z'); float Hello (char A, Char B, int C); float hello (char A, int B, char C); void Hello (char A, int C, char B); int Hello (char A, char B, char C); none of the above Question 6 (Mandatory) (1 point) What is the return type of the following function: void calculate (int A, char B, float C); int float void char none of the above Question 7 (Mandatory) (1 point) What is the output of the given function if A = 1. void print(int A) { return; 12 123 13 } nothing printf("1"); if (A >= 1) { printf("2"); if (A == 1) } else if (A == -2) return; printf("3"); return; Question What is the value of ans. Function call: 12 7 8 (Mandatory) (1 point) int ans = calculate (3,4); Function: int calculate(int A, int B){ if (A == 3) } else else return A*B; if (B == 4) O 12 and 7 and 1 and 0 return A + B; return B - A; return A / B; me Left:1:41:58 What wil printed on the screen? #include <stdio.h> int Rnd(float Val){ int Temp; Temp Val+ 0.5; return Temp; } int main(){ MB MASEMOLA: Attempt 1 } printf("%d", Rnd(49.769); return 0; Question 10 (Mandatory) (1 point) Which library contains the function to generate random numbers? <stdio.h> <stdlib.h> <time.h> <math.h> <bool.h> <conio.h> 4
Expert Answer:
Answer rating: 100% (QA)
1 d include The pow function is used to calculate the power of a number 2 c 0 and 10 The following statement int random randtimeNULL10 will give a ran... View the full answer
Related Book For
Principles of Taxation for Business and Investment Planning 2016 Edition
ISBN: 9781259549250
19th edition
Authors: Sally Jones, Shelley Rhoades Catanach
Posted Date:
Students also viewed these accounting questions
-
In the current year (year 0), Amisha became a shareholder in Sultan Inc., a calendar year S corporation, by contributing $15,000 cash in exchange for stock. Shortly before the end of the year,...
-
In the current year Ned completely destroys his personal automobile (purchased two years earlier for $28,000) in a traffic accident. Fortunately none of the occupants are injured. The FMV of the car...
-
In the current year SPL Ltd. paid tax-free automobile allowances of 53 per kilometre to two of its employees. Employee #1 drove 15,000 km and Employee #2 drove 6,000 km in carrying out their duties...
-
Liberty Ventures Inc. reported a $320,000 profit in 2020 and declared preferred dividends of $20,000. The following changes in common shares outstanding occurred during the year: Jan 1 100,000 common...
-
Many highways with steep downhill areas have run-away truck inclined paths just off the main roadbed. These paths are designed so that if a vehicles braking system gives out, the driver can steer it...
-
Find the indicated quantities. Sg 8 k=1 = = ?
-
\(P(x <55)\) In Exercises 27-32, the random variable \(x\) is normally distributed with mean \(\mu=74\) and standard deviation \(\sigma=8\). Find the indicated probability.
-
The marketing department of Metroline Manufacturing estimates that its sales in 2013 will be $1.5 million. Interest expense is expected to remain unchanged at $35,000, and the firm plans to pay...
-
In accordance with the business tax laws of the Philippines, please show solution. Thank you. A business reported the following sales for the month of July 2021. Domestic sales P200,000 Deemed sales...
-
1. Is Jones correct? That is, using the more complete data set, is it true that Jones has the lowest defect rate overall? Are Joness percentages correct overall (i.e., combining domestic and overseas...
-
Approximate the definite integral using the Trapezoidal Rule and Simpson's Rule with n = 4. Compare these results with the approximation of the integral using a graphing utility. (Round your answers...
-
What are the main consolidation approaches?
-
Should public sector organizations work more on the principle of trust?
-
Who are the main internal and external users of CFSs?
-
What roles can a performance auditor adopt and what conflicts can arise between these roles?
-
What are the potential financial costs and risks of adopting 5G too early? What about the risks of adopting it too late?
-
1. Code a method that receives the radius of a circle and returns its circumference. (C=2pir) 2. Code a method that receives the lengths of the three sides of a triangle and returns its perimeter. ...
-
Planning: Creating an Audience Profile; Collaboration: Team Projects. Compare the Facebook pages of three companies in the same industry. Analyze the content on all available tabs. What can you...
-
Identify the tax issue or issues suggested by the following situations and state each issue in the form of a question: Mr. Yang just sold his entire 20 percent interest in DK Partnership to an...
-
Discuss potential differences in content and style between a research memo and a client letter communicating research results.
-
Issue Recognition Problems Identify the tax issue or issues suggested by the following situations and state each issue in the form of a question. Mr. G is employed by a closely held corporation that...
-
On December 1, 2017, Sizzler Foods, a U.S. company, purchased merchandise from a Hong Kong supplier at a price of HK\($10,000,000,\) payable in three months in Hong Kong dollars. To hedge its exposed...
-
On March 15, 2017, Hunt Brands, a U.S. company, purchased merchandise from a South African company at a price of R1,000,000, payable in two months in rands. To hedge its exposed liability position,...
-
On September 3, 2017, Robin Franchises, a U.S. company, sold merchandise to a franchisee in the U.K., at a price of 8,000,000, payable in three months in pounds. To hedge its exposed asset position,...
Study smarter with the SolutionInn App