Convert a string to ASCII in c

Program to convert string into ASCII values in c programming language:


int main(){
    char str[100];
    int i=0;

    printf("Enter any string: ");

    printf("ASCII values of each characters of given string: ");
         printf("%d ",str[i++]);
    return 0;

Sample Output:
Enter any string:
ASCII values of each characters of given string: 99 113 117 101 115 116 105 111 110 98 97 110 107 46 98 108 111 103 115 112 111 116 46 99 111 109

3. Write a c program to delete the all consonants from given string.


Haris said...

Thanx for da GUIDE in all programs GOD BLESS U.

Anonymous said...

c program to calculate 8 bit crc

Vishu said...

u missed the & for scanf

Anonymous said...

when using string, you don't need to use & :D

Anonymous said...

great man keep it up?

Unknown said...

Write a program that takes a string as input and generates an encoded string as output. Each letter of the input string is encoded by a given rule. Numerical value (1 for A, 2 for B, 10 for J and so on) of the letters are used to define the rules for encoding. The rules for generating codes are as follows:
A – E

Add 3 in its numerical value.

U -- Z

Find the largest integer factor of its numerical value less than the value itself. Multiply it by 12.
For Z, numerical value is 26, largest integer factor of 26 is 13 so, (13*12) is 156 which wraps around all the alphabets 6 full times and ends on Z.
For B,Y, encoded value will be E, H.

this question is of encryption can anyone solve this?

Unknown said...

I'm a complete beginner but I wanted to share my try at this program.


for(int x; (x = getchar()) != EOF; printf("%d ", x));

I just thought this would be worth sharing since the program in the post seems pretty long for something so simple.

hiroshima nagasaki said...

Weird, it cut out certain parts... Here's a link then:

Rajat Anurag said...

please give a method to store the ascii value in another array as i have to use the ascii value further in program

sandeep saxena said...

I preview this blog. Most of the points are very interesting to read. its help me to study also. Thanks for your help.
core java training in chennai
core java classes
core javaTraining in Tambaram
clinical sas training in chennai
Spring Training in Chennai
QTP Training in Chennai
Manual Testing Training in Chennai

cynthiawilliams said...

The given information was excellent and useful. This is one of the excellent blog, I have come across. Do share more.
Ethical Hacking course in Chennai
Ethical Hacking Training Institute in Chennai
Hacking course in Chennai
ccna Training in Chennai
Salesforce course in Chennai
PHP Training in Chennai
Tally course in Chennai
Ethical Hacking course in OMR
Ethical Hacking course in Anna Nagar
Ethical Hacking course in Vadapalani

Chris Hemsworth said...

The article is so informative. This is more helpful for our
magento training course in chennai
magento training institute in chennai
magento 2 training in chennai
magento development training
magento 2 course
magento developer training
Thanks for sharing.

Google Ads Services | Google Ads Management Agency said...

I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
"web designing course in chennai | web designing classes in chennai "
"web designing training in chennai | web designing institute in chennai "
"web designing and development course | web designing training and placement "
web designer courses in chennai | best institute for web designing Classes in Chennai
Web Designing Institute in Chennai | Web Designing Training in Chennai

Naveen S said...

This is the first & best article to make me satisfied by presenting good content. I feel so happy and delighted. Thank you so much for this article.

Learn Best Digital Marketing Course in Chennai

Digital Marketing Course Training with Placement in Chennai

Best Big Data Course Training with Placement in Chennai

Big Data Analytics and Hadoop Course Training in Chennai

Best Data Science Course Training with Placement in Chennai

Data Science Online Certification Course Training in Chennai

Learn Best Android Development Course Training Institute in Chennai

Android Application Development Programming Course Training in Chennai

Learn Best AngularJS 4 Course Online Training and Placement Institute in Chennai

Learn Digital Marketing Course Training in Chennai

Digital Marketing Training with Placement Institute in Chennai

Learn Seo Course Training Institute in Chennai

Learn Social Media Marketing Training with Placement Institute in Chennai