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
Starting Out with C++ from Control Structures to Objects, Student Value Edition plus MyProgrammingLab with Pearson eText -- Access Card Package (8th Edition)
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)
- Lowest Score Drop Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: void getScore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called by main once for each of the five scores to be entered. void calcAverage() should calculate and display the average of the four highest scores. This function should be called just once by main and should be passed the five scores. int findLowest() should find and return the lowest of the five scores passed to it. It should be called by calcAverage, which uses the function to determine which of the five scores to drop. Input Validation: Do not accept test scores lower than 0 or higher than 100.arrow_forwardIn c++ only Please create a class multiplication with three overloaded functions to multiply two or three integers or two double literels. Please provide output and code screenshotarrow_forwardUsing class and objects write a C++ program which can read students' information (Name, Sex, Nationality, Age, Adress (village number and house number)) and: a) Display all the data in a tabular form b) Filter out only females and display the data in tabular form c) Filter out only students whose ages are less than 20 Remember that you should be using a C++ program that uses class and objectsarrow_forward
- In C++, State if the following variable names are valid or invalid. If it's invalid, state why. Note: invalid here means creating a syntax error. a) 1wayTicket b) employee_pay c) #zombies d) R66Y e) STOP! f) Final Examarrow_forwardC++ programming 2. What is the output of the following program (when embedded in a complete program)? void Fun( int& x, int y, int& z); int main( ) { int a, b, c; a = 10; b = 20; c = 30; Fun(a, b, c); cout << a << " " << b << " " << c << endl; return 0; } void Fun( int& x, int y, int& z) { cout << x << " " << y << " " << z << endl; x = 1; y = 2; z = 3; }arrow_forwardWhat will the following program display? #include using namespace std; int main() { int unus, duo, tres; unus = duo = tres = 5; unus += 4; duo *= 2; tres −= 4; unus /= 3; duo += tres; cout << unus << endl; cout << duo << endl; cout << tres << endl; return 0; }arrow_forward
- int main() { E(); C(); E(); } void B() {...} void C() {..} void D() {..} void E() { B(); D(); } A variable declared in function B and only in function B is accessible in?arrow_forwardQuestion 3 Write a program in C, which simulates the game of connect 4, representing the board with coloured tiles, by means of matrices, where the player can choose whether to play with the computer and the computer represents player 2 or with another person, where at the end it shows the winner, the loser or if there was a draw. . Full explain this question very fast solution sent mearrow_forwardint main() { E(); C(); E(); } void B() {...} void C() {...} void D() {...} void E() { B(); D(); } Which describes the order in which the functions are called when the program is run?arrow_forward
- 01. Question Code in Develop a Java program using NetBeans for Codex. Your program should initially display a menu to the user. The menu should have three options, namely (1) Register for a Training Programme (2) Check Registration details (3) Exit Program (see Figure 3 attached). The program should make use of two functions, registerApplicant() for registering a new applicant andsearchDetails() for searching the registrant details. The registerApplicant() function should accept four lines of arguments namely: the registrant’s name, the registrant’s surname, the registrant’s ID number and training programme. It should then write these details to a text file.To write to the text file or retrieve the product details from the text file, you must have a text file to which you write and store the registrant details. Your text file should be named registrants.txt Also, ensure that the program repeatedly shows the menu until the point when option 3 is selected which terminates the program. .arrow_forwardLanguage: Python 3 A particular talent competition has 5 judges, each of whom awards as score between 0 and 10 to each performer. Fractional scores, such as 8.3, are allowed. A performer's final score is determined by dropping the highest and lowest score received, then averaging the 3 remaining scores. Write a program that uses these rules to calculate and display a contestant's score. It should include the following functions: -getJudgeData() should ask the use for a judge's score, store in a parameter variable, and validate it. This function should be called by main program once for each of the 5 judges. -calcScore(score1, score2, score3, score4, score5) should calculate and return the average of the 3 scores that remain after dropping the highest and lowest scores the performer received. This function should be called just once by main and should be passed the 5 scores. Two additional functions, described below, should be called by calcScore, which uses the returned information to…arrow_forwardint fun(int k){ return ( ); void main(){ int n; cin >> n; n = n * fun(n); <-- 1 Fill in the appropriate statement and expression in fun, so that when it is called in main, and after the execution of the statement marked 1, the value of n would always be n3.arrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,