Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c]

C is a general-purpose computer programming language used for operating systems, games, and other high performance work and is clearly distinct from C++. It was developed in 1972 by Dennis Ritchie for use with the Unix operating system.

5
votes
1answer
70 views

Error handling function (Win32/C)

I have written the following function to be a general "error logging" solution for my Windows API projects. Basically, given a Windows system error code (a la ...
4
votes
1answer
75 views

Hashtable implementation in C for generic values

I am trying to implement a hashtable that supports character keys and can return any type of value contained in a struct as long as it contains as long as it contains ...
1
vote
1answer
61 views

Find the sum of the digits of a given number

I need to find the sum of the digits of the given number and repeat the process until the value lies between 1 to 9. e.g if the input is 72457 then, 7+2+4+5+7 = 25 2+5 = 7 so , the function ...
1
vote
0answers
406 views

Tab completion for custom shell

The purpose of the code is to enable tab completion for a custom shell I'm writing. The target OSes are Linux and OpenBSD. I had to make a conditional include that I hope is correct: ...
1
vote
0answers
124 views

Cuda C Matrix Compression

I am using Cuda to learn and implement a CSR matrix compression algorithm. What can I do better relating to C's best practices? main.c: ...
1
vote
0answers
2k views

Multithreaded client socket

This is my first time working with networks and multithreading in C, and would like to know how to make improvements. I wanted to make a client program that handles reading and writing to the server ...
1
vote
0answers
592 views

Using COM objects in plain C

In this code, I am creating a COM object to programatically access internet explorer. In order to access this object's properties and methods, I am writing wrapper functions like ...
1
vote
0answers
512 views

Recursive way to find inorder successor

So far I have attempted to find the inorder successor through recursion and it seems to be working right. Can someone review the code and give suggestions? ...
0
votes
0answers
34 views

Creating a Word Search Program in C

I am currently creating a word search program using C. I have created 5 different arrays for subjects containing 15 different words from each. I must also create a program that creates a 2D grid of ...
0
votes
0answers
51 views

Read consecutive blanks in array

I am writing a function that reads all consecutive blanks in a string, moves the pointer to the next non-blank char, and return a struct "token" that contains the blanks it found. The main function ...
0
votes
0answers
47 views

JNI: porting a semaphore data type to Windows

I have this JNI code to review. The demo driver + irrelevant porting code is here. semaphore_impl.h: ...