Code::Blocks Forums

User forums => Help => Topic started by: Rabib on March 31, 2011, 02:27:08 pm

Title: Problem Printing ASKII value
Post by: Rabib on March 31, 2011, 02:27:08 pm
I wrote a C code in CODE::BLOCKS which was supposed to print ASKII value of a character. But it keeps printing garbage values. Here is my code,

#include<stdio.h>


int main()
{
    int t;

     scanf("%c",&t);
     printf("%d ",t);



    return 0;
}
Please help me!!
Title: Re: Problem Printing ASKII value
Post by: Ceniza on March 31, 2011, 05:30:46 pm
Completely unrelated to Code::Blocks.

Please ask your question in an appropriate forum.

Please read the rules before you post!
Title: Re: Problem Printing ASKII value
Post by: Jenna on March 31, 2011, 06:49:00 pm
Topic locked, because it violates our forum rules !
Sorry.