Home Basic Loop Array string Function Pointer Contact STUDY

AHF    C    PROGRAM    SOLVING

Programming tips

Iterative statement



Test expression



Specifer



Working with switch case



Header file




Pointer_ print ASCII value convertion




// AHF C PROGRAM SOLVING

//solving here POINTER programming problem

#include<stdio.h> #define pf printf int main() { char ch,*n= & ch; int a,*n1= & a; pf("Enter any character: "); scanf("%c",n); pf("\nEnter any number: "); scanf("%d",n1); pf("\nThe ASCII value of the character= %d",*n); pf("\nThe character of the ASCII value= %c",*n1); if(*n>= 'a' && *n<= 'z') pf("\nThe entered character was in lower case. The upper case is\t%c",*n-32); else pf("\nThe entered character was in upper case. The lower case is\t%c",*n+32); return 0; }
OUTPUT:


© 2018 - All rights reserved