Skip to main content

All Questions

Tagged with
3 votes
2 answers
104 views

Get Terminal Size, Enable and Disable Terminal Raw Mode without NCURSES

I searched around and found these 7 ways to determine the width and height of the terminal: ...
Harith's user avatar
  • 9,462
10 votes
2 answers
242 views

A simple ray marcher for the command line

This is my attempt at creating a ray marcher for the command line for fun. I have some prior experience with C programming, although I'm far from being an expert, and little to no experience with ...
Knogger's user avatar
  • 285
18 votes
3 answers
3k views

A tic-tac-toe game in C

I am (trying) to learn the C programming language for fun with my father's book "The C Programming Language". I tried writing a tic-tac-toe game in C. I have no professional experience, so ...
Uriel's user avatar
  • 183
12 votes
2 answers
2k views

Conway's Game of Life Terminal Visualization in C

I'm currently learning C, and decided to practice what I've been working on with a project, namely implementing Conway's Game of Life as a terminal visualization. This is my first project in C. The ...
joeymalvinni's user avatar
6 votes
2 answers
553 views

A simple CLI arbitrary-precision Mandelbrot set calculator (for a single point)

I wrote the following C code that takes a couple of arguments on the command line and calculates a given number of iterations of the Mandelbrot set complex mapping using MPFR arbitrary precision ...
schuelermine's user avatar
5 votes
2 answers
927 views

Skeleton for a command-line program that takes files in C

First. If this question is not allowed, I am sorry. Please, tell me so, and I will try to delete this. If it is, I will delete this paragraph. Personal-ish note/Motivation I was studying assembly ...
Gabriel Silva Schilive's user avatar
6 votes
2 answers
2k views

C safe getline()

For a recent project of mine I had to do read input from the console in pure C with no external libraries (in other words, code I've written by myself). I don't like the standard formatted input such ...
404 Name Not Found's user avatar
1 vote
1 answer
162 views

Shell implementation in C

I made a small shell implementation in C. It reads stdin and executes the command. It can also take in a file name from argv and execute all the arguments in the ...
elonma1234's user avatar
2 votes
0 answers
69 views

Simple CLI File Encryption

This program is designed to work on the command line by piping stdin to stdout and encrypting or decrypting the input using a symmetric key. Any suggestions for improvement would be greatly ...
muckypops's user avatar
5 votes
1 answer
129 views

Text-based Tic-Tac-Toe in C

I have written a text-based tic-tac-toe game in C. Are there any ways I can further improve the code? It uses an ENUM to indicate the player type and two bitfields to indicate the board. ...
Dean Menezes's user avatar
1 vote
1 answer
71 views

CLI Generator & Parser

I have written a module that allows the developer to generate a CLI and parse given arguments. I am fairly new to C and would love to hear feedback on my code to improve it. All feedback is welcome ...
conaticus's user avatar
  • 125
2 votes
2 answers
154 views

C99 - An alphanumeric random char generator

I have built a very small program that is a command line utility for generating alphanumeric characters of a certain length (up to a max. length) called randchars. <...
EvenDance's user avatar
0 votes
1 answer
161 views

Line-wise input, EOF handling, and behavioral differences between implementations of getchar

I've implemented a menu system where all input calls ultimately go through io_getline, a function which reads a line of input up to the max buffer size or newline (...
Braden Best's user avatar
3 votes
0 answers
74 views

Implement easy CLI options in C using a single-file header

I'm a computer science student, and in 2 of my courses this semester we are writing short C programs to demonstrate the things we are learning about. All of these programs require command-line flags &...
Jake Grossman's user avatar
7 votes
2 answers
190 views

Ncurses listview control

I am currently developing a terminal-based listview control, that uses ncurses for rendering. The main goal for the listview was to be intuitive, performant, and reusable for other projects. An ...
766F6964's user avatar
  • 901

15 30 50 per page
1
2 3 4 5