Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

173
Views
¿No puedes leer nada después de enviar EOF?
#include <stdio.h> int main() { char c = getchar(); //EOF (ctrl + d ) while( ( c = getchar() ) != '?' ) { printf( "%d\n", c == EOF );//infinite loop printing 1 } }

¿Qué pasa aquí?

¿Es como si EOF bloqueara completamente la lectura de cualquier cosa después de eso?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Debe llamar a clearerr en stdin para borrar el EOF. Además, tenga en cuenta que getchar devuelve un int y no un char porque EOF no cabe en un char.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!