Read the following program and identify the output of the program. int main() { int a=9, b=10; cout<<(a++) +(b--); getch(); return 0; } а. 16 b. 18 С. 19 d. 17
Q: Dollar General Corporation operates deep-discount stores offering housewares, cleaning supplies, clo...
A: Willing to Invest :The decision requires the will to expense and more significantly how much to spen...
Q: Write a C++ program to insert item=45 in Linked List ADT with elements 12, 22, 34, 40, 56, 67, 68 an...
A: #include <iostream> using namespace std; // A linked list node class Node { public: int ...
Q: The Government of Ghana (GoG) seeks to embark on a project called C-GH. C-GH is targeted at starting...
A: NOTE:“Since you have posted a question with multiple sub-parts, we will solve first three subparts f...
Q: Which command will be useful in knowing all the hops between two hosts on a network?
A: The command will be useful in knowing all the hops between two hosts on a network - A. Ping B . Trac...
Q: What are two ways of using nested structures.
A: ANS: - Nested Structures: - The nested structure is nothing but a structure within the structure. T...
Q: Create a class named RealEstate that has data members to hold the price of a house, the number of be...
A: User-Defined Exception: class myException { // Declare variable to store exception message priv...
Q: Q3: Using the data structure in Q1, and Q2 write for functions to perform the following: subtract_c(...
A: #include<iostream>#include<cmath>using namespace std;//class definition for complex numb...
Q: Read the following program and identify the Relational operators used in the program. int main() { i...
A: Actually, c++ is a powerful general purpose language.
Q: Using C language
A: This can be done using nested loop. Below is the code.
Q: Explain five different ways the nationwide network can be applied by the agencies.
A: These are five different ways the nationwide network can beapplied by the agencies: Regional Aggreg...
Q: What is the output of C Program.? int main() { int a[] = {1,2,3,4}; int b[4] = {5,6,7,8}; printf("%d...
A: Answer is option b. 1,5.
Q: Select the security goals to identify the events when they oCcur. O a. Response O b. Detection Oc In...
A: Detection is the answer.
Q: intel 8086 microprocessor
A: Explanation: DW: define word 2 byte word Intial location is 10 11 2A : 10 11 41 2B: 12 13 33 AC: 1...
Q: write a c++ program to move 10 elements of a Unsorted List ADT to a Queue ADT.
A: Concept: ADT List Abstract Data Type: A data type whose properties (domain and operations) are speci...
Q: A moodle.nct.edu.om P Flag question Which one of the following is the responsibility of transport la...
A: The correct answer of the given question is-"c. tracking individual conversions ".
Q: A1(1,0,7) A2(2,5,3) A3(1,8,4) A4(5,3,8) A5(7,3,5) A6(1,6,4) A7(1,4,2) A8(1,4,9) Perform k-means clus...
A: K-means cluster analysis: C1, C2, C3 Final partiton: Number of clusters = 2
Q: What is array in data structure and a example using c++.
A: Introduction: Array: An array is a collection of items stored at contiguous memory locations. An arr...
Q: 7. Create a program to read input for the user a sequence of parenthesis input, {}[]() and check whe...
A: Given: Input: {([])}([]{}())True Input: {(}}False Program: #include<iostream>#include<stack...
Q: Write a program, using functions only, with the following features.1. Program reads paragraph(s) fro...
A: #include <iostream>#include <map> // A map will be used to count the words.#include <...
Q: 3. Is it planar? Is it bipartite? Answer with reason.
A: A bipartite graph is a graph which can be divided into two sets such that no two vertices inside the...
Q: Write a program which should consists of a user defined function “Task ()” [Function returns no valu...
A: Since the programming language is not mentioned therefore answering the question in C language. #i...
Q: Web development
A: Objective: A webpage should be developed such that it can include an animated div element of height ...
Q: Describe the need for convenient and safe backup storage.
A: Data Backup : Data backup plays a major role and keeps our data in safe hands in situations like nat...
Q: A company is building a wireless information system to help tourists find their way around an unfami...
A: The findings that can help them develop a conceptual model are: The company needs to understand the ...
Q: The hexadecimal equivalent of the output (quotient) of binary division of (1100) and (0100) is
A: Binary value: 1100 ÷ 0100 = 011 Decimal value: 12 ÷ 4 = 3 Hex = 3
Q: Reg Tech and AI a) What is the process for translating regulation and legislation into actionable o...
A: Note : As per guidelines , answering one question. Please repost other questions individually.
Q: Identify the invalid variable name from the following given variables. a. Amount45 b. 45amount C. Am...
A: b. 45amount
Q: a renowned software development company of 240 computer programmers 102 employees are proficient in...
A:
Q: Consider a series of numbers given below. Identify the suitable Start, End and Interval values for t...
A: option B
Q: Which of the following is an valid end statement to print the even numbers from 2 to 20 using for lo...
A: As we have to print the numbers from 2 to 20 using a for loop so we need to start our loop at 2 and ...
Q: Using Structures: Write a C Program to create the data for some students (roll, name, mark1, mark2, ...
A: A Structure is a collection of various data Use a Structure for representing each student informatio...
Q: 1) A C++ program to add two numbers using pointers. 2) A C++ program to swap two numbers using point...
A: Note: we are allowed to solve one question in one post. please post other question in separate post....
By running the above program, None of the option is the output. The program contain both c and cpp statements. Cout is ouput function in cpp and getch is in c. So the program shows error.
output
Step by step
Solved in 2 steps with 2 images
- Write a recursive function diff which takes two positive integer arguments (x and y) and returns |x – y|. You may not perform an x - y calculation anywhere in the function! Example calls: diff(3, 7) returns 4; diff(7,3) returns 4 In JAVAThis question is Chapter 9 programming exercise question 3.Draw the activation frame diagram for the following recursive function “factorial()”Code:#include<stdio.h>int factorial(int n); int main(void){int s; s=factorial(5); printf("%d",s); return 0;}/*Compute n! using a recursive definitionPre: n >= 0*/ intfactorial(int n){int ans;if (n == 0) ans = 1; elseans = n * factorial(n - 1);return (ans);}
- Design a calculator application in Java and then code for the following functions a. Perform all the Arithmetic Operations b. Convert input No to Hexadecimal, Octal base c. Find the log, Sin, Cos, Tan, Log, anti-Log of the input No d. Find Cube and Factorial of the input noTrace through (show all the steps as we did in class) for the following java code for the factorial function. Show all the steps (illustrate, do not code) that lead to the final answer when myFactorial(6) is called: int myFactorial( int integer) { if( integer == 1) return 1; else { return(integer*(myFactorial(integer-1); } }explain this programming code
- Write a computer science Java program that is a compound-interst application. repeast steps for interst rates 5,6,7,8,9 and 10 percent. use for loop to vary the interest rateIN HASKELL PROGRAMMING LANGUAGE PLEASE In case you do not know it: the game is played on a 3x3 grid that is initially empty. Two players are playing, by alternatingly making moves. A move by a player places their token (an X for player 1, an O for player 2) into a cell that was empty. We are using algebraic notations for indexing the positions in the board, with A,B,C indexing the columns and 1,2,3 the rows. Specifically, these coordinates would be used in the implementation for moves made by a human player. If the X X O Figure 1: Sample board position same token appears 3 times in any of the three columns, three rows or two main diagonals the game is over and that player wins. If the grid is filled without that happening the game is a draw. For the depicted board, we have Xs in positions C3 and A2, and an O in position B1. It would be O’s turn to make a move; a legal move would be C2, but it is not a good move, because X can force a win by responding A1. O cannot force a win, but…Specify true (T) or false (F) for each of the following statements.(a) In dynamically typed languages, a type error is unnoticed if the statement containing the error is neverexecuted.Answer: true false(b) In OCaml fold right is tail recursive while fold left is not.Answer: true false(c) Immutability fits the functional programming paradigm. Mutability fits the imperative programmingparadigm.Answer: true false(d) Higher order functions are the functions that run with higher than O(n) time complexity.Answer: tree false(e) In every programming language, code must be compiled before it is run.Answer: true false(f) Every language that is a regular language is also a context-free language.Answer: true false(g) Regular expression and finite state automaton are equivalently powerful.Answer: true false(h) Lambda calculus is Turing-complete.Answer: true false
- Implement the child and parent function prototypes of the following program. The parent reads two integer values x and y from the user and sends their values to the child via a pipe. The child should display the value of ? ? on the screen. void child(int fd[]); void parent(int fd[]); int main() { int fd[2]; if(pipe(fd) == -1) exit(1); if(fork() == 0) child(fd); else parent(fd); exit(0); }write a C++ program. Write a program that calculates and displays the average of a group of test scores, all integers, after the lowest score in the group has been dropped. There are six test scores in the group. The program must contain only the following functions in additionto the main:• void getScore should ask the user for a test score, store it in a referenceparameter variable, and validate it. This function should be called by the mainfunction once for of the six scores to be entered by the user.• double calcAverage should calculate and return the average of the five highest scores. This function should be called just once by the main function, and should be passed the six scores. Use pass by reference to receive the lowest test score.• int findLowest should find and return the lowest of the six scores passed to it. It must be called by the calcAverage function, which uses it to determine which of the six scores to drop.• void displayResults should be called by the main function…Computer Science JAVA: If you wanted to test two variables for equivalency, what operator do you use? Give two circumstances in which that operator does not perform as expected, and why.