Question 1:
Answer:

Question 2:
Answer:

The statement as given below:
*p = e;
There is not type mismatch but pointer 'p' is pointing to the NULL location. So, this statement will result in a Segmentation fault (core dumped)
The statement as given below:
*p = &d;
It will display the warning message because we are trying to make the assignment of an integer from pointer without casting.
The statement as given below:
s = g;
The 'g' is a double type variable but 's' is a pointer to double type. So, this statement will result in an error message.
C programing - can you check my work? Given the following variable declarations complete the table...
4. Consider the following declarations ; char c = ‘a’; byte b = 1; short s = 2; int i = 3; long l = 4; float f = 5.0f; double d = 6.0; Indicate the value which is assigned to the LHS of the assignment statement in each of the following. a. i = b + 2 * s / 2 + i; b. i = (b + 2 * s) / (2 + i); c. i += (b...
Assignment #1: Write a C++ Program. Consider the following program segment. // Name: Your Name // MU ID: Your ID // include statement (s) l using namespace statement int main() //variable declaration //executable statements // return statement a. Include the header files isotream. b. Include cin, cout, and endl. c. Declare two variables: numi, num2, num3, and average of type int. d. Assign 125 into numi, 28 into num2, and -25 into num3 e. Store the average of numi, num2,...
using the following pseudocode what C++ data types
should be used for the variable "finalAmount"
// Start Declarations num amount num newAmount num interestRate output "Please enter the dollar amount. // input amount output "Please enter the interest rate (e.g., nine percet should be entered as 9.0). // input interestRate newAmount FutureValue (amount, interestRate) // output "The new dollar amount is ", newAmount // Stop 17 num FutureValue (num initialAmount, num interestRate) Declarations num finalAmount finalAmount = (1 + interestRate/100)...
For the following task, I have written code in C and need help
in determining the cause(s) of a segmentation fault which occurs
when run.
**It prints the message on line 47 "printf("Reading the input
file and writing data to output file simultaneously..."); then
results in a segmentation fault (core dumped)
I am using mobaXterm v11.0 (GNU nano 2.0.9)
CSV (comma-separated values) is a popular file format to store
tabular kind of data. Each record is in a separate line...
These are my answere to the following questions: are they right? 1. B 2. T 3. T 4. T 5. F 6. T 7. A 8. D 9. E 10. B 11. B 12. A 13. A 14. D 15. C 16. D 17. T 18. C 19. T 20. T 21. T 22. A 23. T 24. D 25. B 26. A 27. A 28. A 29. T 30. C 31. D 32. A 33. T 34. F 35....
Assignment Overview In Part 1 of this assignment, you will write a main program and several classes to create and print a small database of baseball player data. The assignment has been split into two parts to encourage you to code your program in an incremental fashion, a technique that will be increasingly important as the semester goes on. Purpose This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of...
PROGRAMING IN C. PLEASE HELP FIX MY CODE TO FIT THE FOLLOWING CRITERIA: 1.)Read your stocks from your mystocks.txt file. You can use this information for the simulator. 2.)The stock price simulator will return the current price of the stock. The current prices is the prices of the requested ticker + a random number. 3.)We will assume that the stock price remains constant after the price check till your trade gets executed. Therefore, a buy or a sell order placed...
You are creating a new data type for tracking student’s grades. Create a C++ project in your development tool. Add the header comment and the header files from your C++template.cpp file. Your program should do the following: • Declare an Enum named Grade. The Enum should have the grades A-F and have each grade correspond with A = 90, B = 80, C = 70, D = 60, F = 50. • Declare a variable of Grade type in your...
The goal is to simulate the C heap manager in C++ use -std=c++11 to compile ONLY EDIT THE MemoryManager.cpp file in the sections marked in bold please and thank you • A runtime module used to allocate and de-allocate dynamic memory . • The "heap" is a large "pool" of memory set aside by the runtime system • The two main functions are – malloc, used to satisfy a request for a specific number of consecutive blocks; – free, used...