output of the following * ?program

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter3: Understanding Structure
Section: Chapter Questions
Problem 6RQ
icon
Related questions
Question
LTE I.
9:07
A docs.google.com
1
#include<iostream>
using namespace std;
int main ()
4 (int a=13,b%3D18,x;
x= (-b>=a) ? (-1) : ((a!=-b) ?-4:10);
cout<<"x="<<x<<endl;
return 0;
7
}
x=10
x=-1 O
X=-18
X=-4
نقطتان )2(
What is the output of the following
* ?program
1
#include<iostream>
using namespace std;
3
int main()
4
{const int a=5%3;
int b=9,y;
a=a+4;
b-=1; y=a+b;
cout<<"y="<<y<<endl;
return 0;
7
8.
10
none
y=17
error
Transcribed Image Text:LTE I. 9:07 A docs.google.com 1 #include<iostream> using namespace std; int main () 4 (int a=13,b%3D18,x; x= (-b>=a) ? (-1) : ((a!=-b) ?-4:10); cout<<"x="<<x<<endl; return 0; 7 } x=10 x=-1 O X=-18 X=-4 نقطتان )2( What is the output of the following * ?program 1 #include<iostream> using namespace std; 3 int main() 4 {const int a=5%3; int b=9,y; a=a+4; b-=1; y=a+b; cout<<"y="<<y<<endl; return 0; 7 8. 10 none y=17 error
Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Print statement
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage