strupr() function in c strupr() 函数用于将给定的字符串转换为大写。 语法: char*strupr(char*str); 参数: str:这表示我们要转换为大写的给定字符串。 返回:返回给定字符串str的字符转换为大写后得到的修改后的字符串。 以下程序说明了 C 中的 strupr() 函数: 示例1:- // c
示例1: // c program to demonstrate// example ofstrupr() function.#include<stdio.h>#include<string.h>intmain(){charstr[ ] ="geeksforgeeks is the best";//converting the given string into uppercase.printf("%s\n",strupr(str));return0; } 输出: GEEKSFORGEEKS IS THE BEST 示例2: // c...
The_struprfunction converts, in place, each lowercase letter instringto uppercase. The conversion is determined by theLC_CTYPEcategory setting of the current locale. Other characters are not affected. For more information onLC_CTYPE, seesetlocale. ...
Create Custom strupr() Function in C Programming In the following example a customstrupr()function is created which is converting a lowercase string to uppercase: #include <ctype.h> #include <string.h> voidmain() { charstring[]={"linuxhint"}; ...
and be large enough to contain the concatenated resulting string.sourceC string to be appended. This should not overlap destination.Return Valuedestination is returned.Example/* strcat example */include <stdio.h>include <string.h>int main (){char str[80];strcpy (str,"these ");...