Question: 1. Write a C+ program that calculate and print the value of y using the following function Y=x26x1Y=4Y=xifx0 2. Write a program to evaluate the

1. Write a C+ program that calculate and print the value of y using the following function Y=x26x1Y=4Y=xifx0 2. Write a program to evaluate the following expressions and print out the value of F and W. Fxplain the order of operations (hy precedenos rules) with order of cvaluation. - F=3762(6:4)+6 - W=5+2(12413%64/3) 3. What is the difference between the following pairs? 4. What is the output of the following code segment? 5. What is the value of i and j after the following expression is evaluated if i is initially 3 and j is 4 ? i+j++i 6. In the code fragment below, the programmer has almost certainly made an error in the first line of the conditional statement. a. What is the output of this code fragment as it is written? b. How can it be corrected to do what is the programmer surely intended? int n5; if (n)// NOTE THE OPERATOR!!! cout "n 15 zero" ". ; clse cout "n is not zero" ",n"; coust "The square of n is " nn".4n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
