Convert character store in variable c to an uppercase letter

Assignment Help Basic Computer Science
Reference no: EM131608673

Question: Write a single statement to accomplish each of the following. Assume that variables c (which stores a character), x, y and z are of type int, variables d, e and f are of type double, variable ptr is of type char * and arrays s1[100] and s2[100] are of type char.

a) Convert the character stored in variable c to an uppercase letter. Assign the result to variable c.

b) Determine whether the value of variable c is a digit. Use the conditional operator as shown in Figs. 8.2-8.4 to print " is a " or " is not a " when the result is displayed.

c) Determine whether the value of variable c is a control character. Use the conditional operator to print " is a " or " is not a " when the result is displayed.

d) Read a line of text into array s1 from the keyboard. Do not use scanf.

e) Print the line of text stored in array s1. Do not use printf.

f) Assign ptr the location of the last occurrence of c in s1.

g) Print the value of variable c. Do not use printf.

h) Determine whether the value of c is a letter. Use the conditional operator to print " is a " or " is not a " when the result is displayed.

i) Read a character from the keyboard and store the character in variable c. j) Assign ptr the location of the first occurrence of s2 in s1.

k) Determine whether the value of variable c is a printing character. Use the conditional operator to print " is a " or " is not a " when the result is displayed.

l) Read three double values into variables d, e and f from the string "1.27 10.3 9.432".

m) Copy the string stored in array s2 into array s1.

n) Assign ptr the location of the first occurrence in s1 of any character from s2.

o) Compare the string in s1 with the string in s2. Print the result.

p) Assign ptr the location of the first occurrence of c in s1.

q) Use sprintf to print the values of integer variables x, y and z into array s1. Each value should be printed with a field width of 7.

r) Append 10 characters from the string in s2 to the string in s1.

s) Determine the length of the string in s1. Print the result.

t) Assign ptr to the location of the first token in s2. Tokens in the string s2 are separated by commas (,).

Reference no: EM131608673

Questions Cloud

Initial margin requirement-what is maximum dollar purchase : If the initial margin requirement is 60 percent, what is the maximum dollar purchase you can make?
Mainstay in america shopping experience : Wal-Mart has become a mainstay in American's shopping experience. Wal-Mart has also been scrutinized over the past 10 years with less favorable opinions.
Senior management to adopt specific recommendations : As a paid consultant, you must persuade the senior management to adopt your specific recommendations.
Explain why equilibrium of supply and demand is desirable : Prepare a 1,050-word paper addressing the following: Explain why equilibrium of supply and demand is desirable
Convert character store in variable c to an uppercase letter : Write a single statement to accomplish each of the following. Assume that variables c (which stores a character), x, y and z are of type int, variables.
Explore a recent or emerging form of technology : Provide an introduction that defines both technology and social change, and discusses how they are related.
Stephenson real estate recapitalization : Construct Stephenson's market value balance sheet before it announces the purchase. Suppose Stephenson decides to issue debt to finance the purchase.
Discuss a compare and contrast writing task : A compare and contrast writing task, your task is to write based on Into The Wild film and Tracks - Robyn Davidson
Purchase motivations for b2b and b2c markets : Compare and contrast the purchase motivations for B2B and B2C markets. Include in your discussion, from a marketing manager's perspective

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Treated differently then other prices

Wages are a price as well but they are treated differently then other prices. Engage in the following conversation.

  Implement and test code in the project

What does the method call frame. repaint() do, which you can see in the makeDarker method?

  Carrying and using in five years

Walt asks each of them what they imagine they will be carrying and using in five years, what do you think you will be working on primarily five years from now?  What will this device look like?

  Compute millions of instructions per second of program

Compute the MIPS (Millions of Instructions Per Second) rating for each processor during execution of this particular program

  Initialization vector iv for running

Assume that the initialization vector IV for running the considered block cipher in CBC mode is known. How many plaintexts and ciphertexts are now needed to break the cipher by performing an exhaustive key search? How many steps need now maximally..

  What do you do when an application freezes

What do you do when your computer freezes and what do you do when an application freezes?

  Common language that computers

What is the common language that computers use to talk with one another on a network?

  How well the above data are predicted by correlation

Express your results in terms of the percent difference between the experimentally determined Nusselt number and that calculated from the equation.

  Compute and plot the phase response using the function freqz

Determine analytically ∠H (ejω) and use the formula obtained to compute and plot the phase response.

  Calculate the product of the two numbers

In general ask the user for 2 numbers, calculate the product of the two numbers (mul) and store product in memory. Then divide the 2 numbers entered and store the quotient and remainder in memory.

  How many iterations does it take to converge

Suppose Newton's method is applied to a linear system Ax = b. How does the iterative formula look and how many iterations does it take to converge?

  Picking a location for a network operation center noc

What are the three key factors that you would consider in picking a location for a Network Operation Center? (NOC)?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd