c tag

1304 questions


1 answers
130 views
0
uint8_t and unsigned char difference

As far as I know, uint8_t is unsigned char and typeefI understand that the implementation of the two is the same.I think there's a reason why they made it separatelyI wonder when uint8_t is used

2 years ago

2 answers
115 views
0
The undefined reference appears in Linux pthread_create. Is there anyone who can help me?

I'm following https://computing.llnl.gov/tutorials/pthreads/I keep getting errors when I run the code below.Even though pthread.h was included, it keeps saying pthread_create is not definedWhy is this...


1 answers
59 views
0
Why does a++++b show an error?

int main (){ int a = 5,b = 2; printf(%d,a+++++b); return 0;}error: lvalue required as increment operandThe code above cannot be executed, but if you write a++++b together, it will be executed, right?W...

2 years ago

1 answers
108 views
0
What command do you all use in the gdb debugger?

I just started gdb, but it's still very difficult.I don't know how it works.Can you tell me what other developers usually use?

2 years ago

1 answers
137 views
0
Why is this code parentheses on both sides of the function name?

I found this C function in the project source fileint (foo) (int *bar){ return foo (bar);}At first, I thought it was a function point, but it wasn't eitherWhy is it covered in parentheses?

2 years ago

1 answers
94 views
0
I want to find out the file size with C. Help me

I want to know how to find out the size of the file.Before saving the entire file as a string, I want to read it after malloc just the size of the file.I'm using malloc(MAXSIZE*sizeof(char)) together,...

2 years ago

1 answers
124 views
0
Does C know how to "free" free?

It's possible to point at each type of pointerWho tells me how many pointers to write in an array should be released when memory is released?When you hand over an array to a function, you hand over th...

2 years ago

1 answers
132 views
0
What are the advantages of goto in iterations/functions?

At school, I was taught not to use Goto under any circumstancesLooking at libavcodec, surprisingly, there are still many people who use goto. What are the advantages of goto in iterations/functions?Yo...


1 answers
74 views
0
Can I set the parameter type and share int foo(someVar){}?

int foo(someVar){ return someVar;}int main(int argc, const char * argv[]) { printf(%d\n, foo(3));}SomeVar, the factor of foo(), doesn't have a typeThere are no compilation errors and the program runs ...

2 years ago

1 answers
96 views
0
Why do you use the static function of C?

Question about the C static function says there's a static functionI wonder why you make a function only available in the same file.

2 years ago
« - 61 - »

© 2024 OneMinuteCode. All rights reserved.