FY_BCA_C_SLIP_11



/* Slip no : 11_1 write a C prog to accept character and dispaly it,s ASCII value and it's next and previous  character */

#include<stdio.h>
#include<conio.h>

int main()
{
                char ch;
                clrscr();
                printf("\n Enter character :");
                scanf("%c",&ch);
                printf("\n ASCLL value is = %d ",ch);
                printf("\n Previous character is = %c",ch-1);
                printf("\n Next character is = %c",ch+1);
                getch();
}

No comments:

Post a Comment