News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Problem Printing ASKII value

Started by Rabib, March 31, 2011, 02:27:08 PM

Previous topic - Next topic

Rabib

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!!

Ceniza

Completely unrelated to Code::Blocks.

Please ask your question in an appropriate forum.

Please read the rules before you post!

Jenna

Topic locked, because it violates our forum rules !
Sorry.