answersLogoWhite

0

Some strings are constants, others aren't; some constants are strings, other aren't. So these are unrelated things. Examples:

"text" -- constant string

123 -- constant number

char s[40] -- variable string

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is the role of plus operator between two string constant?

The plus operator between string constants allows string concatination: string a = "Hello, "; string b = "World!"; string c = a + b; The output of c would be: "Hello, World!".


Function finds the occurrence of a given string in another string?

in C: strstr, declared in string.h


Why does ISO C forbid converting a string constant to 'char' in C?

ISO C forbids converting a string constant to 'char' in C because string constants are read-only and attempting to modify them through a 'char' pointer can lead to undefined behavior and potential program crashes.


Coding constants in c?

Coding constants in c means writing the constants in a certain way that the c language understands.


Why does C forbid converting a string constant to 'char' ?

C forbids converting a string constant to 'char' because string constants are stored in read-only memory, and attempting to modify them through a 'char' pointer can lead to undefined behavior and potential program crashes.


What is return type of string in c?

In C programming, a string doesn't have a specific return type as it's essentially an array of characters. So, if a function is returning a string, it should be declared to return a pointer to a char (char*), since a string in C is represented as an array of characters terminated by a null character ('\0').


Explain different types of constant?

Integer constants Character constants Real/floating point constants String constants


What kind of constructs can be declared in a Java interface?

Constants and abstract methods. That's it.


What is tab in c language?

When printing text through a string, \t can be used to produce a horizontal tab. The same can also be used when parsing input.Within the C language source code, a tab is considered a white space and ignored outside string constants, provided that it does not break a keyword into two parts.


What is the definition of symbolic constants in c language?

constants are values that does not chnage through out the program exceution..


How do you write c program to accept a string from the console and count number of vowels constants digits tabs and blank spaces in a string?

Read the characters one at a time, and write an "if" for each of the cases. In each case, if the condition is fulfilled, increment the corresponding counter variable.


What is cputs function in computer c plus plus?

Nothing.The C language only recognizes a few keywords, like "for" and "if". Most of what's in a C program ... that doesn't reference routines in the C program itself ... are library calls, and cputs() is one of those. What it does is write its argument (which should be a pointer to a character string) to the console... console put string.