बिजनेस मार्केटिंग का लो कॉस्ट फंडा , अपने मोबाइल से ऑटो sms भेजकर मार्केटिंग करे विजिट करे http://autotextsms.com/ बिजनेस मार्केटिंग का लो कॉस्ट फंडा http://autotextsms.com/

Search This Blog

Translate

Showing posts with label C Program to input a string and store the ascii value of the in an integer array and print the array. Show all posts
Showing posts with label C Program to input a string and store the ascii value of the in an integer array and print the array. Show all posts

C Program to input a string and store the ascii value of the in an integer array and print the array

C Program to input a string and store the ascii value of the in an integer array and print the array


 #include <stdio.h>
 int main()
{ char string[20]; int n, count = 0; printf("Enter the no of characters present in an array \n "); scanf("%d", &n); printf(" Enter the string of %d characters \n" , n); scanf("%s", string); while (count < n) { printf(" %c = %d\n", string[count], string[count] ); ++ count ; } return 0; } OUTPUT:-

 ---------------------------
Enter the no of characters present in an array 5 Enter the string of 5 characters GREEN G = 71 R = 82 E = 69 E = 69 N = 78
 --------------------------------


C Program example List