Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a type of error not found by the complier Logic Error Syntax Error Typing Error Keyword Error Question 2 2 pts Find the

This is a type of error not found by the complier Logic Error Syntax Error Typing Error Keyword Error

Question 2 2 pts Find the camel case thisIsCamelCase ThisIsCamelCase tHISiScAMELcASE NoNoThisISCamelCase Question 3 2 pts Which is an example of a valid input statement? scanf_s("%i", &input); Attach the peripheral device. printf("The tax rate is: %.2lf", taxRate); scanf_s("Please enter the tax rate: %.2lf ", &taxRate); Question 4 2 pts Which of these is a valid variable name that meets the naming conventions? my Variable 6wsO321 taxRate 1dogCount Question 5 2 pts This is the data type (in place of the data type) assigned to a function that returns nothing void none leave it blank empty Question 6 2 pts Things that start with a \ are called what? invisible characters key words escape characters format specifiers Question 7 2 pts Edit this QuestionDelete this Question This uses a condition and has an optional else clause. if switch loop break Question 8 2 pts This is a pretest loop while do continue goto Question 9 2 pts This statement is found at the beginning of a C program to link to the necessary *.h files. #include #define #link #stdlib Question 10 2 pts printScan() is a function that we used during this class to send data to the screen (to print on console window).. True False Question 11 2 pts Convert this binary number to hex: 0011 1011 1111 0010 0x311152 0x3bf2 0x2fb3 0x3af2 Question 12 2 pts Convert this number to decimal: 1001 1110 146 288 158 None of those. Question 13 2 pts Convert this binary number to decimal: 1111 1111 65,535 256 255 30 Question 14 2 pts int x = 7; while (x < 10) { printf("Merry Christmas "); x++; } Describe the effect of the above code if it were a part of a C program... Prints Merry Christmas three times. Prints Merry Christmas two times. Prints Merry Christmas four times. Prints Merry Christmas one time. Question 15 2 pts int a = 4, b = 9, c = 2, Evaluate c >= 2 && a < 5 || b < 8 True False Question 16 2 pts What is a variable? a pointer a place in memory to hold data int a computer programming language Question 17 2 pts C and C+ are the same thing. True False Question 18 2 pts #define HOCKEY 5 HOCKEY is now a constant whose value cannot change during execution of the program. This is an Error since there was no data type assigned to HOCKEY HOCKEY can be changed during execution but only from within Main HOCKEY can be changed during execution but only from outside of Main Question 19 2 pts How many pieces of data can a variable hold at a given time? two infinite it depends on the data type none one Question 20 2 pts Convert the decimal number 23 to binary. Which is the correct answer? 0001 1110 0001 0111 1110 1000 0001 0101 Question 21 2 pts The following code outputs... 5.0, 25.0, 60.0 5.0, 25.0, 30.0 5.0, 30.0, 55.0 60.0, 25.0, 5.0 Question 22 2 pts Display whatever word the user enters in the function getWord Displays Valencia Display Nothing No clue what it would display Question 23 2 pts True False Happy Sad Question 24 2 pts Nothing Hello World How Question 25 2 pts Describe the output of the following code Hello (once) Hello (Twice) Hello (Three Times) Nothing Question 26 2 pts Why do we prototype functions So that we can write them below MAIN and not have an error during compile time For documentation purposes That is how functions are declared Because if you write the functions before Main the code will not run. Question 27 2 pts When should you pass an argument by value Whenever possible When you want the function to make changes When you are too lazy to add the & When you are NOT passing an array Question 28 2 pts The following code outputs: 5 0 10 1 Question 29 2 pts Describe the output of the following code: It would output about 19 numbers It would output 100 numbers It would not output anything It would output about 38 numbers. Question 30 2 pts Describe the result of the following code (before the pause) There is an array called x. It has 100 elements. The first element has a 5 and the remaining 99 elements contain a zero. There is an array called x. It has 100 elements. The first element has a 5 and the remaining 100 elements contain a zero. There is an array called x. It has 100 elements. All of the elements contain a zero. There is an array called x. It has 100 elements. The first 99 elements contain a zero and the last element has a 5. Question 31 2 pts counter = add(num1, num2, num3); In this line of code, a function is declared with three parameters. In this line of code, a function is called with three arguments and the result of the function is stored in the variable counter. In this code, there are only two arguments passed to the function. The function in this line of code is a void function. Flag this Question Question 32 2 pts Describe the output of the following code Hello (once) Hello (Twice) Hello (Three Times) Nothing Question 33 2 pts # include # include # define pause system("pause") int code(int z) { int result; result = z; return result; } main() { int z = code(5); printf("%i ", z); pause; } The code outputs: 5 0 10 1 Question 34 2 pts Describe the output of the code: It would output about 19 numbers It would output 100 numbers It would not output anything It would output about 38 numbers. Question 35 2 pts Describe the output of the following code Displays Hello Twice Does not display Hello Displays Hello Three Times Displays Hello Forever Question 36 2 pts There can be only one main function in any C program. True False Question 37 2 pts The same varible names can be used in different functions without any conflict. True False Question 38 2 pts # include # include # define pause system("pause") int getInt() { int result; printf ("Enter number:"); scanf_s("%i", &result); return result; } void displayMessage(int yes) { printf("%i ", yes); } main() { int x = 5; displayMessage(getInt(x)); pause; } This will display the exact integer value the user enters Will display the number the user enters after adding 1 to it Will display yes Will display getInt() Question 39 2 pts What will be the output? Hello World How Are You Hello Hello World How Are You Nothing Question 40 2 pts 110 100 90 120 Question 41 2 pts When generating random numbers in your code, you need to execute this line of code once before using the rand() function. This line of code generates a random number. This line of code is used to set the time This line of code is used create a user defined data type called unsigned Question 42 2 pts When this code is finished executing the largest value in the array will be at the bottom. When this code is finished the variable switchMade will equal Y When this code is finished executing the largest value in the array will be at the top. When this code is finished executing the largest value in the array will not be at the bottom. Question 43 2 pts Two elements in the array will contain the same value The values in two elements would be swapped The elements would contain different values The element with the highest value would be on the bottom Question 44 2 pts Two elements will have switched their values...(contents) Nothing would be changed The smaller value will be on top of the larger value in the array. Two elements will contain the same value Question 45 2 pts In this code you can assume that x is an array In this code you can assume that c is an array This code will print out the entire contents of the array. This code will never display any output. Question 46 2 pts The output would be in the shape of a triangle. The output would be in the shape of a rectangle. The output would be in the shape of a diamond. The output would be in the shape of a circle. Question 47 2 pts In the calling program the second argument is now increased by 5 In the calling program the first argument is now increased by 5 In the calling program the first and second arguments are now increased by 5 Because this is a VOID function neither argument are changed. Question 48 2 pts this function will change nothing in the calling program this function will add five to the value passed into it...this will be reflective in the calling program. this function will return five... As a result of this function, a variable increased by 5 is returned. Question 49 2 pts The code will output 10 asterisks The code will output 4 asterisks The code will output 15 asterisks The code will output 3 asterisks Question 50 2 pts array[5] + array[6] = 17 array[5] + array[6] = 40 array[0] + array[9] = 140 The array's first element is array[54]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

What is a mortgage pass-through security? AppendixLO1

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago