answersLogoWhite

0


Best Answer

/* Write a function that will scan a character string passed as an argument & convert all lowercase characters into their uppercase characters*/

#include<stdio.h>

#include<conio.h>

#include<string.h>

#include<ctype.h>

int str_upp(char c[])

{

int i;

char x;

printf("\n \n");

for(i=0;i<strlen(c);i++)

{

x=toupper(c[i]);

printf("%c",x);

}

return (0);

}

void main()

{

char c[10];

clrscr();

printf("Enter string : \n");

scanf("%s",c);

str_upp(c) ;

getch();

}

/*

Output:

Enter string :

Heloo

HELOO

*/

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a function that will scan a character string passed as an argument and convert all lowercase letters onto uppercase letters?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is initcap?

the initcap function sets the first character in each word to uppercase and the rest to lowercase.The syntax for the initcap function is:initcap( string1 )string1 is the string argument whose first character in each word will be converted to uppercase and all remaining characters converted to lowercase.


Write a program to initialize a character and print whether it is uppercase lowercase or special character in java module 1?

I'll just write a function to do that, I hope the good people won't try to run it as it is.... void function() { char c = 'a'; if( c &gt;= 'a' &amp;&amp; c &lt;='z' ) System.out.println("LowerCase"); else if( c&gt;='A' &amp;&amp; c &lt;='Z' ) System.out.println("UpperCase"); else System.out.println("Special Character"); }


What does the PROPER function do in Excel?

The proper function in Excel causes the first letter in a text string and any other letters in text that follow any character other than a letter to be changed into uppercase. It converts all other letters to lowercase letters.


What is the length command line argument in character?

Use the function strlen(string);


Does Easytrieve have a version of the COBOL uppercase function?

no


Changing a word to all uppercase letters in c plus plus?

To change any string to uppercase, loop through each character in the string. If the character is in the range 'a' through 'z', decrement the character by decimal 32 (the difference between ASCII value 'a' and 'A'). The following function shows an example of this: void to_upper(std::string&amp; str) { for(int i=0; i&lt;str.size(); ++i) if(str[i]&gt;='a' &amp;&amp; str[i]&lt;='z') str[i]-=32; }


When a function is used as an argument in another function?

It is called callback function. For an example see the qsort function.


What are limits in maths?

Limits (or limiting values) are values that a function may approach (but not actually reach) as the argument of the function approaches some given value. The function is usually not defined for that particular value of the argument.


What happen when a c program passes an array as a function argument?

When an array name is passed as a function argument, the address of the first element is passed to the function. In a way, this is implicit call by reference. The receiving function can treat that address as a pointer, or as an array name, and it can manipulate the actual calling argument if desired.


What is a value that is substituted for the independent variable in a relationship or function?

It is called the argument of the function.


What is the name given to the technique whereby a function argument can be modified by passing a pointer to the argument?

Call_by_reference


When argument are passed by value the function works with the original arguments in the calling program?

When a function is passed by value the calling function makes a copy of the passed argument and works on that copy. And that's the reason that any changes made in the argument value does gets reflected to the caller.