- 2

accept a character from the keyboard and display its previous and next character in order. EX.If the character entired is ,,d",d

accept a character from the keyboard and display its previous and next character in order. EX.If the character entired is ,,d",display"The previous charecter is c","The next character is e".

1st Sep 2019, 2:35 PM
Deepak Gaikwad
Deepak Gaikwad - avatar
4 odpowiedzi
+ 1
try this:- char a; scanf("%c", &a); printf("%c %c", a - 1, a + 1);
1st Sep 2019, 3:54 PM
rodwynnejones
rodwynnejones - avatar
+ 1
You could either use the key press event key codes, which are pretty universal across languages and libraries, or you could use the integer value of characters, depending on what language you are talking about
1st Sep 2019, 2:39 PM
Zeke Williams
Zeke Williams - avatar
0
C language program please sir explain to program code in comment
1st Sep 2019, 2:54 PM
Deepak Gaikwad
Deepak Gaikwad - avatar
0
Thank for helping bro
1st Sep 2019, 4:05 PM
Deepak Gaikwad
Deepak Gaikwad - avatar