Monthly Archives: February 2016

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:

UVA Solutions 10055 – Hashmat the Brave Warrior

Note: You have to take long long as it is wanted in the description 2^32

SPOJ Solution – TEST – Life, the Universe, and Everything


UVA 11479 – Is this the easiest problem?

Accepted code:

I have tested with some critical input after implementing the first logic and also read the condition for testcases .It is very important to make it accepted.

Critical input:
100 200 300
500 501 502
1000000000 1000000001 1000000002
963 852 741

Critical output:
Case 1: Invalid
Case 2: Scalene
Case 3: Scalene
Case 4: Scalene

Uva Solution – 10783 Odd Sum



Uva 12577 – Hajj-e-Akbar


Uva 1124 – Celebrity jeopardy