#include <ctype.h>
|
|
int
toascii (int c); |
#include<ctype.h> //toascii()
#include<stdio.h> //printf()
int test_toascii()
{
int arr[]={’s’,’9’,’’,166, 255};
int i = 0;
int size = 5;
for( i=0; i<size; i++)
{
int ret = toascii(arr[i]); //call to the API with the chars in arr[]
if( (!ret) != 0 )
{
printf("\n%d cannot convert", arr[i]);
}
else
{
printf("\n%c converted", arr[i]);
}
}
printf("\n");
}
Output
s converted
9 converted
converted
¦ converted
ÿ converted
|
© 2007-2009 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |
|