C++ Programming Code Examples
Learn C++ Language
clrscr() Function in C++ Programming Language
clrscr() Function in C++
It is a predefined function in "conio.h" (console input output header file) used to clear the console screen. It is a predefined function, by using this function we can clear the data from console (Monitor). Using of clrscr() is always optional but it should be place after variable or function declaration only.
It is often used at the beginning of the program (mostly after variable declaration but not necessarily) so that the console is clear for our output.
/* clrscr() function is also a non-standard function defined in "conio.h" header. This function is used to clear the console screen. It is often used at the beginning of the program (mostly after variable declaration but not necessarily) so that the console is clear for our output.*/
#include<iostream.h>
#include<conio.h>
void main()
{
int a=10, b=20;
int sum=0;
clrscr(); // use clrscr() after variable declaration
sum=a+b;
cout<<"Sum: "<<sum;
//clear the console screen
clrscr();
getch();
}
C++ Program to find edge connectivity of a graph. An edge in an undirected connected graph is a bridge if removing it disconnects the graph. For a "disconnected undirected"
To convert temperature from "Fahrenheit" to centigrade in C++, enter the "temperature" in Fahrenheit to convert it to centigrade to print equivalent temperature value in "centigrade"
This is a C++ Program to check if BST is AVL. An AVL tree is a self-balancing binary search tree. It was the first such data structure to be invented. In an "AVL tree", the heights of the
When writing both single "character & string" literals, it is Necessary to 'Put the Quotation' marks surrounding them to distinguish them from possible variable identifiers or reserved
C++ Program to get all the unique partitions of an integer such that addition of a partition results an integer. An integer n, generate all "possible unique" ways to represent n as sum