- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
4 Posted Topics
Hi, I am trying to understand the Standard C function "getchar()". I am using CodeBlocks 8.02 in Windows XP. Please compile this code in your compiler and note how it behaves: [CODE]#include<stdio.h> int main() { int i=getchar(); while(i!=9) { printf("%d",i); i=getchar(); } printf("%d",i); return 0; }[/CODE] When I insert Tab, … | |
What is the keycode of "Escape" while using curses.h???? is it KEY_EXIT?? I hv used this bellow but when i press escape, it prints "^[" instead of stopping the loop! and when i press "g", it does what i want the code to do when "escape" is pressed!!...Help! I am … | |
Is there any character that takes cursor to previous line? printf("H\n"); will print H and then take cursor to newline(1 step down). output: ............ H _ ............ But is there any control character that will work in the following way: printf("\nH(the character i am finding)"); takes cursor in newline, prints … | |
Re: ****(1)***** [CODE]#include<stdio.h> #include<conio.h> void main() { char c; clrscr(); printf("Press \"Esc\" to exit"); gotoxy(1,10); c=getch(); while(c!=27) { if(c==0) { c=getch(); gotoxy(1,10); clreol(); printf("This key has two ascii values: 0 and %d",c); } else { gotoxy(1,10); clreol(); printf("%d",c); } c=getch(); } }[/CODE]************ *****(2)****** [CODE]#include<stdio.h> #include<conio.h> void main() { char c; int … |
The End.