Questions tagged [toupper]

In C / C++ toupper function converts a given character to uppercase according to the character conversion rules defined by the currently installed C locale. In the default "C" locale, the following lowercase letters abcdefghijklmnopqrstuvwxyz are replaced with respective uppercase letters ABCDEFGHIJKLMNOPQRSTUVWXYZ.

176 questions
0
votes
1 answer

C For loop skips first iteration and bogus number from loop scanf

I am creating a mailing label generator for school and am having an issue with a few problems. My program is to take the full name, address, city, state, and zip code for individuals from 0 to 10. When running my program I am having two major…
ubutom
  • 35
  • 6
0
votes
1 answer

C# TextBox Auto Caps Lock On

I need the following code : When I press shift key then I write small letters in my TextBox in other case I write big letters something like a “reverse” or all time pressed Caps Lock Key. So This code and other similar is helpless because there are…
OXXYM
  • 1
0
votes
2 answers

C : Process keeps exiting before being able to input anything

I'm having trouble with my code below. Before I could input a response [y/n], it just exits the program. I don't see any errors in my compiler so I'm having a hard time fixing this. srand(time(NULL)); int nGid; //guest id char opt1; …
Leila K.
  • 77
  • 6
0
votes
2 answers

How to convert values to ToUpper from values in Get-WMIObject Win32_Printer

Trying to write a script to remove all network printers from a system but leave the other printers / fax alone. $Printer = Get-WMIObject Win32_Printer | Select-Object ServerName, ShareName to get the values for $Printer but cannot get it to change…
0
votes
1 answer

Calculating upper and lower bound

Suppose there is a function f(x)= 19n^2/5n +1-n I want to calculate upper and lower bound. But I had this confusion that whether I have to calculate in terms of n^2? Because dominating term is n^2 or If I solve the above equation as f(x)= 19n/5…
Tom
  • 23
  • 1
  • 6
0
votes
2 answers

IgnoreCase vs ToUpper/ToLower Database Query

I'm storing usernames in my database but wish to retain the username casing so that users can have usernames such as "FooBAR". I also wish for usernames to be unique (regardless of case) - "BaR" would cause "bar" to be unavailable. I see three…
brad
  • 1,407
  • 19
  • 33
0
votes
1 answer

Can't get toupper to work

I want to transform the contents of a factor column in a dataframe from lowercase to upper case. The function toupper(dataframe$columnname) prints the contents in uppercase, but nothing actually seems to happen to the contents. When I check using…
KaC
  • 287
  • 1
  • 5
  • 19
0
votes
6 answers

Counting Character usage in text file? C

Hi, I need to count the usage of alphabetical characters in some plain text file. This is what i have came with. Basically just run through the text file and compare each character with the ASCII value of specific searched character. When I run…
schullzroll
  • 168
  • 13
0
votes
4 answers

Cannot change a sentence to capital letters

Why doesn't the following program change a sentence to uppercase? #include #include using namespace std; int main() { char name[20]; cout << "what is your name?" << endl; system("pause"); cin.get(name,…
0
votes
1 answer

Using toupper with a structure in C

What I am trying to do is to have the user input their information. Like state for example. I need to process this state abbreviation and output it as capital letters. I'm confused at how to do that because I am using structures. When I use what…
Drew
  • 23
  • 1
0
votes
2 answers

Getting multiple Strings into an Array

I'm having difficulties with my homework. I have the basic logic down but I'm messing up. The objective is to make a receipt from a shopping list that's inputted by the user. For example, the user enters: Apples OraNgeS // also it's not case…
Corey Dean
  • 11
  • 1
  • 3
0
votes
1 answer

Socketpair is only printing the first line from stdin

I am doing a simple project in C involving fork() and socketpairs. The program forks a process then creates a socketpair for the processes to talk to one another. The parent process reads lines from stdin one at a time until EOF, and then sends the…
user5447431
0
votes
2 answers

toupper() not working in a for range loop

Can anyone shed any light on this not working? I tested if it was directly referencing the char correctly by changing the toupper() expression to an expression that made every character an 'X' and that worked so I have no idea what's going wrong. …
Ezra Goss
  • 124
  • 8
0
votes
3 answers

Can't convert lowercase to uppercase with pointer

So I want to make lowercase letters to uppercase with one condition, before the lowercase letter there must be space, but the problem is I can't check if the next char in the array(using +1) is a space or not. #include #include…
Kevin Mogi
  • 117
  • 1
  • 7
0
votes
3 answers

Strange output of the C program using toupper function

Here is my program to uppercases all letter inputted from the standard input. But some output is very strange. For example, if input is "lorem ipsum" and output will be "LOREM IPSUMS?". If input is a single character such as 'm', the output will be…
Jennifer Q
  • 257
  • 3
  • 12