answersLogoWhite

0

There is no string class in C because C is not an object-oriented language. Assuming you actually meant C++, all built-in identifiers and data types are declared in all lowercase, including std::string, while all macros are declared in uppercase. This is by convention. User-defined identifiers and data types can use mixed case, but it's best to stick to the convention as much as possible. You will often encounter mixed-case or camel-case (LikeThis) which is fine if you're a Pascal coder but it is not a C++ convention -- it's just laziness. Lowercase is less distracting and is much easier to read when multiple word identifiers are separated with underscores.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Write a program in c to convert a given string to lower case?

Use the tolower() function. Example: char* a = 'X'; a = tolower(a); printf("%c", a);


C plus plus library functions for string operations?

You can use "string" class in C++ for string operations or you may use c style string functions as well. #include <string> String class in C++ provides all basic function to operate on strings. you may details descriptin at http://www.cplusplus.com/reference/string/string/


What is the program to create a string class which stores a string value in c plus plus?

C++ already provides a string class in the C++ standard template library. #include<iostream> #include<string> int main() { using namespace std; string s {"Hello world!"}; cout << s << endl; }


What strings are a e f d c b a on the violin?

The highest pitched string is the E string, followed by the A then the D. G is the lowest string. F and lower E are located on the D string. B and C are on the A string.


What is the difference between Char a equals string and char a equals String?

Well, if you write like char a=string; it is wrong. You have to declare the size of the array or else put the brackets immediately after the variable declaration. You also have to put the string in quotes, or provide a comma-separated list of characters. E.g.,char a[]={'s','t','r','i','n','g'};Or more simply:char a[] = "string";Remember that C/C++ is case-sensitive and that all keywords are lower case. Thus Char would be regarded as an invalid keyword.


What is a 6 string bass for?

A Bass guitar with 6 string. It a a 4 string bass with two added strings (a lower B and a higher C) The normal tuning is C G D A E B


Compared to a violin a cello has a?

The cello has a C string and is lower in pitch than the violin.


Write a Java program to generate a copy of itself?

public class S{public static void main(String[]a){String o="public class S{public static void main(String[]a){String o=%c%s%c;System.out.printf(o,34,o,34);}}";System.out.printf(o,34,o,34);}}


Capital C or lower case c for County?

If you're not referring to a specific county (as in this sentence), use lower case 'c.' If you're referring to a specific county, use upper case 'C," e.g., "Cook County is in Illinois."


Write a C program to convert an upper case word to lower case and vice-versa.?

You would use the ToUpper and ToLower functions. string name = "XVengeance"; string upperName = name.ToUpper(); string lowerName = name.ToLower(); Console.WriteLine(upperName); Console.WriteLine(lowerName); Console.ReadLine(); I don't think I'm supposed to do your homework for you, but this code should get you started on making a more dynamic program.


How many constructors does class Exception have?

The Exception class has 4 constructors. They are: a. Exception() b. Exception(String arg) c. Exception(String arg, Throwable arg1) d. Exception(Throwable arg)


What is the C plus plus program for string compare?

You don't need a program to compare strings since std::string already provides support for all the comparison operators (<, <=, >, >=, == and !=). To roll your own you must first create a string class and then provide operator overloads for the comparison operators. To compare strings, start at the first character in each string and compare. So long as they remain equal, move onto the next character. The comparison ends as soon as any character differs. You need only compare these two characters to decide which string is the lesser. To perform a case insensitive comparison, copy the two characters and convert the copies to lower case (or upper case, it doesn't matter). Then compare the copies. Do this for each character as you compare them rather than converting the entire string.