#include <sys/ioctl.h>
#include <stdio.h>
#include <unistd.h>
int main (int argc, char **argv)
{
struct winsize w;
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
printf ("lines %d
", w.ws_row);
printf ("columns %d
", w.ws_col);
return 0; // make sure your main returns int
}
Code Example |
---|
C :: calculate distance between 2 points X Y axis |
C :: myFgets in c |
C :: How to install npm in alpine linux |
C :: conio.h linux |
C :: dynamic 2d arr in c |
C :: how to print something out to the console c |
C :: haskell print |
C :: shuffle function in c |
C :: scanf ignore new line |
C :: come creare variabili casuali in c |
C :: c data types |
C :: font awsome circle info icon |
C :: calculator in c |
C :: print ascii value in c |
C :: search array element in c |
C :: console log observable data |
C :: c/c++ type format |
C :: get last char string c |
C :: c read csv |
C :: matrix multiplication in c |
C :: c int |
C :: what is string::npos |
C :: try and catch in rust |
C :: strings in c |
C :: c pointers |
C :: adjacency matrix representation maker |
C :: qtableview get selected row |
C :: convert char number to int in c |
C :: choose random number with weight |
C :: create arrya of chars malloc |