[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAFf+5zju7Z+5knfxVn=TCwJLCdWy2W6Me1mGnkkQJ1KOHzFSWg@mail.gmail.com>
Date: Thu, 3 Jul 2025 12:40:38 +0530
From: Amit <amitchoudhary0523@...il.com>
To: linux-kernel@...r.kernel.org
Subject: List of C programs.
--------------------------
List of C programs.
--------------------------
* Multithreaded static HTTP web server (one thread per connection).
* Multithreaded dynamic HTTP web server (one thread per connection). The
programs/scripts will be in cgi-bin directory but they won't be run
directly. There will be a controller that will run the programs/scripts in
the cgi-bin directory.
* Modify apache HTTP server to have a controller that will actually run
the programs/scripts from cgi-bin directory instead of these programs/scripts
being run directly. (Don't submit the patch).
* Generic dynamic array (like C++ vector).
* Generic hash (dynamic hash also).
* Generic singly linked list (simple - not many functions?).
* Bits library.
* Multithreaded TCP server (one thread per connection).
* HTTP client and HTTPS client implementation.
* SSH client implementation.
* Ping implementation using raw socket.
* Tcpdump type program using raw socket or iptables or nftables.
* Use raw socket to get ethernet packets and then decode them all the way to
ICMP/TCP/UDP and print the fields/data.
* Communication between remote machines - A program that is both a TCP server
and a TCP client will accept requests from other instance(s) of the same
program on other machine(s) and execute program(s) given in the request and
return the result to the client. Make this program a daemon?
* Use the above program to install other program(s)/software on remote
machine(s).
* Tcl/Tk program for installing software on remote machine(s).
* A program that will do broadcast ping and save all IP addresses received in
replies in a file with the status of the IP address as UP or DOWN. This
program will show all this info on the output screen also. This program will
do periodic broadcast pings to keep track of the status of IP addresses.
* A program that will take a file having a list of IP addresses and it will
periodically ping those IP addresses and show their status on the output
screen.
* Port scanning tool.
* Netlink example.
* Access Internet through another computer (both NAT server and Proxy server
implementation).
* Netfilter example(s) (nf_register_net_hook(), etc.).
* Check packet interface.
* Pcap example(s).
* A reliable/connection oriented protocol over UDP (that guarantees delivery of
all data) (may be a modified version of TCP or may be some other self
developed protocol).
* Get IP address from domain name (use getaddrinfo()).
* DNS client.
* DHCP client and server (actual protocol implementation). Two tests -
** Run DHCP server and DHCP clients on the same computer.
** Use two computers. One will run DHCP server and another one will run
DHCP client. Don't connect to any router, etc. See if it works.
* ARP client (actual protocol implementation).
* TFTP client and server (actual protocol implementation).
* SMS client (actual protocol implementation).
* Packet generator (TCP, UDP, etc.).
* A program to do stress testing of a TCP server - keep on creating new TCP
connections. Also keep on sending garbage data to the TCP server to keep it
busy.
* A program to do stress testing of a HTTP (web) server - keep on creating new
HTTP connections and keep on downloading the home page and other pages listed
on the home page, etc. (without stopping).
* Create a peer-to-peer network over wireless - One computer will have a static
IP address and will run DHCP server on startup (DHCP server will run as a
daemon) and other computers will run DHCP client on startup (DHCP client will
run as a daemon). Now, another program will run and try to discover neighbors
and write the IP addresses of the discovered neighbors in a file. Now, the IP
addresses in this file can be used by other programs to communicate with their
neighbors. Neighbor discovery will be done by sending a neighbor discovery
packet on the broadcast address 255.255.255.255. Neighbor discovery will be
done periodically so that new computers can be discovered and for deleting the
file entry of the computers that moved out of the range. The file having the
IP addresses of neighbors should be locked (using flock()) before
reading/writing from/to it to maintain consistency and getting complete IP
addresses.
* Network simulator for fixed networks.
* Network simulator for moving client(s) but AP(s)/Base station(s)/server(s)
will be fixed.
* Signal handler example.
* Message Queue example.
* Pipes example (both unnamed and named (mkfifo()/mknod()).
* Shared Memory example.
* Shared mutex across processes example.
* Semaphore across processes example (both named and unnamed).
* Readers-Writer lock (rw_lock(), rw_unlock(), etc.) implementation.
* flock() example.
* mmap() example (mmap a file and read/write from/to it).
* Regex example (with group(s) capturing/saving).
* Regex implementation using a state machine (non-greedy).
* Regex implementation by linear parsing (first do non-greedy, then greedy).
* Logger.
* dlopen(), dlsym(), and dlclose() example.
* A program that uses dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL), dlsym(), and
dlclose() to get the function pointers of its own functions (even main()
function) by using dlsym(lib_handle, "function_name") and then call the
functions using these function pointers. For this, the program should be
compiled with the "-rdynamic" flag. The compilation command for this program
will be - "gcc program.c -o program.out -ldl -rdynamic".
* Sort a file.
* Sort a file based on a field/column.
* File system simulation (both fixed bitmap and dynamic).
* Distributed file system?
* timer_create(), etc. example.
* getitimer() and setitimer() example.
* alarm() example.
* Library functions for measuring execution time between two points in code,
etc. (time_start(), time_end(), etc.). There can be multiple time_start() and
time_end() in the code and they can be interspersed, so each time_start() call
will return a pointer to a structure and this pointer should be passed in the
corresponding timer_end().
* Timer library (upon timer expiry, call the function given by the user at the
time of timer registration/creation along with the user data given by the user
at the time of timer registration/creation).
* Reverse a file line by line.
* Speech to text.
* Text to speech.
* VoIP using speech to text and then text to speech.
* Redis type key-value database (both client and server) (keep saving the data
on the disk so that it can be reloaded when the server restarts/starts).
* Key-Value store library - (add_key_value(key, value), get_value(key), etc.).
A program will link with this library to use the key-value store. No saving
on disk, all data in memory.
* MariaDB client (command line).
* MariaDB client library.
* Parse SQL and run it on a manually created database and check results. This
database will basically have file(s) that will have data in columns. The data
will be written directly in the file by the user.
* Remote mutex (mutex shared across processes on different machines (use sockets
for implementing it)).
* Remote semaphore (semaphore shared across processes on different machines (use
sockets for implementing it)).
* JSON library for creating and reading json data/file.
* XML parser.
* A program that catches all keystrokes and then prints on the output screen as
to which key/key combination was pressed (like - you pressed Ctrl-K).
* A program that does bash like tab completion.
* Find duplicate files (in one folder or in multiple folders).
* Program for taking a screenshot.
* Program for recording the screen and making a video of it.
* libusb example(s).
* A program that opens the device file (/dev/sdb or /dev/sdb1, etc.) that
represents a USB device (pen drive) and then dumps the partition table,
names of files/directories in the USB drive, etc.
* Framebuffer (/dev/fb0) example(s).
* Experiment with xrdp.
* ptrace() example(s) (ptrace() is used by strace).
* Thread library using makecontext(), getcontext(), and swapcontext().
* Develop a compiler for C language in C language itself.
* Desktop search engine.
* File explorer.
* tar like program but self developed algorithm.
* cscope.
* A program to create ctags file. Test this ctags file with vim.
* Quicksort library.
* Mergesort library.
* Calculate mean, median, mode, standard deviation, and variance of the input
data.
* Draw line graphs, bar graphs, dot graphs, and pie charts for the input data.
* Data analytics - A program that will take a file as an input and analyze the
data in the file and print some statistics - like most selling product, etc.
The input file will have all data (column-wise) such as customer name,
customer id, product(s) the customer bought (one product per line), cost of
the product, etc. (basically, dumping tables data into a file and then give
this file as an input to the data analytics program).
* String library - str_join(), str_split(), substr(), is_str_an_integer(),
is_str_a_float(), str_starts_with(), str_ends_with(), str_replace_str(),
str_replace_chr(), str_remove_str(), str_remove_chr(), strtok_new(),
str_strip_leading(), str_strip_trailing(), str_trim(), str_left_pad(),
str_right_pad(), str_match_regex(), str_replace_regex_match_with_str(),
str_starts_with_regex(), str_ends_with_regex(), str_remove_regex_match(),
str_split_on_regex_delim(), etc.
* PIC (Programmable Interrupt Controller), Interrupt Vector Table, IRQ
subsystem, few hardware devices, and CPU simulation (CPU simulation for IRQs
only) (simulate IRQ_SHARED also - multiple functions/processes registered for
the same interrupt line, workqueues or tasklets simulation?, interrupt handler
functions should schedule some bottom half that will communicate with the
simulated device and get data, etc. and show the data to the user and/or log
the data in a file, etc.).
* Experiment(s) with some programmable robotics kit.
* Experiment(s) with Raspberry Pi.
* Linux kernel module (example of a character device driver).
* Linux kernel module to register for all hardware interrupts as shared and then
printing which interrupts occurred.
* Experiment with QEMU on Linux.
* Linux kernel's memory management subsystem simulation?
* Documentation on how to write a device driver in the linux kernel (mostly
PCI/PCIe drivers).
* Get involved in open source projects that are developed in C language -
** GNOME
** Specific GNOME apps like GNOME evolution, etc.
** Wireshark
** Apache HTTP web server
** Find more open source projects in C language on web.
* SDL (Simple DirectMedia Layer) - Give programs that show how to use the
graphical widgets of SDL.
* Graphical apps in SDL -
** Image viewer
** Video player
** Music/Audio player
** Audio recorder and player
** Remote screen sharing (remote user can click/edit on shared screen?)
* Games in SDL -
** Blackjack
** Teen Patti
** Card Game 28
** Card Game 3-2-5
** Card Game Sweep
** Seven-up Seven-down dice game
** Other games
* Solutions to C interview coding questions and other C coding questions.
====
Powered by blists - more mailing lists