Evaluate the given expression z-a*b/w+w*y Given a=4, b=6, w=2, y=-5, z=5     Select one: a. none of the choices b. 17 c. -7 d. -5   What is the output of the given program below if the inputted value is 2 #include #include void main() { int x=5, y=2; char op; printf(“input operation[+,-,*,/]:  “); scanf(“%c”,&op); switch(op) { case ‘+’:    x=x+y;    break; case ‘-‘:    x=x-y;    break; case ‘*’:    x=x*y;    break; case ‘/’:    x=x/y;    break; default:    printf(“Invalid”); } printf(“The value of x is %d” x); getch(); }   Select one: a. invalid b. 3 c. 5 d. 10

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 8PP: (Statistical) In many statistical analysis programs, data values considerably outside the range of...
icon
Related questions
icon
Concept explainers
Question

Evaluate the given expression

z-a*b/w+w*y

Given a=4, b=6, w=2, y=-5, z=5

 

 

Select one:
a. none of the choices
b. 17
c. -7
d. -5
 

What is the output of the given program below if the inputted value is 2


#include<stdio.h>
#include<conio.h>
void main()
{
int x=5, y=2;
char op;
printf(“input operation[+,-,*,/]:  “);
scanf(“%c”,&op);
switch(op)
{
case ‘+’:
   x=x+y;
   break;
case ‘-‘:
   x=x-y;
   break;
case ‘*’:
   x=x*y;
   break;
case ‘/’:
   x=x/y;
   break;
default:
   printf(“Invalid”);
}
printf(“The value of x is %d” x);
getch();
}

 

Select one:
a. invalid
b. 3
c. 5
d. 10
 
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning