Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged C

0 votes
357 views
1 answer
    The typical 1-D array can be statically or automatically allocated in a declaration. enum { n=100 }; int ... to and returned from functions? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
327 views
1 answer
    Why a char variable gets 'b' from assignment of 'ab', rather 'a'? char c = 'ab'; printf("c: %c ", c); Prints: c: b See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
806 views
1 answer
    In the following code: /* mylog.c */ #include <stdio.h> #include <stdlib.h> /* for atoi(3) */ int ... being accepted by the compiler? Thanks. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
369 views
1 answer
    I'm watching a directory by calling ReadDirectoryChangesW synchronously. When a new file is available, I try to access it ... } ReadFile (...); See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
385 views
1 answer
    What happens in C when you create an array of negative length? For instance: int n = -35; int testArray[n ... it vary from compiler to compiler? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
312 views
1 answer
    I read somewhere that the following arrays can be passed to the following functions in such a manner, as shown ... 1D arrays to function f2? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
641 views
1 answer
    I have a basic structure like this typedef struct struck { char* id; char* mat; int value; char* place ... strcpy. It compiles without problem. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
460 views
1 answer
    Up till now I was pretty much sure that int arr[4][5]; Then arr will decay to pointer to pointer. But this ... . Am I missing out on something. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
441 views
1 answer
    I am using the following code to access the RS485 slave but I get the error: Error reading ioctl port ... converter now attached to ttyUSB3 See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
390 views
1 answer
    int main() { char *p; p = (char* ) malloc(sizeof(char) * 0); printf("Hello Enter the data without spaces : " ... p = (char* ) malloc(0) ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
548 views
1 answer
    After wasting too much time searching why my program doesn't execute gets() after using scanf(), I found a ... nombre,mensaje); return 0; } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
286 views
1 answer
    I'm very much confused about the const keyword. I have a function accepting an array of strings as input ... this case the paths parameter). See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
373 views
1 answer
    i was trying to reassign a string to a pre-initialized array a[], and all i could get was an error main( ... was possible as in above program.. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
379 views
1 answer
    I have a char array buffer that I am using to store characters that the user will input one by one. My ... is 12345678! tagBuffer is 123456789! See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
313 views
1 answer
    I'm trying to debug this simple C program: #include <stdio.h> int main(int argc, char *argv[]) { ... . Cannot access memory at address 0x650 See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
332 views
1 answer
    so I've been running into a problem where somehow my code is causing segmentation faults before any of my main ... 53 Moscow 37.62 55.75 See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
378 views
1 answer
    I was writing some test code in C. By mistake I had inserted a ; after a #define, which gave me ... Are those both MAX_STRINGs not constants? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
361 views
1 answer
    I tried to execute the following simple code in ubuntu 15.10 But the code behaves odd than expected #include ... getting input second time. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
329 views
1 answer
    I started doing pthread programming on linux and at the very first programme i got totally confused. Below is the ... 0 Thread 2 returns: 0 See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
419 views
1 answer
    I am facing a problem using the select function in Unix. I have a server that waits for for a connection. ... calling select() again? Thanks. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
375 views
1 answer
    In my program I am forking (in parallel) child processes in a finite while loop and doing exec on each ... only when all children have finished See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
321 views
1 answer
    gcc 4.4.4 c89 What is the standard way to null terminate a string? When I use the NULL I get a warning message. *dest ... ++ = 0; */ return i; } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
396 views
1 answer
    I came across an OpenMP code that had the collapse clause, which was new to me. I'm trying to understand ... using collapse and not using it? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
282 views
1 answer
    In another question, I just spotted this little pearl of C wisdom: #define for if (false) {} else for which ... snippet. Anyone have an idea? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
284 views
1 answer
    I used to think that in C99, even if the side-effects of functions f and g interfered, and although the ... a statement in a static analyzer. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
374 views
1 answer
    From The GNU C Programming Tutorial: The fgets ("file get string") function is similar to the gets function. ... C99 or future C standards? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
453 views
1 answer
    I have declared an array char **arr; How to initialize the memory for the 2D char array. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
486 views
1 answer
    I have a variadic function from a third-party C library: int func(int argc, ...); argc indicates the ... ) which triggers a compilation error. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...