answersLogoWhite

0

What is Kevin in ASCII values?

Updated: 10/25/2022
User Avatar

DarleneReeves

Lvl 1
11y ago

Best Answer

Determining the ASCII values for any string of characters is simple, requiring a for loop and an understanding of strings.

All a string is in C is an array of characters terminated with ASCII 0 (also known as a zero-terminated string or NUL-terminated string). The following block of code assumes that "sz" is a pointer to your string data and "psz" is a character pointer:

for (psz=sz; *psz; psz++) printf("%02X:%03d ", *psz);

printf("\n");

Step by step, what this code does is:

- Initializes "psz" to the same value as "sz", which means they both point to the address of the first character in the string;

- Checks if the character at the address in "psz" is not zero (meaning not at the end of the string) and, if so, breaks out of the loop;

- Displays a two-character hexadecimal (base 16) and a three-digit (base 10) ASCII representation of the character followed by a space;

- Loops back to the character check

- Displays a newline to move the cursor to the beginning of the next line.

Before the code, and inside your desired function block, define "psz" and "sz" as char* types, and set "sz" to the string "Kevin".

The full listing is as follows:

int main()

{

char *psz, *sz="Kevin";

for (psz=sz; *psz; psz++) printf("%02X:%03d ", *psz);

printf("\n");

return 0;

}

Note that if you're using C++ you'll need to change "char" to "const char".

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is Kevin in ASCII values?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the binary and decimal values for ASCII ltter K?

ASCII for K is 0x4b = 75 = 0100 1011


Can you add ASCII values?

Yes, but if you do, it is not a portable operation.


Why do 0 through 9 have ASCII values?

That's because the inventor of ASCII code thought they are important characters.


What are the similarities between ascii-7 and ascii-8?

First of all ASCII is encoding system that tells how binary data from file could be represented as text. Is was and still is very widely used starting 1960s. Standard ASCII encoding is 7-bits encoding allowing 128 values, while Extended ASCII is 8-bits encoding which allows 256 values, that is 128 more characters in the table. First 128 Extended ASCII table characters is the same as ASCII table, next 128 is additional characters.


What is oem extended ascii?

Extended ASCII is 8-bit encoding which is wider than standard ASCII and also includes all characters from standard ASCII encoding.ASCII is 7-bit, 128 possible values; Extended ASCII is 8-bit , 256 possible value;128 first characters of Extended ASCII is the same as ASCII, next 128 are additional. This why it is called Extended ASCII.What is ASCII?ASCII is mainly English language characters encoding, that is used for representation of text information.


What is ascii value of smily face?

There is no ASCII value of :-) ASCII encodes only single characters, assigning a numerical 0-127 value to each character. However, if you want the ASCII encoding of a smiley, here's some samples (using Hex values): :-) 0x3A2D29 :) 0x3A29


What are the binary and decimal values of the ASCII letter g?

Binary- 01100111 Decimal Value- 103


How do you find the ASCII value of numbers greater than 9?

You can find the ASCII value of numbers greater than 9 using the following functions: std::to_string or boost::lexical_cast or std::ostringstream depending on the compiler that you are using.


Write a Java program to get the ASCII value of the given number?

If you look up the ASCII values for digits, you'll see that 0 = 48, 1 = 49... 9 = 57. So it's a simple matter of adding 48 to your digit to find out the ASCII value for it.


ASCII protocol same of Modbus protocol?

Ascii is not a protocol - it describes a computer system's character set. Communication with a Modbus PLC requires an understanding of how to communicate and the protocol (set of rules) does describe this. Ascii is a set of values describing the Latin codepage set that can represent certain characters in data. There are no communications "rules" with Ascii, just a data representation.


Is ASCII codes vary machine to machine?

No.ASCII stands for American Standard Code for Information Interchange. It couldn't be called a standard if it varied from machine to machine.Note that this only applies to the core ASCII values. Some machines/programs/formats will use a subset or extended set of ASCII codes.


Why is Asian in squares on computer?

Because certain standards such as ASCII have different values than an Asian character set. for example, if the letter (Asian letter here) is represented by 129h in an Asian character set, then when 129h is tried to be put into ASCII, it fails, because 129h is not a valid character in ASCII, and is then shown as a box.