d) Following program is designed to input five characters and find the character with minimum ASCII...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
d) Following program is designed to input five characters and find the character with minimum ASCII value. #include #include int main() { char a[5]; int i=0; char minchar; printf("Enter characters->"); scanf("%s",a); minchar=a[0]; for(i=1;i =a[i]) { } printf("Minimum character = %c ",minchar); minchar=a[i]; Suppose, you entered characters "f, m, b, q, t". Table 1 describes how values of i, a[i] and minchar change within the for loop in each step. First row of the table 1 is filled. Write the table in your question paper and fill the blank boxes of the Table 1 with suitable values. steps i a 1 2 3 4 5 0 fmbqt fmbqt fmbqt fmbqt fmbqt Table 1 [10 marks] a[i] minchar f f d) Following program is designed to input five characters and find the character with minimum ASCII value. #include #include int main() { char a[5]; int i=0; char minchar; printf("Enter characters->"); scanf("%s",a); minchar=a[0]; for(i=1;i =a[i]) { } printf("Minimum character = %c ",minchar); minchar=a[i]; Suppose, you entered characters "f, m, b, q, t". Table 1 describes how values of i, a[i] and minchar change within the for loop in each step. First row of the table 1 is filled. Write the table in your question paper and fill the blank boxes of the Table 1 with suitable values. steps i a 1 2 3 4 5 0 fmbqt fmbqt fmbqt fmbqt fmbqt Table 1 [10 marks] a[i] minchar f f
Expert Answer:
Related Book For
Posted Date:
Students also viewed these algorithms questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
You are attempting to arrive at what the monthly rate of change that has recently occurred in the real estate market. In doing some market research, you find two properties that have sold twice...
-
Spectra Energy Corp. (based in Houston) has substantial operations in Canada, and generates much revenue in Canadian dollars. It borrows funds denominated in Canadian dollars (rather than U.S....
-
The Canine Gourmet Company produces delicious dog treats for canines with discriminating tastes. Management wants the box filling Line to be set so that the process average weight per packet is 45...
-
What does it mean to recommend that an expense or revenue should be "accrued?" Would this be considered "normal?"
-
In 2013, Aquaculture Incorporated applied for several commercial fishing licences for its commercial fishing vessels. The application was successful and on January 2, 2014, Aquaculture was granted 22...
-
Consider the following systems of linear equations: X1+0.5x2+x3 = -1 3x1+0.2x2 + 2x3 = 0 2x1 +0.1X2+X3 = 1 (a) Put the equation in compact matrix form Ax = B. (b) Find the inverse of matrix A using...
-
The intrinsic carrier density of a rectangular specimen of Ge is 2.5109 /m. The length, width, and height of the specimen are 20 mm, 3 mm, and 1 mm respectively. Determine the total current and...
-
In the event that oil prices increase sharply, or there is a Global spike in terrorist attacks: Does the event affect aggregate demand (AD) or aggregate supply (AS)? Is the event's effect on AD or AS...
-
Why is having knowledge and the capability to creatively apply that knowledge in creating unique solutions for their buyers so important for today's salesperson?
-
What insights can be gained from comparative genomics studies across species, shedding light on evolutionary relationships, genome evolution, and the functional significance of conserved sequences?
-
can you write summary of chapter 4 - the emergence of modern price theory book- the history of economic ideas by BRANDON DUPONT write summary in about 600-1200 words
-
Do you think agencies have been given too many powers, for example, the FCC? Should there be more judicial review of these entities? https://youtu.be/ow5hZmU7Yfw (Business law course)
-
A paper mill produces a so-called linear board in jumbo reels having a standard width of 68 and each reel has a fixed length. The companys customers, however, order reels having smaller widths (and...
-
If the jobs displayed in Table 18.24 are processed using the earliestdue-date rule, what would be the lateness of job C? TABLE 18.24 Processing Times and Due Dates for Five Jobs Job C D E...
-
In Listing 6.10, what advantage would there be in using character labels, such as a and c, instead of numbers for the menu choices and switch cases? Here is a sample run of the executive menu program...
-
You sell the book C++ for Fools. Write a program that has you enter a years worth of monthly sales (in terms of number of books, not of money).The program should use a loop to prompt you by month,...
-
Write a program that asks how many miles you have driven and how many gallons of gasoline you have used and then reports the miles per gallon your car has gotten. Or, if you prefer, the program can...
-
A truck is traveling at a constant \(25 \mathrm{~m} / \mathrm{s}\) when a motorcycle speeds past at a constant \(40 \mathrm{~m} / \mathrm{s}\). On which vehicle, if either, is the magnitude of the...
-
Sketch the \(\sum F_{x}(t)\) curve for the vector sum of forces exerted on the object whose \(x\) component of momentum is plotted in Figure P8.3. Curve sections are numbered for reference. Data from...
-
You wish to move a crate. (a) Is there a minimum value for the magnitude of the pushing force you have to exert to set the crate in motion? (b) Is there a minimum value for the magnitude of the...
Study smarter with the SolutionInn App