Time bounded input in C programming language

Gaurav sharma

Gaurav sharma

@gaurav-sharma-Fg87wo Oct 22, 2024
😁

I want to know about 😒 "time bounded input in c language" ...
it means user has only few seconds which has define by developer
if user is not give input on this time next line should be compile.
but note this this funda or logic should be in c language.....

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • niraj.kumar

    niraj.kumar

    @nirajkumar-6nokRG Sep 28, 2008

    You can use sleep() command to implement that .

    Or other way would be to use user defined signal handling
  • sriramchandrk

    sriramchandrk

    @sriramchandrk-wt4rlR Sep 29, 2008

    Use alarm command

    try to find in stevens book or google it.

    Regards
    Sriram
  • mahul

    mahul

    @mahul-ZxpiLA Sep 29, 2008

    One easy way is to fork a child process that will generate a signal after a fixed time. This signal when captured can be used to skip the line.