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
341 views
1 answer
    I know that it's a common convention to pass the length of dynamically allocated arrays to functions that ... har-har) knowledge from? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
467 views
1 answer
    I am not so well-versed in the C standard, so please bear with me. I would like to know if it is ... that the memory regions overlap here ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
581 views
1 answer
    I know about algorithms to allocate/deallocate a 2D array dynamically, however I'm not too sure about the same for 3D ... ]); } free(arr3D); } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
296 views
1 answer
    I have to solve a little mpi problem. I have 4 slaves processes and each of these wants to send a 2d subarray ( ... MPI. return 0; } Thanks all. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
441 views
1 answer
    I understand that rand() function generates the same number(s) each you run it if you don't change the ... srand is called first before rand? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
543 views
1 answer
    How can I bind a socket to a particular network interface? I tried using setsockopt on server side, but the ... mentioning the IP address). See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
330 views
1 answer
    I'm studying on writing embedded linux driver, and decided to fire a few GPIOs to make sure I understand the ... ()? Thanks for any replies! See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
277 views
1 answer
    AKA - What's this obsession with pointers? Having only really used modern, object oriented languages like ActionScript ... missing out on here? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
501 views
1 answer
    I want to write a simple, dumb, X terminal emulator in C on a Linux system. At first, I just thought I would ... } close(master); return 0; } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
990 views
1 answer
    My problem can be summarised in the following: bar.c: #include <stdio.h> void bar() { printf("bar "); ... the weak symbol in main.c? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
302 views
1 answer
    The below mentioned in the GCC Page for the function sections and data sections options: -ffunction-sections -fdata ... Am I missing something? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
715 views
1 answer
    I am interested in flushing cache (L1, L2, and L3) only for a region of address space, for example all ... either from user or kernel space? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
810 views
1 answer
    I have the following query.Could any one please suggest me a solution. I'm working on encryption and decryption of ... return 0; } Thank you. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
491 views
1 answer
    I have two questions. Do realloc() and memcpy() copy the entries in an array to another in a way faster ... decreasing the size of the array ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
479 views
1 answer
    I have some code where I frequently copy a large block of memory, often after making only very small changes to ... it and doing it myself. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
380 views
1 answer
    In Linux where can I find the source code for all system calls given that I have the source tree? ... type in terminal like my_system_call? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
510 views
1 answer
    I want to know what is the difference between fgets() and scanf(). I am using C as my platform. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
630 views
1 answer
    In C, getopt_long does not parse the optional arguments to command line parameters parameters. When I run the program, the ... } } return 0; } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
406 views
1 answer
    I want to check if the user pressed down the Shift key when the program starts. (That means, press ... with accessing the terminal directly. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
480 views
1 answer
    I have a data type, say X, and I want to know its size without declaring a variable or pointer of that ... work with user defined data type. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
408 views
1 answer
    On success, the PID of the child process is returned in the parent's thread of execution, and a 0 is returned in the ... is p equal to 0 or PID? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
979 views
1 answer
    I am trying to set a 100ms timeout on a UDP Socket. I am using C. I have posted relavent pieces of my code ... %d ", seq_num); num_timeouts++; } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
529 views
1 answer
    I'm writing a point-to-point message queue system, and it has to be able to operate over UDP. I could ... nicely symmetric way to do it. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
530 views
1 answer
    Given the pid of a Linux process, I want to check, from a C program, if the process is still running. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
599 views
1 answer
    On a 64-bit system, sizeof(unsigned long) depends on the data model implemented by the system, for example, ... 64-bit data models on Wikipedia See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
491 views
1 answer
    Simple question about the realloc function in C: If I use realloc to shrink the memory block that a pointer is ... Will I have a memory leak? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
301 views
1 answer
    This is a multiple question for the same pre-processing instruction. 1 - <> or "" ? Apart from the info found ... ) and what are the pros/cons? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
527 views
1 answer
    I used the following piece of code to read data from files as part of a larger program. double data_read( ... example with the real function. 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

2.1m questions

2.1m answers

60 comments

57.0k users

...