Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
How can we clear screen/consol on this online compiler
+3
votes
asked
Feb 20, 2020
by
anonymous
I am trying to do clear screen with the help of this compiler but clrscr() and system(cls") functions are not working
c
please-help
Please
log in
or register to answer this question.
2 Answers
0
votes
answered
Feb 22, 2020
by
anonymous
U can use fflush function for such purpose
Syntax of fflush function is
fflush(stdin);
commented
Feb 28, 2020
by
anonymous
Ok, so I tried this:
#include <stdio.h>
int main()
{
printf("Hello World");
fflush(stdin);
printf("Hello World2");
return 0;
}
But the result is:
Hello WorldHello World2
In other words, commands are recognized (no error message during compilation) but their effects are ignored.
Exactly what is happenig if you try to use clrscr(); or Gotoxy(); from the well know "borland" i/o library.
I'm suspecting there is a bug with GDB online and the output windows.
(The strange fact is it all works fine under GDB online and Pascal.)
Please
log in
or register to add a comment.
0
votes
answered
Jan 12, 2024
by
Rahul Rao
(
140
points)
Clrscr(); are not working in online gdb
Please
log in
or register to add a comment.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...