upper to lower case in c code example
Example 1: to upper in c
#include <ctype.h>
Example 2: in c, is class uppercase or lowercase
class {
}
Example 3: convert string to lowercase in c
#include <stdio.h>
#include <cs50.h>
#include <ctype.h>
#include <string.h>
#include <math.h>
int main(int argc, string argv[])
{
if (argc != 2)
{
printf("Usage: ./substitution key\n");
}
else if (strlen(argv[1]) != 26)
{
printf("Key must contain 26 characters.\n");
}
string key = argv[1].toupper();
string key = argv[1].tolower();
}