This blog is under construction

Saturday 17 March 2012

toupper example in C

Header file:
    ctype.h

Synopsis:
    int toupper (int input)

Description:
    converts the given input to lower case if possible

Return Value:
    returns upper case of "input", if "input" is in lower case.  Otherwise "input" is returned unchanged.


toupper function C example:


  #include<stdio.h>
  #include<ctype.h>
  int main() {
        char c;
        printf("Enter your input:");
        c = getchar();
        printf("Result for the given input: %c\n", toupper(c));
        return 0;
  }



  Output:
  jp@jp-VirtualBox:~/cpgms$ ./a.out
  Enter your input:a
  Result for the given input: A



3 comments:

  1. Do you need Finance? Are you looking for Finance? Are you looking for finance to enlarge your business? We help individuals and companies to obtain finance for business expanding and to setup a new business ranging any amount. Get finance at affordable interest rate of 3%, Do you need this finance for business and to clear your bills? Then send us an email now for more information contact us now via (financialserviceoffer876@gmail.com) whats-App +918929509036 Dr James Eric Finance Pvt Ltd Thanks

    ReplyDelete
  2. Function toupper takes a character as input in form of an integer. When we pass a value of type char to toupper function, corresponding ASCII value of that character is passed. toupper function in C

    ReplyDelete
  3. A rich tapestry of tale that combines humor, drama, and supernatural elements is how the manga unfolds. The Baldy Vampire has to navigate a world full with obstacles from both the human and vampire communities.

    ReplyDelete