bst365体育投注网址大全

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
7 views

Problems while using gtk+3 and Css

i am using c language to create a GUI with GTK+3 and i want to make the style of the app with css . The problem is that the Widget doesnt accept the style that i gave to them , unless i use the * ...
0
votes
0answers
6 views

calling C program function in python - Segmentation fault

So I have a C program that I am running from Python. But am getting segmentation fault error. when I run the C program alone, it runs fine. The C program interfaces a fingerprint sensor using the ...
0
votes
2answers
13 views

Thresholding a sensor value

I have connected a distance sensor to an Arduino and would like to get the most accurate values for my project. My idea is to take 10 measurements, ignore both the highest and the lowest measurement ...
0
votes
2answers
73 views

Can anyone explain why the outputs are different in C and Java?

{ public static void main(String[] args) { int a = 10; if (a == a--) System.out.println("first\t"); a=10; if(a==--a) System.out.println("second\t&...
0
votes
0answers
36 views

How to fix my c codes with not compiling error?

I started c 1 weeks ago, and i see the book and try sequence question, this is the code #include <stdio.h> int main(int argc,char *argv[]) { int scr[9][1],i ,rank[9], t; for(i =1 ; i <...
-1
votes
0answers
33 views

Declare and Initialize dynamic array of head nodes of linked lists

I would like to know how to declare, allocate and initialize array of Node to null. typedef struct Nodes_Of_List { int data; struct Nodes_Of_List *next; } Node; //declare array of ...
1
vote
1answer
50 views

Mark variable as “done for”

Is there syntax in C to let the compiler know that a certain variable is done for and will henceforth not be used anymore, thus potentially freeing up a register? I'd rather not use function calls ...
0
votes
0answers
15 views

getting stack-use-after-scope error when implementing quicksort using stack

im trying to implement a quicksort using stack and no recursion. im not sure why but i keep on getting the error stack-use-after-scope, also note that after using the stack i have to destroy the stack ...
-2
votes
0answers
44 views

How do compilers assure stability? [closed]

Suppose you need a c compiler. It would be preferable to write that compiler in a c-like language, given the complexity of a compiler of that degree. At best, the c compiler would be written in c, but ...
3
votes
2answers
43 views

if statement, function evaluation & compiler optimization

Just a quick question, to save me from testing things (although I really should test things to be absolutely certain): Given the following C code: r1 = fun1(); r2 = fun2(); if (r1 && r2) { ...
1
vote
0answers
28 views

many NUL characters when reading streamed text file through serial [duplicate]

I have an arduino that stores gps location with 1hz rate in a txt file terminated with \n every time. The file inside SD Card is this. I wrote a c# console program that tries to read the stream for ...
0
votes
0answers
70 views

C - Is this a valid way to check for if malloc'd size is reached or not? ( Using fgets() + strlen() )

Had an idea to test that if the given char * doesn't pass the assigned malloc size, however I'm not sure if this a great way to check. Note: sorry for the messy code, having problems indenting. #...
0
votes
1answer
61 views

Tell c++ compiler that the argument is not aliased

One of the big differences between C/C++ and Fortran when it comes to speed is that the former languages use pointers which can be aliased and therefore a compiler needs to load in the data at each ...
2
votes
2answers
76 views

&(float){0} as a float* argument: what it means?

&(float){0} I came across that in some C code. It was specified as a float* argument in a function. What does it mean?
0
votes
0answers
28 views

CS50 pset4 filter "blur

So I have this problem in pset4 filter less comfortable. My blur somehow don't work. My problem is it seems that it doesnt loop for height so the only thing that works in my code is the first row. My ...

15 30 50 per page
1
2 3 4 5
22340