Q1/ False or True 1- Assembler translates a program written in a low-level language to machine language. 2- C++ used to create system applications. 3- float is acceptable identifier. 4- int T=2.5; 5- The sizeof float is 4 bits. 6- The output of this program is 2. int main() { int i=8, j=3; float div; div= i/j;
Q: Create a program in c ++ using the concepts about Pointers (Pointers) Given a string "Hello…
A: The problem is based on the basics of pointers in C++ programming language.
Q: In c++ create a program that will take user input of integers via the console. Enter a negative…
A: #include <iostream>#include <vector>using namespace std;// function to print histogram//…
Q: select the correct answer that describes the C++ statement Q/ int *ptr = &x; cout << * ptr; Ans/ 1/…
A: In C++, a pointer refers to a variable that holds the address of another variable. The dereference…
Q: Write a C++ program to find the area and perimeter of a rectangle. area= length*width;…
A: C++ program to find the area and perimeter of a rectangle:
Q: . The main issue I am having is specifiers errors in compiling the output of my matrix. Can you…
A: here i explained i error in syntax in your code. rewrite a c code with output ss.
Q: Task related to pointers : Write a C++ program to find the max of an integral data set. The program…
A: In this program will ask the user to input the number of data values in the set and each values.…
Q: Union is a construct that allows memory to be shared by different types of data. With a suitable…
A: So to prove this we will declare an union which holds two character types and then one short Then,…
Q: Q1/ False or true 1- Compiler translates a program written in a high-level language to machine…
A: 1) True Compiler is special software that translates (compiles) source code written in a…
Q: 4. Consider the following C program: int fun (int *i) { *i *= 5; return 10; void main () { int x =…
A: If evaluated left to right x = x + fun(&x); = 5 + fun(&x) = 5 + fun(5) = 5 + 10 // here…
Q: n and write a C program that performs the following functionality: 1. Read your student number on…
A: CODE #include <stdio.h> // for argv for command line argument int main(int argc, char…
Q: Find the errors in the following C program and fix them. You may directly mark the error and fix it…
A: Given code contains some error which need to be fixed for proper execution of the code.
Q: Suppose three numbers x, y, z are passed to a function. Implement this function to assign the values…
A: Program code: #include <stdio.h>// String is C standard library Which contain micro…
Q: Write C++ program to demonstrate example of constructor using this pointer.
A: Hey there, I am writing the required solution for the above mentioned problem below. First, I will…
Q: Language: Write a program which does the following: a) reads a double from the keyboard, b) reads a…
A: Here I written C code for given problems. I hope you like it.
Q: Determine the output and draw a memory layout (or memory allocation) of the pointers and variables…
A: According to the information given:- We have to find output and draw a memory layout.
Q: Read your student number on the command line when you call the program executable. Example:…
A: Now, have to read the number using the command line. Step 1.) Argv arrays are used for command-line…
Q: Consider the following C program: int fun(int *i) { *i += 5; return 4; } void main () { int x 3; x =…
A: This question is very important and requires Attention while solving. Note: In 1st question we…
Q: Write a program in C++ that inputs a number in an integer variable. It stores the address of…
A: // C++ program to reverse digits of a number #include <bits/stdc++.h> using namespace std; /*…
Q: Is it possible to perform parallel processing of statements that are implicitly or explicitly…
A: Parallel processing is a process where different process or programs can run simultaneously without…
Q: Create a class “name” with two data members: one for the first name (String) and one for the surname…
A: #include<iostream> #include<string> using namespace std; A) class name{ pubic:…
Q: y and what you are going to do make sure it does not happen again aka learning from your mistakes.…
A: SOLUTION - Problem - the program that takes user inputs values and displays the odd value of…
Q: Explain the following:in C++ a) Me
A: a) Memory leak Memory leakage happens in C++ when programmers allocate memory via a new keyword and…
Q: Design and write a C program that performs the following functionality: 1. Read your student number…
A: It is defined as the mother language of all the modern programming languages because most of the…
Q: Write a program c that converts a 5-bit binary number given by the user, to decimal according to…
A: Introduction of the Program: The C program takes the 5 digit binary number from the user and checks…
Q: Computer Science Write a program that processes a data sequence according to the following…
A: The program to process the data sequence and count the number of color number. The solution is…
Q: Create a C++ address book using the following information: The address should contain a Person…
A: Step 1: Declare class Address with data members for storing the block, unit, floor, street, city,…
Q: Explain the different between a pointer variable and other variables such as int, float, char. You…
A: Introduction of Pointer Variable: In the programming language, the pointer variable stores the…
Q: WRITE A C++ PROGRAM ON FOOD ORDERING SYSTEM IN WHICH CODE WILL END AT POINT
A: Actually, c++ is a powerful general purpose language.
Q: 2. Write a C program which implements the matrix multiplication process. To multiply two matrices,…
A: Screenshot of the C program is as follows:-
Q: Design and write a program in C that will a) Prompt user to enter a vector with no more than 10…
A: Design and write a program in C that will a) Prompt user to enter a vector with no more than 10…
Q: Design and write a C program that performs the following functionality: Prompt the user to enter a…
A: Suppose the vector has been given as the input to a C program. The output of the code is given in…
Q: Please write a code example in Assembly Language where A is returned as b. Please include return…
A: Here we write simple program in assembly language : ================================== 1.we take…
Q: Can you help me create a simple C Program with File Handling Manipulation that displays the students…
A: Please find the answer below
Q: Design and write a C program that performs the following functionality: 1. Prompt the user to enter…
A: We can get the input from the user, and for the entered text, we can change the color if and only if…
Q: Write a C++ Program using classes, functions (recursive and otherwise), arrays and other C++…
A: C++ program to read a text file and sort the data using selection sort.
Q: Write a C++ program that takes a char array (char *) that take your name as input, a char pointer…
A: The above question will use C++ inbuilt functions - isupper() and islower() to check if characters…
Q: Design and write a C program that performs the following functionality: Prompt the user to enter a…
A: the steps to transpose the row to column vector recursively are if the row./column exceeds the size…
Q: 1- Compiler translates a program written in a high-level language to machine language. 2- C++ has…
A: The solution to the given problem is below. ***Note: According to Bartleby policy we are not…
Q: Computer Science Write a program in either Java or C++ that performs a large number of…
A: #include<iostream>#include<cstdlib>#include<ctime>using namespace std; int main(){…
Q: Question 5 Choose the correct answer for following piece of C++ code void func(int a, int &b)…
A: The value of a is passed by value while the value of b is passed by reference. Therefore, the…
Q: What are the benefits of using decimal data types?
A: The benefits of using Decimal data types are
Q: use padding technique to reorder the data structure to reduce the required size to store a single…
A: #include <stdio.h> struct Testing { char c; int address; float phone1; char N;…
Q: Design and write a C program that performs the following functionality: 1. Prompt the user to enter…
A: Code: #include <cstring>#include <iostream>using namespace std; /* Function recursively…
Q: Discuss the effect of fixed or free format on readability, writability, and security.
A: The effect of free format on readability, writability, and security: Free-format languages are the…
Q: Design and write a C program that performs the following functionality: 1. Read your student number…
A: CODE #include <stdio.h> // for argv for command line argument int main(int argc, char…
Q: 1. function (return the bigger float) 3. [Description] 4. Please write a program using c++ language.…
A: Ask the user to enter two floating point numbers. Then in cmp function initialize a flag = 0.001f…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Write C++ code (perhaps around 20-30 lines of code) and make it compile and run showing how to use it. It can be a single code example, or multiple code examples to demonstrate the following. a. char b. short c. int d. sizeof e. typedef f. enum g. struct h. union i. pointerComputer Science Please write the following C code in C++. This is C now, I need the code in C++, not C# nor python or Java! WARNING IF YOU DO NOT DO THE REQUIRED TASK I WILL EITHER DOWNVOTE OR REPORT YOU. PLEASE PAY ATTENTION! I need this code to run on C++ . Screenshot of the result showing the .cpp file have to be also included, along with explanations/comment on the parts you changed. #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #define MAX_SIZE 1000 int VERTEX_COUNT = 0; bool **adjacencyMatrix(){ bool **Matrix = (bool **)malloc(sizeof(bool *) * MAX_SIZE); for(int i = 0; i < MAX_SIZE;i++){ Matrix[i] = (bool *)malloc(sizeof(bool) * MAX_SIZE); } for (int i = 0; i < MAX_SIZE;i++){ for (int j = 0; j < MAX_SIZE;j++){ Matrix[i][j] = 0; } } return Matrix; } void freeMatrix(bool **Matrix){ for(int i = 0; i < MAX_SIZE;i++){ free(Matrix[i]); } free(Matrix); } void readInput(bool **Matrix){ int a, b; printf("get ready"); while(scanf("%d…Although Algol60's flexible style permits statements to start and stop anywhere, the majority of programming languages today demand that statements explicitly end with an end symbol, such as a semicolon or a colon. In contrast, Python and a select few other programming languages have a predefined structure whereby statements start in a certain column and conclude at the end of a line of code unless continuation marks are included for each statement. You will discover how fixed or free formats affect readability, writability, and security in this section.
- In c++ create a program that will take user input of integers via the console. Enter a negative value to end the input. Create a histogram that outputs the date. use VECTORS not arrays. The histogram will be outputted using bins with each bin being of size ten. Example Bin 1 is from 0-9 Bin 2 10-29 etc...... Output the histogram to the console.. Write a complete C++ program, 1.1) The program contains three functions named F1, F2 and F3. 1.2) The function F1 takes a 2D character array with its sizes (number of rows and columns) and initializeittoempty character. 1.3) The function F2 takes the 2D array does the following, 1.3.1) Fill the rows whose sum of indexes (i , j) is equal to 20 with character ‘ + ‘. 1.3.2) Fill the columns whose sum of indexes (i , j) is multiple of 7 or 11 with character ‘ - ’. 1.3.3) Fill the rows whose sum of indexes (i , j) is greater than 30 and less 50 with character ‘ *‘. 1.3.4) Fill the last 5 columns with character ‘ . ‘. 1.4) The function F3 counts the number of empty characters, asterisks, addition symbols, subtractionsymbolsanddot symbols. Then the function returns the result to the main function.Answer this question in C++ Programming: Define a structure called Date with month, day and year as its only data members, Time with hour and minute as its only members and Event with desc (a c-string for description of maximum size 80), date (of type Date) and time (of type Time). Write a readEvents() function that will keep asking the user if he or she wants to add a new event. As long as the user answers with a 'y' or 'Y', allocate memory dynamically for an Event structure, storing the pointer returned by new in the array of Event pointers and then read the Event data from the keyboard and store them in the Event just created. Dates should be entered like 5/21/20 and times as 10:15. When finished entering the Events, the function will return the number of Events entered. Write a sort-desc() function to sort the Events by their description by rearranging the pointers (rather than the structures), by passing it the array of pointers and the number of Events created. Use a swapPtrs()…
- Write a C program that includes the following: Has 2 functions: main and swap. swap will receive two integer pointers and swap the integer values using these pointers main will have 2 integers a = 5 and b = 2 main will call swap so that a becomes 2 and b becomes 5 main will display the value of a and b both before and after the swap.Write a C++ program: A palindrome is a word that reads the same forwards and backwards for example "A Toyota" or "radar". Write a C++ program (we suggest pointers), that will ignore spaces but read in strings of characters and determines if they are palindromes. test: A ToyotaDesign and write a C program that performs the following functionality: 1. Read your student number on the command line when you call the program executable. Example: testq1.exe 201314493 2. Check if sufficient number of input arguments have been entered. 3. If insufficient number of input arguments have been entered, write an error message and exit the program by returning minus (negative) one (-1); 4. Copy the student number into a string array and determine its length. 5. Prompt the user for their first and last name. Store these values. 6. Loop through each number in the student number and determine if the digit is even or odd. For example, in the above example, the first and second digits are even (20), and the third and fourth digits are odd (13). 7. If the number is even, then convert the number to the next odd number. For example, if the number is 2, then add one to the number to make it an odd number, 2+1 = 3. 8. Hint: check the remainder to determine if a number is even (0)…
- Write Implicit and Explicit code blocksEmployee Salary Calculator Program and Analysis Demonstrate an understanding of C++ programming concepts by completing the following: Program: Create a C++ program that will function as an Employee Salary Calculator. Obtain from the user: Double variables for Standard Hours worked Rate of Pay Overtime Hours (if applicable) Calculate appropriate pay for standard hours and overtime (1.5 x rate of pay). Provide formatted output using the following methods setw() setprecision() Store the values into three different variables. For each double variable, create a double pointer to dynamic memory. Display the contents of the variables and pointers. In your program, be sure to use the new operator and delete operators to manage dynamic memory. Program Analysis: Given your program implementation, discuss and identify the possible security vulnerabilities that may exist. If present, discuss solutions to minimize the vulnerabilities. Discuss and identify possible problems that can result…Please answer in C++ Define a structure called Date with month, day and year as its only data members, Time with hour and minute as its only members and Event with desc (a c-string for description of maximum size 80), date (of type Date) and time (of type Time). Write a readEvents() function that will keep asking the user if he or she wants to add a new event. As long as the user answers with a 'y' or 'Y', allocate memory dynamically for an Event structure, storing the pointer returned by new in the array of Event pointers and then read the Event data from the keyboard and store them in the Event just created. Dates should be entered like 5/21/20 and times as 10:15. When finished entering the Events, the function will return the number of Events entered. Write a sort-desc() function to sort the Events by their description by rearranging the pointers (rather than the structures), by passing it the array of pointers and the number of Events created. Use a swapPtrs() function to swap…