Category Archives: C library function

How to count numbers from string ?



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:

c library function strcmp()

for the pseudocode:


here we are actually comparing the contents of lhs and contents of rhs that is passing from the main function.

declaration can be done by this in nay function

int strcmp(const char* str1,const char* str2)

algorithm should be like this:

Two things to remember we are defining here the address value not the length of the string and so it is the comparison between contents of the strings not the length . 🙂