Computer Scientists are Pretty Pessimistic

Friday 4 September 2015

Write a function that accepts a character as argument and returns its ASCII value.

#include <stdio.h>
int check (char m); //function prototype
void main ()
{
    char m;
    scanf("%c",&m);
    printf("%d",check(m)); //call function
}
int check (char m) //function
{
    return m;
}

No comments:

Post a Comment