answersLogoWhite

0


Best Answer

You will need to read a single characther in the loop with something like a getch and save the characther wherever you want it. That way you can process the resultant string any way you want while you're in the loop and still maintain control to make decisions based on the input. You are probably looking for the function kbhit(), which tests whether a character is available before you call getch(). Calling getch() directly waits until the character is available. If kbhit() returns true, the next getch() will not need to wait. char key = '\0'; while (key!='x') { if ( kbhit() ) key=getch(); /* do other actions */ }

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is there a C language programming statement that allows you to input and accept a keypress WHILE a loop is running?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you chat on a webpage HTML?

HTML is just for designing the look and format of the page. To make the page actually do things, like running a chat page, takes programming. HTML is not a programming language so just using HTML you cannot create a fully functional chat page. You need HTML and a programming language working together to do that.


Difference between high level language and script language?

There is no real difference; a scripting language is a programming language like any other. We use the term script to infer a programming language that does not need to be compiled to a lower-level code before running. Generally speaking, a scripting language is usually a high-level, interpreted programming language.


What has the author Emily M Jackson written?

Emily M. Jackson has written: 'Running with BASIC' -- subject(s): Apple II Plus (Computer), BASIC (Computer program language), Computers, Juvenile literature, Programming, Programming (Computers)


What is the Java platform?

Java platform is the name for a bundle of related programs from Oracle (originally Sun) that allow for developing and running software programs for the Java Virtual Machine (JVM). The Java programming language is but one of many programming languages that run on the Java platform including Scala, Clojure, and many others.


What is pythan language?

Python Language: Python is a widely-used programming language that was created by Guido van Rossum and first released in 1991. It is known for its clear and concise syntax, making it easy to learn and write code in. Python is an interpreted language, which means it does not require compilation before running, making it highly accessible for beginners. It is open-source and has a vast standard library and a large community, contributing to its popularity. Python is used for a wide range of applications, including web development, data science, machine learning, scientific computing, automation, and more. If you are interested in learning more about Python or gaining expertise in this language, "Achieversit" can provide training and resources to help you excel in your Python programming journey.


What are the advantages of threads?

Just knowing what a thread does should already make it quite clear what its advantages are. In programming, multithreading means the capability of running multiple threads, or instruction sequences, at the same time. A thread is simply a sequence of instructions, but the language is designed in such as way that other threads can work at the same time.


What is the main use of php than other programming languages?

PHP is used mainly to help create dynamically generated website pages. It is a script language running on a server. PHP programs are not compiled as executable files.


What are the open source DB languages?

I know of 2. Mysql and OpenOffice.org. Mysql is very powerfull and easy to use along with PHP and the programming language running under apache. This will work in Windows, Linux and Mac OS.


Do you program a raspberry pi on itself or on a PC?

Once the RPi's Operating System of choice is up and running, it can be programmed like any other computer. Python is a popular programming language for use on the RPi (amongst others).


What do you call running man in Filipino language?

Depends on which colloquial language. Tagalog (below) is the national language. Tumatakbo (running - tagalog), tumatakbong lalake (running man/boy - tagalog) Tumar-taray (running - ilocano), tumar-taray nga lalaki (running man/boy - ilocano)


How manu types of programming language in HTML?

HTML itself is one language (Hyper Text Markup Language) But it can be used in conjunction with many other types of scripting languages such as..... CSS Javascript PHP ASP.Net VBscript(Only if the user is running windows) Python( With common gateway interface) Java(With plugin) And actionscript (Adobe Flash plugin)


How do you create your own operating system from scratch without any knowledge?

You cannot code an operating system without any knowledge of Programming. Developing an OS from scratch requires skills and a good knowledge of programming. It is not an easy task to develop an OS ,but it is not difficult either. To start with , you can start learning Assembly Language ,as this will help you to learn basics of CPU processing and Memory handling. Once you grasp the Assembly language you start of with first of with simple programs in Assembly language. After you have mastered it you can go out for coding a real running OS