|
Question |
Rating |
View Answer |
|
how to define a class "String" that could work as a user defined string type.Include constructors that will enable us to create an uninitialized string String s1;// string with length 0 and also to initialize an object with a string constant at the time of creation like String s2("Well done!"); Include a function that adds two strings to make a third string.Note that the statement s2=s1; will be perfectly reasonable expression to copy one string to another. Write a complete program to test your class to see that it does the following tasks: (1)Creates uninitialized string objects. (2)Creates objects with string constants. (3)Concatenates two strings properly. (4)Displays a desired string object.
|
|
View Answer |
|
How can I convert a number to a string ? |
|
View Answer |
|
How can I convert a string to a number ? |
|
View Answer |
|
What is the difference between strings and character arrays ? |
|
View Answer |
|
What is the difference between strings and character arrays ? |
|
View Answer |
|
Write to program to accept any number upto 7 digits and convert this number into words like this e.g. 25525 :- twenty five thousands five hundred twenty five. |
|
View Answer |
|
Explain one method to process an entire string as one unit? |
|
View Answer |
|
How would you implement a sbstr()function that extract a sub string from a givn string? |
|
View Answer |
|
How do you print a string on the pointer? |
|
View Answer |
|
Why doesn’t strcat (string, ‘!’); work ? |
|
View Answer |
|
How can i print a’%’ character in a print format string? |
|
View Answer |
|
Tell me the difference between strdup and strcpy? |
|
View Answer |
|
Write a C program that will convert Simple Sentence to Complex/Compound Sentence. |
|
View Answer |
|
If a string variable contain "i am a good boy" then how a c program will print "boy good a am i".? |
|
View Answer |
|
How do I use c-strings to write a c program that Removes multiple spaces between words in a paragraph? |
|
View Answer |
|
How to get string in files and print the string in the reverse order? |
|
View Answer |
|
How can I convert a number to a string? |
|
View Answer |
|
i need a code in c for strings and general, which are important and frequently asked in programming test especially for SUBEX. |
|
View Answer |
|
What is the difference between a string and an array?
|
|
View Answer |
|
How can I convert a number to a string?
|
|
View Answer |