What would you like to do?

Write a C program to accept a string from user and display its ascii value and then display sum of all ascii value of strings?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

//C program to accept a string from user and
//display its ascii value and
//then display sum of all ascii value of strings

#include <string.h>

int main() {

char String[100];
int Sum,Index;
Sum=0; //Sum is initially zero

printf("Enter the string:\n");
gets(String); //Accept String from User

Sum+=(String[Index]); //Adds (the ASCII values of) the String characters.

printf("The sum is %d\n",Sum); //Printing it as %d gives the equivalent ASCII value.

return 0;
Thanks for the feedback!

How do you get the character from its ascii value in c?

  You'd have to convert the value to the char type. Example(C): #include ... int n = 65; printf("%c\\n", n); //printf treats n as a character due to %c flag .

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

import java.io.BufferedReader; class GetAsciiValue { public static void main(String arg[]) { InputStreamReader isr=new InputStreamReader(System.in); BufferedReader br= new Bu

Write a program to accept two string and display weather they are identical or not?

I assume the program should be case-sensitive. Here is a code of such program:   #include #include int main() { char str1[100]; char str2[100]; printf("Please

Write overload functions in c plus plus to convert an ascii string to an int and to convert an ascii string to float?

Overloads cannot differ by return type alone. The only way to achieve this is to use output arguments. Since the implementation is exactly the same regardless of the output ty

How can you scan a letter from a String and store it as an integer so that you can compare ASCII values?

A String is essentially a character array with advanced functionality. Any character from a String object can be accessed by calling String's charAt(int position) method. This