11. A _____________ error does not cause the
compiler to generate an error, but does cause the program to
produce incorrect results.
Syntax, logic, variable name, function name
12. A syntax error occurs when the programmer violates one or more grammar rules of the C language.
True or False
13. Given this line of code:
y = sqrt(x);
x would be known as the argument.
True or False
14. A void function does not return a value to the
function that called it.
True or False
15. A C function can return, at most, only one
value.
True or False
16. Given this line of code:
function1(a,b,c);
identify below the type of C statement this is.
A function header, function prototype, function call, illegal
statement
17. Given this line of code:
void function2(int,int,int,int,int);
Identify this line of code below as:
A function header, function prototype, function call, illegal
statement
18. Given the following line of code
int function3(int a, float b, char c)
Identify this line of code as:
A function header, function prototype, function call, illegal
statement
19. While a C function can return at most one
answer, it can provide multiple answes by using input/output
parameters.
True or False
20. A _____________ is a memory cell that stores the
address of a data item.
A function, loop, prototype or pointer.
11.
A logic error does not cause the compiler to generate an error, but does cause the program to produce incorrect results.
The correct answer is Logic error.
12.
The programmers sometimes violates the grammer or syntax rules of the programming language, then comipler shows the syntax error.
Therfore, the given staement is TRUE.
14.
When function executes, the void funcation return a value to the function.
Therfore, the given staement is TRUE.
15.
The C function doesnt return more than one value. It returns one value. If programmer want to return more than one value in C they need to create struct.
Therfore, the given staement is TRUE.
11. A _____________ error does not cause the compiler to generate an error, but does...
answer in c++ Using the table below, complete the C++ code to write the function prototype statement, and the void function header. The void function should receive three double variables: the first two by value and the last one by reference. Name the formal parameters num1, num2 and answer. The function should divide the num1 variable by the num2 variable and then store the result in the answer variable. Name the function calcQuotient. Also write an appropriate function prototype for...
9) 10 pts. What is the final result that will be stored in "a? double a = 3. double b = 12. double c = 4 .; a 3. For 10 & 11 use the following function prototype: void Funl (int a, float c, double d); 10) 5 pts. Write the function call. Include the variable definitions. 11) 5 pts. Write the function header with an empty function body. 12) 5 pts The following code does NOT get a runtime...
Question 1 Answer the questions below about this function prototype: double coinTotal (double coinValue, int nCoins); What is the type of the return value? How many parameters does the function take? What is the name of the function? Question 2 These are defined in the function heading and tell a user what data needs to be sent to a function. Question 3 What is the term used for a variable sent as data in a function call, such as n1...
Here is everything I have on my codes, the compiler does not allow me to input my name, it will print out "Please enter your name: " but totally ignores it and does not allow me to input my name and just proceeds to my result of ID and Sale. Please help. I've bolded the part where it I should be able to input my name package salesperson; public class Salesperson { String Names; int ID; double Sales; // craeting...
PLEASE USE VERY BASIC REGISTERS AND CODE TO DO THE FOLLOWING Objectives: -write assembly language programs to: -define a recursive procedure/function and call it. -use syscall operations to display integers and strings on the console window -use syscall operations to read integers from the keyboard. Assignment Description: Implement a MIPS assembly language program that defines "main", and "function1" procedures. The function1 is recursive and should be defined as: function1(n) = (2*n)+9 if n <= 5 =...
1. A(n) ____________________ is a variable or expression listed in a call to a function. 2. The pass by ____________________ mechanism must be used if the calling code is to receive information back from the function. 3. True or False? If there are several items in a parameter list, the compiler matches the parameters and arguments by their relative positions in the parameter and argument lists. 4. True or False? In C++, a function definition may have another function definition...
I undertand the algo is Peterson's Solution and that it will not cause deadlocks or busy waiting. But does this solve the critical section problem in its entirety such as in the case of more than 2 processes. Does this Scanned Documents 1.jpg w the following code. What algorithm does this implement? solve the critical section problem, defend your decision, explain in detail Revi #define FALSE O #define TRUE 1 /*number of processes / #define N 2 int turn int...
1-Is it possible to run a program without a main() function? Yes No 2- How many main() functions can one have in a program? 2 This depends on what compiler you use. As many as you like 1 3- What does the following code fragment leave in x? char a = 'A'; int x = sizeof (a); 1 Depends on what compiler you use. 4 2 4- True or false: In a C program I can have two functions with...
QUESTION 1 Which statement results in the value false? The value of count is 0; limit is 10. (count != 0)&&(limit < 20) (count == 0)&&(limit < 20) (count != 0)||(limit < 20) (count == 0)&&(limit < 20) 10 points QUESTION 2 If this code fragment were executed in an otherwise correct and complete program, what would the output be? int a = 3, b = 2, c = 5 if (a > b) a = 4; if (...
"Function does not take 0 arguments". I keep getting this error for my last line of code: cout << "First Name: " << employee1.getfirstName() << endl; I do not understand why. I am trying to put the name "Mike" into the firstName string. Why is my constructor not working? In main it should be set to string firstName, string lastName, int salary. Yet nothing is being put into the string. #include<iostream> #include<string> using namespace std; class Employee { int...