365体育足球滚球比分

Questions tagged [c]

365体育足球滚球比分 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
10 views

Restrictions to Unicode escape sequences in C11

Why is there a restriction for Unicode escape sequences (\unnnn and \Unnnnnnnn) in C11 such that only those characters outside of the basic character set may be represented? For example, the following ...
0
votes
0answers
12 views

Why empty signals before waitpid() call then block them after?

I was wondering how strace was working so I looked some source code to understand a little better how it worked. Now I almost understood the whole code, I still have a question. I would like to ...
0
votes
3answers
29 views

global variable not returning the right result

#include <stdio.h> int num1; void newfun(); void main() { int num2; num1 = 10; num2 = 20; newfun(); printf("%d %d", num1, num2); } void newfun() { int num2 = ...
0
votes
1answer
20 views

What happens if return EXIT_FAILURE without using fclose()?

Suppose I use fopen and deem the file format to be invalid for my program or the pointer is NULL. What consequences are there to simply returning EXIT_FAILURE when I reach that situtation, without ...
0
votes
0answers
16 views

header files including each other mutually [closed]

I need your help for this. I have 2 files : a.h and b.h.. a.h: #ifndef A_H #define A_H #include "b.h" typedef struct first { ... } first_t; void foo(second_t param); #endif b.h: #...
0
votes
0answers
10 views

3D camera X axis rotation - Raytracing

In a C Raytracing, I rotate the camera using the keys on the keyboard. When I rotate the camera vertically (looking up or down), it follows a vertical axis but also shifts a little bit horizontally ...
0
votes
0answers
12 views

Calculate normalized coordinates for SendInput() in a multi-monitor environment

I want to send mouse input programmatically to anyone of my connected displays. I know I can use the SendInput function to do this, but my current approach doesn't work on a multi-display setup. I am ...
-1
votes
0answers
16 views

Are floating-point numbers arithmetic operations much slower than integer arithmetic operations? [duplicate]

I heard people say floating-point numbers arithmetic operations are very fast and I don't quite it, since for integer arithmetic operations, it can be very fast becuase the cpu only needs to do the ...
0
votes
1answer
27 views

Reverse Polish Notation - arrays, vectors, scalars in C

I have a big problem. My teacher told me that I must write a program. I must use reverse polish notation for operations on vectors, matrices, scalars etc. For example, when you calculate, you write 4+...
0
votes
1answer
26 views

What is the sizeof the pointer pointing to a structure variable?

I am trying to print the size of pointers in both the cases. For both the cases I am getting 8 16 as output. #include <stdio.h> struct Book { char name[10]; int price; }; int main(void)...
0
votes
0answers
10 views

Is it possible to use SECCOMP_SET_MODE_STRICT inside an unprivileged docker container?

In Linux one can use syscall(__NR_seccomp, SECCOMP_SET_MODE_STRICT, NULL, 0); to set the calling process into a locked-down mode where [the] only system calls that the calling thread is permitted ...
1
vote
0answers
22 views

AVR Microcontrollers memory game

I am making a game where you need to repeat the sequence of LEDs that light up. This sequence is set by two LEDs. To repeat the sequence, I use the joystick. I had an idea to make two bool arrays ...
2
votes
3answers
31 views

Why does my debugger show extra characters in character array in C?

Notice the input string value shown I wrote the following code: #include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <string.h> #define MAX 50 int main() { ...
3
votes
0answers
22 views

Shared lock with two exclusive lock groups

I have two methods "log" and "measure" that should never execute at the same time. So I tried to use a "std::mutex" to do this as follows: void log(std::string message) { ...
-2
votes
0answers
18 views

Can I use CUDA in C without rewriting code? [closed]

Can I use CUDA in C without rewriting code? Or in another simple way? It's different if some code is with fork, some normal and some with pthread?

15 30 50 per page
1
2 3 4 5
22318