2020欧洲杯时间表

Dark mode beta

You’ve been asking for dark mode for years.
The is finally here.

Change your preferences2020欧洲杯时间表 any time.

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
1
vote
0answers
7 views

Can a static variable be initialized with a static constant?

In this answer I basically needed static int n = -1; inside a function. I wanted to avoid magic numbers so I used this instead: double f(int i) { static const int sentinel = -1; static int n =...
0
votes
3answers
21 views

Why is this code in C not returning a decimal value like expected? [duplicate]

#include <stdio.h> int main() { float a = 355/113; printf("%f", a); return 0; } Why is this returning 3.0000 instead of 3.141592?
-2
votes
0answers
11 views

. Please give your input in C part of the question which talks about arraya [closed]

ABC bank is trying to establish ATM branches in different regions of a city. There are m branches and each branch does a maximum of n transactions per day. The transaction could be a positive value ...
0
votes
0answers
16 views

pointer changes unexpectedly despite not being changed out of scope

I am writing code here to try and replicate virtual memory in C. For some reason, a pointer I create and maintain within main get changed unexpectedly after being passed into a function. Here is my ...
-1
votes
0answers
10 views

How to distribute C software to different computers?

Suppose I write a C program on my computer. It compiles and runs great. I want to distribute the program to many other users with many different computers. The end-users do not know how to compile C ...
0
votes
0answers
7 views

How to Render and glReadPixels in moderngl for python?

I made an OpenGL program in C using EGL and GLES which worked fine, I am now trying to port this code to Python to run on a NanoPi M1 Plus (ARM 32-bit system). The only library that I found that works ...
0
votes
0answers
12 views

Attempting to apply a 'blur' filter to a bmp for CS50 pset4, and the output image is much darker

This is the output and input image that my code generates: http://imgur.com/a/mT7YqCD The following code is for the blur function, all the supporting code is untouched from pset4. void blur(int ...
0
votes
0answers
4 views

Multithreaded GTK application RaspberryPI C programming play wave file using omxplayer OpenMAX API

According to popcornmix omxplayer You can use omxplayer and dbuscontrol.sh using fork() to play a wave file. Which works. I want to know who to play and stop and control the volume in using the ...
0
votes
0answers
30 views

Use char type for flag?

I would like to write my code using the type char for flags as it is the same or smaller than an int; Is there a cleaner way to do this than: typedef char flag; #define FLAG1FORSWITCH1 'a' #define ...
0
votes
0answers
10 views

Generate two RSA keys in the same code in C

I'm trying to generate multiple RSA key in C but I'm facing a segmentation fault with the following code : #include <stdio.h> #include <stdlib.h> #include <openssl/rsa.h> int main (...
0
votes
1answer
27 views

Linked list shows segmentation fault error

I'm pretty new to C and pointers. Following codes are for implementing a linked list in which each node contains a data of record. However, when I compile and run this program, it shows an error "...
0
votes
0answers
10 views

popping values from stack to a character array - C

Just as the title says. When I run the program in GDB I get unexpected data in the character array when I pop. When you append data NORMALLY, you would have a function like this: void append(char* s,...
0
votes
1answer
29 views

Using an array of strings to implement a symbol table in C

I am trying to use an array of structs to create a symbol table. This is what I have so far, but I am having trouble allocating memory in the create function, is what I have so far correct? I want ...
0
votes
0answers
8 views

How to schedule multiple tasks periodically in c language?

I am new to scheduling and i am making a simple periodic schedular of 3 tasks. I want to execute three different tasks after every 50, 100 and 150 mili sec period. The running time for every task is ...
1
vote
1answer
10 views

Can you access the epoll interest list (a.k.a. interest set) directly?

I'm new to epoll. The man page for epoll mentions an interest list (a.k.a. epoll set), which is a superset of the ready set. If you want to modify the interest list by adding new epoll events, ...

15 30 50 per page
1
2 3 4 5
21702