What will the following
A) #include <iostream>
using namespace std;
int main()
{
int freeze = 32, boil = 212;
freeze = 0;
boil = 100;
cout ≪ freeze ≪ endl ≪ boil ≪ endl ;
return 0;
}
B) #include <iostream>
using namespace std;
int main()
{
int x = 0, y = 2;
x = y * 4;
cout ≪ x ≪ endl ≪ y ≪ endl ;
return 0;
}
C) #include <iostream>
using namespace std;
int main()
{
cout ≪ “I am the incredible”;
cout ≪ “computing\nmachine”;
cout ≪ “\nand I will\namaze\n”;
cout ≪ “you.”;
return 0;
}
D) #include <iostream>
using namespace std;
int main()
{
cout ≪ “Be careful\n”;
cout ≪ “This might/n be a trick ”;
cout ≪ “question\n”;
return 0;
}
E) #include <iostream>
using namespace std;
int main()
{
int a, x = 23;
a = x % 2;
cout ≪ x ≪ endl ≪ a ≪ endl ;
return 0;
}
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
EBK STARTING OUT WITH C++
Additional Engineering Textbook Solutions
Introduction To Programming Using Visual Basic (11th Edition)
Concepts Of Programming Languages
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Concepts of Programming Languages (11th Edition)
Digital Fundamentals (11th Edition)
C How to Program (8th Edition)
- int x1 = 66; int y1 = 39; int d; _asm { } mov EAX, X1; mov EBX, y1; push EAX; push EBX; pop ECX mov d, ECX; What is d in decimal format?arrow_forwardThe following declaration, program, and program segment has errors. Locate as many as you can. #include <iostream> using namespace std;class DumbBell; { int weight; public: void setWeight(int); };void setWeight(int w) { weight = w; }int main() { DumBell bar; DumbBell.setWeight(200); cout << "The weight is " << bar.weight << endl; return 0;}arrow_forward(a) #include using namespace std; int main() { } for(int i = 0; i <=30; cout << i*2 << endl; } return 0; ){ Output: 0 20 40 60arrow_forward
- #include<stdio.h> #include<stdarg.h> void fun1(int num, ...); void fun2(int num, ...); int main() { fun1(1, "Apple", "Boys", "Cats", "Dogs"); fun2(2, 12, 13, 14); return 0; } void fun1(int num, ...) { char *str; va_list ptr; va_start(ptr, num); str = va_arg(ptr, char *); printf("%s ", str); } void fun2(int num, ...) { va_list ptr; va_start(ptr, num); num = va_arg(ptr, int); printf("%d", num); }.arrow_forward#include using namespace std; class fraction{ float d,s; public: fraction() { d=0; s=1; fraction(int a, int b) { d=%3; s=b3; } void print() { cout<arrow_forwardNonearrow_forwardNonearrow_forwardDETERMINE THE OUTPUT OF THE CODE: #include using namespace std; int main() { int i; for (i = 0; i > 10; i++){ %D {cout << i <<" "; } } return 0; }arrow_forwardQ 6:- Specify the local and Global variables used in the code below and express the reason r'. #include int a=10,b; void main() { printf("a = 8d and b=%d“,a,b) ; #include void main() { int x-23, y-4; printf("x = %d and y=sd“,x,y);arrow_forward#include using namespace std; void myfunction(int num2, int num1); lint main() { my function (5,2); return 0; } void myfunction(int num1, int num2) {if (num1>3) cout << "A1"; else if (num1<3) cout<<"A2"; else cout<<"A3";} O A2 O A1 O A3 A1 A2 A3arrow_forwardc++, print the outputarrow_forwardIn C++arrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_forward_ios
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education