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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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