[ create a new paste ] login | about

Link: http://codepad.org/e4Z2Baci    [ raw code | output | fork ]

godneil - C, pasted on Aug 30:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//Lowercase or Uppercase with Hexidecimal
#include <stdio.h>

int main() 
{
	char my_char = 'T';
	
	if ((my_char & 0x20) == 0)
	{
	    printf("Uppercase");
	}
	
	if (my_char & 0x20)
	{
	    printf("Lowercase");
	}
	
	return 0;
}


Output:
1
Uppercase


Create a new paste based on this one


Comments: