Questions tagged [c]

C is a general-purpose programming language used for system programming (OS and embedded), libraries, games and cross-platform. This tag should be used with general questions concerning the C language, as defined in the ISO 9899 standard (the latest version, 9899:2018, unless otherwise specified — also tag version-specific requests with c89, c99, c11, etc). C is distinct from C++ and it should not be combined with the C++ tag absent a rational reason.

0 votes
2 answers
19 views

What does the variable array name at the end of the structure's definition means?

I've already read this, this and this but it seems they're not exactly my situtation. I have a code like this struct ppl_weight { uint16_t weight; uint8_t weightHour; } ppl_weightList[16]; ...
user avatar
  • 696
-1 votes
1 answer
28 views

Void function usage issue, I'm new to C

the task is to print ascending order numbers using only void function. Any insight on what's wrong with the code? Explanation too would be appreciated #include<stdio.h> void listNumbersAsc(int ...
user avatar
-2 votes
0 answers
16 views

VS Code C/C++ extension cannot find compiler path

I'm really new to all of this, I chose gcc-x64 for IntelliSense mode, and typed C:/cygwin64/bin/gcc.exe for compiler path, as my tutor said but I keep getting this warning that says it can't find it.
user avatar
-1 votes
0 answers
21 views

Why does the following C code when ran takes input wierd? [duplicate]

#include <stdio.h> #include <ctype.h> int main() { int n; float salary, bonus; char sex; printf("Enter number of employees: "); scanf("%d", &n); ...
user avatar
  • 21
0 votes
0 answers
31 views

Why won't an exact copy of the code in K&R work?

Given an input for the code below, no output shows up. It seems to me, the program stops executing as does the while loop. #include <stdio.h> int main() { int c, i, nwhite, nother; int ...
user avatar
0 votes
0 answers
4 views

Stylish / Stylus : A:visited and A:link only affects certain websites

✨ I am using the Chrome extensions Stylish and Stylus for the first time which use C programming language. My goal is to use this in forum websites like Reddit and DeviantArt forums so I know which ...
user avatar
  • 1
-4 votes
0 answers
29 views

How do I write MIPS code of the below given C code? [closed]

X, Y are in register $3, and $4 respectively and base address of A is in register $5. A[3] = 7*X + 9*Y + 100; X = 12*A[A [2]] + 21*Y - 30; Y = A[X] + A[X+2];
user avatar
  • 3
1 vote
2 answers
36 views

Printing a binary search tree with commas and spaces in C

I am struggling to print a binary search tree like the below output (in-order traversal): 2, 3, 6, 9 the output I get: 2, 3, 6, 9, The code I have: void inorder(struct node* root) { if (root ...
user avatar
0 votes
1 answer
9 views

Appweb Upload Files

When I use AppWeb+esp for uploading files, I just got a file with suffix .tmp. (Use UploadAutoDelete and UploadDir) How can I find the file I uploaded with it’s own name and which directory it will be?...
user avatar
0 votes
1 answer
40 views

Make 2 numbers reach their target numbers at the same time

I'm trying to code a mouse drag function in C. Basically, i want X to reach targetX, and Y to reach targetY at the same time. For example: x = 0, y = 0; targetX = 10, targetY = 20; I want to make x ...
user avatar
  • 1
0 votes
0 answers
42 views

Trouble with shared memory program in C

I have an assignment that consists of making a program with shared memory that has a parent process, which reads from a .txt and adds its contents to a buffer (this is the shared memory), and two ...
user avatar
  • 1
3 votes
1 answer
75 views

Is the C language copyrighted and is there any terms of use use for that? [closed]

I searched about copyright of programming languages and about C language i didn't see copyright notice for that, So I want to know is there any copyright for that or not? and there is no terms and ...
user avatar
0 votes
1 answer
37 views

Creating an ASCII table with C and the columns should have a tab between them

since this my first post, let's see how this goes. Let me introduce the problem first: Create an ASCII table that is 4 "columns" or "cells" wide. The table should include a given ...
user avatar
0 votes
3 answers
27 views

Struct array string merge with another string in c

So i have a problem where the string in struct merge with another array. See the code and output for more explanation. Code: #include <stdio.h> #include <stdlib.h> struct print { char ...
user avatar
2 votes
0 answers
31 views

Lua C API - How to read another value of a table from a C function that is stored in that table?

I am creating a simple table in Lua that has various functions and an ID field. From Lua script’s perspective, the table looks like this: ball = entity_query.get_first_entity_by_name(“Ball”); print(...
user avatar
  • 7,079

15 30 50 per page
1
2 3 4 5
25445