Category Archives: String

String and Hackerearth

String Upper:

String Lower:

Lower Upper Both:

Hackerearth Problem:: Toggle String

Another Approach:

Another Approach:


Helpful Link:

Some string functions


in c i will implement.
Main job of this function is to print a new line autoamtically where printf() does not give this.



The actual work of putchar is it display string as character by character putchar is a macro that outputs character on stdout.

and the basic is : putchar(‘a’)    // it will print a
and putchar(a);     //it will print the value in stored in a
And the basic parameters of this is:
int putchar(int c);

Take input in string:

In string we don’t mention ampersand & sign as string automatically take it as address.


String equality:

String Lower:

String Upper:





Reference for some examples:

Length of a input string

Another method:

With while loop:




Uppercase to Lowercase

Lowercase to Uppercase

Uppercase to Lowercase

another method: