Gstring manipulation functions

Assignment Help C/C++ Programming
Reference no: EM13166139

Write a program that will define the followingstring manipulation functions. Each is analogous to the

corresponding C++ string function.

 

STRLEN( Str &, Len &) Sent the address of a string, it returns the length in a call-by-reference param.

 

STRCPY( Dest &, Source & ) Sent the address of the Source string, it places a copy of it in the Destination

string.

 

STRCAT( Dest &, Source & )Sent the address of the Source String, a copy of it is attached to the end of

the Destination string.

 

The test program will do at least the following:

 

S1 = "I "

S2 = "love "

S3 = "assembly "

S4 = S1 + S2 + S3 (using STRCAT)

S5 = S3 (using STRCPY)

S6 = S4 (using STRCPY )

L1 = STRLEN( S1)

L4 = STRLEN( S4)

 

 

 

2.) Also write a STRCMP function that returns two values, representing the Z and N

indicators. Compare the following strings and output something like : "I < love" for the first one.

 

Compare:

 

S1 and S2

S1 and S3

S1 and S4

S6 and S4

S5 and S3

 

 

Reference no: EM13166139

Questions Cloud

Detailed calculation of non-controlling interest balance : Detailed calculation of non-controlling interest balance and consolidation worksheet and consolidated financial statements and statements of changes in equity for the group and parent.
What will be the concentration of the diluted solution : If you dilute 28.0 of the stock solution to a final volume of 0.540 , what will be the concentration of the diluted solution?
Write a program that displays a single character : Description: Write a program that displays a single character at 100 random screen locations, with a delay factor of 100 milliseconds.Hint: set the console window screen height to 200 at runtime, and watch the scroll bar jump up and down.
What is the total mass of insulin in the bottle : A bottle contains 175 m: of insulin at a concentration of 20.0 mg/ml . What is the total mass of insulin in the bottle?
Gstring manipulation functions : Write a program that will define the followingstring manipulation functions. Each is analogous to the corresponding C++ string function.
How much heat is required to convert ethanol : How much heat is required to convert 25.0g ethanol at 25C to the vapor phase at 78C? How much to convert 5.00 L?
State what are the partial pressures of the gases in mmhg : Standard Atmos. Pressure is 90.0 atm. What are the Partial Pressures of the Gases in mmHg?
State carbon dioxide obeys the ideal gas and pr equations : the fraction of the initial mass of gas remaining in the tank if carbon dioxide obeys the ideal gas and PR equations of state
What mass of co2 will be produced : Fe3O4 reacts with CO according to the reaction Fe3O4(s) + 4CO(g) --> 4CO2(g) + 3Fe(s). If 201 grams of Fe3O4 is reacted with excess CO, what mass of CO2 will be produced?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Build a definition for a class that stores data

Using C++ language, build a definition for a class that stores data about a two dimensional vector. The class has to have mutators and accessors to get and set the x and y values. Make x and y integers. Then overload the operator * so that it retu..

  Longest increasing subsequence problem

Write a computer program to solve the Longest Increasing Subsequence problem.Your program should read input from a text file (one value per line

  Object oriented programming paradigm is better choice

Explain why object oriented programming paradigm is considered better choice than structured programming paradigm. Does it reflect our "natural" way of thinking or do you find it artificial?

  Randominrange() function that accepts two integer

Write a randomInRange() function that accepts two integer parameters. The parameters will represent the low number and the high number (both inclusive) in the random range. For example, when the function receives 3 and 8.

  Write a method, to be included in a template unsorted list

Write a method, to be included in a template unsorted list class that will print (or reurn) the smallest and the largest values in the list.

  Public transport fare ticketing system

Implement and test a public transport fare ticketing system.

  Create a base employee class

Create a base Employee class and a derived StudentEmployee class

  Create a class called point3d

Create a class called Point3D to represent 3D point in space, a class called Sphere and a class called Cylinder. The sphere is characterized by its center point and the radius while the Cylinder can be characterized by its center point, radius and he..

  Include a main function that will solicit

Include a main function that will solicit a DNA sequence string from the user, call the genes function to obtain all the genes in the sequence and print each one on the console display

  The first will be a structure called point

Create two structures. The first will be a structure called Point and will have as its data members an x and y coordinate. The second will be called Line and will have two Point structures as its data members.

  Write a program that computes the cost of long distance call

Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules.

  Create a template class

Create a template class, SVector, that implements a constructor

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