皇冠hg0088代理网址

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.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

Return value of a 'boolean' in C

Which of the following return types is the correct one for the following equality check? Why? int foo1(short x) { return x<0; } short foo2(short x) { return x<0; } char foo3(short x) { ...
0
votes
0answers
6 views

k-line / kwp2000 adm mercedes benz ECU

I am going to find out local parameters from ADM MERCEDES BENZ ECU. I have already connection to it and sending and receiving to/from it by kline of speed 10400. My problem is that I found out for ...
0
votes
0answers
16 views

why would the scanf() statement not work?

some guy told me that for reading a string in C you can use this #include<stdio.h> #include<conio.h> #include<stdlib.h> int main() { char str[100],str2[100]; clrscr(); printf(&...
0
votes
0answers
12 views

Split String and assigning token to different variables in C

The program will take a simple expression and decide what mathematical operation to perform. As long as is just one character when using the strtok() it will find the operation that will be used, ...
0
votes
1answer
45 views

Why same code in python takes forever time but runs quickly in C [duplicate]

I was trying to attempt a simple question on HackerEarth. I code in python usually. My test cases were failing due to time limit in python so I tried to implement the same logic via C programming. And ...
0
votes
0answers
8 views

calling the match function of generic usb device driver

I was going through generic.c related to USB subsystem in Linux Kernel. The usb device driver(usb_generic_driver) was registered by usb core(usb_init). The usb_device_driver structure is having ...
0
votes
0answers
12 views

Doxygen not recognizing documented functions et al

I'm just getting started with doxygen (1.9.0). I've added what I believe are correct comment blocks to several functions as well as a typedef and an enum in my C project. However, when I run doxygen ...
0
votes
0answers
12 views

How to detect symbols in console with WinAPI?

I need to read file and print text in the console. If user clicks on a letter in the word display this letter at the bottom of the console and display the coordinates of the mouse. I figured out how ...
0
votes
1answer
32 views

How to change “-” to a letter for hangman (C)?

I am working on a hangman game where my word is hidden behind dashes and as the player guesses the correct the letters, they will turn to the word. int numdashes; char word[NUM_LETTERS_MAX] = { "...
0
votes
1answer
11 views

Specify number size in gdb for print commands?

To play around with various additions to registers that may be 8,4,2 or 1 bytes (rax, eax, ax, al) is there a way I can specify the number of bytes of the number I'm using? For example # works for 4 ...
0
votes
1answer
24 views

I am overstepping the *image array by 2 bytes and am not sure why that is

I am getting the following scary memory error with this message: UndefinedBehaviorSanitizer:DEADLYSIGNAL ==6297==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x7f37601962a8 (pc ...
0
votes
0answers
13 views

Storing values in same variable R [closed]

Problem question How can I write this code in c without renaming the variable R for each operation and writting out 6 seperate printf statements? I'm very new to programming so im sorry if it's ...
-1
votes
1answer
32 views

S_ISDIR and S_ISREG undeclared despite including the <sys/stat.h> header

I am using the "S_ISDIR" and "S_ISREG" but am getting an error that they are undeclared. I tried using it in macOS(using S_IFDIR and S_IFREG) and it worked but not in linux ...
0
votes
0answers
18 views

Learning multi-threading, don't understand why example results in only small (10%) performance improvement [duplicate]

I am learning multi-threaded programming using C, pthreads, and Ubuntu Linux (20.04). In order to try out pthreads I created the following simple programs: #include <locale.h> #include <...
-2
votes
0answers
30 views

C program that prints whats inside quotation marks.". In a textfile

Hey all I am trying to transfer some data through textfiles in c. I seemed to have been able to transfer most of the data over except for the items in " " quotation marks. An example below ...

15 30 50 per page
1
2 3 4 5
22671