Fill in the blanks in each of the following:
- C stores lists of values in _______.
- The elements of an array are related by the fact that they _____.
- When referring to an array element, the position number contained within square brackets is called a(n) __________.
- The names of the five elements of array p are ___, ____, ___, _____ and ____.
- The contents of a particular element of an array is called the _____ of that element.
- Naming an array, stating its type and specifying the number of elements in the array is called _____ the array.
- The process of placing the elements of an array into either ascending or descending order is called ____.
- In a two-dimensional array, the first index identifies the _____ of an element and the second index identifies the _____ of an element.
- An m-by-n array contains _____ rows, _____ columns and _____ elements.
- The name of the element in row 3 and column 5 of array d is ___.
a)
To fill in the blanks with appropriate word.
C stores the list of values in _Arrays.
Explanation of Solution
Arrays in C stores the homogenous data type of values in consecutive memory locations.Thus, the correct fill up is arrays.
b)
To fill in the blanks with appropriate word.
The elements of the array are related by the fact that they areHomogeneous.
Explanation of Solution
Arrays in C stores the homogenous data type (of the same type) of values in consecutive memory locations e.g. they can contain the same kind of elements like integers, characters, doubles and floats. etc.
Thus, the correct fill up is homogeneous.
c)
To fill in the blanks.
When referring to an array element, the position number contained within square brackets is called aSubscript.
Explanation of Solution
The elements in an array are accessed using the index value contained within the square bracket known as a subscript. It is used to identify the index of the element.
Thus, the correct fill up is subscript.
d)
To fill in the blanks.
The names of five elements of array p are p[0], p[1],p[2],p[3] and p[4].
Explanation of Solution
The elements of the array are accessed using the subscript which start from 0 to length-1.Thus, the correct fill up is p[0],p[1],p[2], p[3] and p[4]..
e)
To fill in the blanks.
The contents of the particular element of the array are called as thevalueof the element in the array.
Explanation of Solution
The content of the element of an array is called the value. For example a is an array and the element at its first positive contains the content 2. So the value will be 2.Thus, the correct fill up is value.
f)
To fill in the blanks.
Naming an array, stating its type and specifying the number of elements in the array is called thedeclarationof the array.
Explanation of Solution
Declaration syntax of an array is as follows-
type arrayname[size];
For example,intarr[5]; //declaration of integer array of size 5.
Thus, the correct fill up is Declaration.
g)
To fill in the blanks.
The process of placing the elements of an array either in ascending order or descending order is calledSorting.
Explanation of Solution
Sorting is the process of arranging the element either in increasing or decreasing order. Thus, the correct fill up is sorting.
h)
To fill in the blanks.
In a two-dimensional array, the first index identifies therow of an element and the second element identifies thecolumnof an element.
Explanation of Solution
The elements in two-dimensional array are stored in rows and column.
Following is the assignment in a 2D array.
a[0][1]=5;
Here 0 is the row number and 1 is the column number and at this position value 5 is stored.Thus, the correct fill up is rowandcolumn.
i)
To fill in the blanks.
An m by n array contains_m_ rows, _n_ columns and _m*n__ elements.
Explanation of Solution
The number of elements in 2 d array is always the product of the number of rows and columns.Thus, the correct fill up arem, n and m*n.
j)
To fill in the blanks.
The name of an element in row 3 and column 5 of array d isd[2][4].
Explanation of Solution
The array indices always start from 0, so the element in 3rd row and 5th column of 2 d array d will be denoted by d[2][4].
Thus, the correct fill up is d[2][4].
Want to see more full solutions like this?
Chapter 6 Solutions
C How To Program Plus Mylab Programming With Pearson Etext -- Access Card Package (8th Edition)
Additional Engineering Textbook Solutions
Introduction To Programming Using Visual Basic (11th Edition)
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
Problem Solving with C++ (10th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Starting Out with Python (4th Edition)
Modern Database Management
- Consider a packet of length L that begins at end system A and travels over three links to a destination end system. These three links are connected by two packet switches. Let di, si, and Ri denote the length, propagation speed, and the transmission rate of link i, for i = 1, 2, 3. The packet switch delays each packet by dproc. Assuming no queuing delays, in terms of di, si, Ri, (i = 1, 2, 3), and L, what is the total end-to-end delay for the packet? Suppose now the packet is 1,500 bytes, the propagation speed on all three links is 2.5 * 10^8 m/s, the transmission rates of all three links are 2.5 Mbps, the packet switch processing delay is 3 msec, the length of the first link is 5,000 km, the length of the second link is 4,000 km, and the length of the last link is 1,000 km. For these values, what is the end-to-end delay?arrow_forwardhow to know the weight to data and data to weight also weight by infomraion gain in rapid miner , between this flow diagram retrieve then selecte attrbuite then set role and split data and decision tree and apply model and peformance ,please show how the operators should be connected:arrow_forwardusing rapid miner how to creat decison trea for all attribute and another one with delete one or more of them also how i know the weight of each attribute and what that mean in impact the resultarrow_forward
- Q.1. Architecture performance [10 marks] Answer A certain microprocessor requires either 2, 4, or 6 machine cycles to perform various operations. ⚫ (40+g+f)% require 2 machine cycles, ⚫ (30-g) % require 4 machine cycles, and ⚫ (30-f)% require 6 machine cycles. (a) What is the average number of machine cycles per instruction for this microprocessor? Answer (b) What is the clock rate (machine cycles per second) required for this microprocessor to be a "1000 MIPS" processor? Answer (c) Suppose that 35% of the instructions require retrieving an operand from memory which needs an extra 8 machine cycles. What is the average number of machine cycles per instruction, including the instructions that fetch operands from memory?arrow_forwardQ.2. Architecture performance [25 marks] Consider two different implementations, M1 and M2, of the same instruction set. M1 has a clock rate of 2 GHz and M2 has a clock rate of 3.3 GHz. There are two classes of instructions with the following CPIs: Class A CPI for M1 CPI for M2 2.f 1.g B 5 3 C 6 4 Note that the dots in 2 fand 1.g indicate decimal points and not multiplication. a) What are the peak MIPS performances for both machines? b) Which implementation is faster, if half the instructions executed in a certain program are from class A, while the rest are divided equally among classes B and C. c) What speedup factor for the execution of class-A instructions would lead to 20% overall speedup? d) What is the maximum possible speedup that can be achieved by only improving the execution of class-A instructions? Explain why. e) What is the clock rate required for microprocessor M1 to be a "1000 MIPS" (not peak MIPS) processor?arrow_forwardPLEASE SOLVE STEP BY STEP WITHOUT ARTIFICIAL INTELLIGENCE OR CHATGPT I don't understand why you use chatgpt, if I wanted to I would do it myself, I need to learn from you, not from being a d amn robot. SOLVE STEP BY STEP I WANT THE DIAGRAM PERFECTLY IN SIMULINKarrow_forward
- I need to develop and run a program that prompts the user to enter a positive integer n, and then calculate the value of n factorial n! = multiplication of all integers between 1 and n, and print the value n! on the screen. This is for C*.arrow_forwardI need to develop and run a C* program to sum up integers from 1 to 100, and print out the sum value on the screen. Can someone help please?arrow_forwardGiven the schema below for the widgetshop, provide a schema diagram. Schema name Attributes Widget-schema Customer-schema (stocknum, manufacturer, description, weight, price, inventory) (custnum, name, address) Purchased-schema (custnum, stocknum, pdate) Requestedby-schema (stocknum, custnum) Newitem-schema (stocknum, manufacturer, description) Employee-schema (ssn, name, address, salary) You can remove the Newitem-schema (red).arrow_forward
- True or False: Given the sets F and G with F being an element of G, is it always ture that P(F) is an element of P(G)? (P(F) and P(G) mean power sets). Why?arrow_forwardCan you please simplify (the domain is not empty) ∃xF (x) → ¬∃x(F (x) ∨ ¬G(x)). Foarrow_forwardHistogramUse par(mfrow=c(2,2)) and output 4 plots with different argument settings.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT