Friday, May 15, 2020

Example 1

#include<stdio.h>
#include<ctype.h>
main()
{
    int lower,upper;
    lower = getchar();
    upper = toupper(lower);
    putchar(upper);
}

Questions:
1.) What is the difference between getchar() and putchar() ?
2.) Can getchar() have arguments? Justify the answer.
3.) What is the need for ctype.h header file?
 

No comments:

Post a Comment

Exploring float data type in C

Float is one among the basic data type in C.  Floating point numbers in C has precision up to 6 decimal places.  T he header file float.h de...